[issue33991] lib2to3 should parse f-strings

2018-06-28 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
components: +2to3 (2.x to 3.x conversion tool)
nosy: +benjamin.peterson, eric.smith

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33993] zipfile module weird behavior when used with zipinfo

2018-06-28 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Use:

rel_name = "tmp/test.md"

--
nosy: +serhiy.storchaka
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14117] Turtledemo: exception and minor glitches.

2018-06-28 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33995] test_min_max_version in test_ssl.py fails when Python is built against LibreSSL; {min,max}imum_version behavior differs from OpenSSL

2018-06-28 Thread Alan Huang


New submission from Alan Huang :

LibreSSL's implementation of the function used to get the minimum and maximum 
SSL versions supported differs from OpenSSL's.

In short, the issue is in the implementations of `SSL_CTX_new` - OpenSSL 
initializes variables `ret->{min,max}_proto_version` to 0, while LibreSSL 
initializes corresponding variables to those of the `SSL_METHOD` given.

As such, when Python is built with LibreSSL, the default values for an instance 
of ssl.SSLContext are, in the case of ssl.SSLContext(), ctx.minimum_version = 
; ctx.maximum_version = .
This is NOT what test_ssl.py expects; it expects OpenSSL's behavior of 
initializing the version variables to zero, which _ssl.c then translates to 
PY_PROTO_{MIN,MAX}IMUM_SUPPORTED -> ssl.TLSVersion.{MIN,MAX}IMUM_SUPPORTED.

Additionally, LibreSSL, when `SSL_CTX_set_{min,max}_proto_version` is called 
with `version` equal to zero, explicitly sets the minimum / maximum values 
equal to the minimum / maximum values for the `SSL_METHOD` it was called with 
(namely, 769/770/771, in the case of `TLS_method()`), not the minimum / maximum 
values supported by the library.

I have sent an email to the LibreSSL mailing list asking for clarification on 
this point, namely, if this is intended behavior. If it is, there are two ways 
that come to mind to work around this behavior. Both ways would only be 
necessary if `IS_LIBRESSL`.

1. Skip `test_min_max_version`.
2. Instead of testing that ctx is equal *to* the extremes after it's been set 
to one of the extremes, test that it's equal to the actual constants.
   There are two ways this could be accomplished as well:
  a. Use PY_PROTO_{MIN,MAX}IMUM_AVAILABLE, defined in _ssl.c (this may 
require the addition of another call to `PyModule_AddIntConstant` to provide 
access to the constant from _ssl). The downside to this approach is that it 
assumes that `TLS_method()`, or whatever `SSL_METHOD` test_ssl.py uses has 
lower and upper bounds equal to PY_PROTO_{MIN,MAX}IMUM_AVAILABLE, which may not 
always be the case.
  b. Access and store the values for ctx.{min,max}imum_value on creation, 
then reference them after setting.
   Either of these approaches would likely also have the benefit of removing 
the need for `self.assertIn(ctx.minimum_version, {ssl.TLSVersion.TLSv1_2, 
ssl.TLSVersion.TLSv1_3})`.

The test that failed was:
==
FAIL: test_min_max_version (test.test_ssl.ContextTests)
--
Traceback (most recent call last):
  File "/home/alan/src/cpython/Lib/test/test_ssl.py", line 1066, in 
test_min_max_version
ctx.minimum_version, ssl.TLSVersion.MINIMUM_SUPPORTED
AssertionError:  != 

Addendum:
I found the documentation for ssl.TLSVersion.{MAX,MIN}IMUM_SUPPORTED confusing 
at first - it took me quite a while to realize what the purpose of the 
constants were; I would have expected them to contain the maximum and minimum 
protocol versions supported by the library; I see why it was phrased that way, 
after having boned up on ssl.py, _ssl.c, and OpenSSL/LibreSSL, but think it 
could could be made clearer.

--
assignee: docs@python
components: Documentation, SSL, Tests
messages: 320703
nosy: Alan.Huang, alex, christian.heimes, docs@python, dstufft, janssen
priority: normal
severity: normal
status: open
title: test_min_max_version in test_ssl.py fails when Python is built against 
LibreSSL; {min,max}imum_version behavior differs from OpenSSL
type: behavior
versions: Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14117] Turtledemo: exception and minor glitches.

2018-06-28 Thread miss-islington


miss-islington  added the comment:


New changeset 00e05242ae650bc29e8052a5fb79cbb83224a657 by Miss Islington (bot) 
in branch '3.6':
bpo-14117: Make minor tweaks to turtledemo (GH-8002)
https://github.com/python/cpython/commit/00e05242ae650bc29e8052a5fb79cbb83224a657


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14117] Turtledemo: exception and minor glitches.

2018-06-28 Thread miss-islington


miss-islington  added the comment:


New changeset e2c5a753fa3eabe176c34048e3b68674f99386b0 by Miss Islington (bot) 
in branch '3.7':
bpo-14117: Make minor tweaks to turtledemo (GH-8002)
https://github.com/python/cpython/commit/e2c5a753fa3eabe176c34048e3b68674f99386b0


--
nosy: +miss-islington

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33994] python build egg fails with error while compiling test cases

2018-06-28 Thread Saba Kauser


New submission from Saba Kauser :

Hello,
Everything was working perfectly until recently, may be a week back, when I 
first started to see the error while generating egg for python ibm_db package.
Every time I execute the command : python setup.py bdsit_egg, 
my flow stops with below error:

byte-compiling 
build\bdist.win-amd64\egg\tests\test_131_PrepareExecuteSelectStatementParams.py 
to test_131_PrepareExecuteSelectStatementParams.cpython-36.pyc
error: [Errno 2] No such file or directory: 
'build\\bdist.win-amd64\\egg\\tests\\__pycache__\\test_131_PrepareExecuteSelectStatementParams.cpython-36.pyc.1942660169328'
Please note that, every time I run, the file name is getting appended with a 
random number. e.g 
test_131_PrepareExecuteSelectStatementParams.cpython-36.pyc.1942660169328' when 
the file name placed under tests/__pycache__ should be 
test_131_PrepareExecuteSelectStatementParams.cpython-36.pyc.

There are however other test cases upto test_130* that are getting compiled 
correctly. 
e.g:
byte-compiling 
build\bdist.win-amd64\egg\tests\test_112_FieldNumDiffCaseColNames.py to 
test_112_FieldNumDiffCaseColNames.cpython-36.pyc
byte-compiling build\bdist.win-amd64\egg\tests\test_113_DateTest.py to 
test_113_DateTest.cpython-36.pyc
byte-compiling build\bdist.win-amd64\egg\tests\test_114_NumericTest_01.py to 
test_114_NumericTest_01.cpython-36.pyc
byte-compiling build\bdist.win-amd64\egg\tests\test_115_NumericTest_02.py to 
test_115_NumericTest_02.cpython-36.pyc
byte-compiling build\bdist.win-amd64\egg\tests\test_116_ConnActive.py to 
test_116_ConnActive.cpython-36.pyc
byte-compiling build\bdist.win-amd64\egg\tests\test_120_FieldName.py to 
test_120_FieldName.cpython-36.pyc
byte-compiling build\bdist.win-amd64\egg\tests\test_121_FieldNameAddCol.py to 
test_121_FieldNameAddCol.cpython-36.pyc
byte-compiling 
build\bdist.win-amd64\egg\tests\test_122_FieldNameDiffCaseColNames.py to 
test_122_FieldNameDiffCaseColNames.cpython-36.pyc
byte-compiling build\bdist.win-amd64\egg\tests\test_123_FieldNamePos_01.py to 
test_123_FieldNamePos_01.cpython-36.pyc
byte-compiling build\bdist.win-amd64\egg\tests\test_124_FieldNamePos_02.py to 
test_124_FieldNamePos_02.cpython-36.pyc
byte-compiling build\bdist.win-amd64\egg\tests\test_125_FieldNamePos_03.py to 
test_125_FieldNamePos_03.cpython-36.pyc
byte-compiling 
build\bdist.win-amd64\egg\tests\test_130_PrepExecuteSelectStmt.py to 
test_130_PrepExecuteSelectStmt.cpython-36.pyc

Can you guide me on what is leading to this? What is making to have the file 
name appended with random number.

Appreciate your assitance!

Thank you,
Saba.

--
components: Build
messages: 320700
nosy: sabakauser
priority: normal
severity: normal
status: open
title: python build egg fails with error while compiling test cases
type: compile error
versions: Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14117] Turtledemo: exception and minor glitches.

2018-06-28 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7611

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14117] Turtledemo: exception and minor glitches.

2018-06-28 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7610
stage: commit review -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14117] Turtledemo: exception and minor glitches.

2018-06-28 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset 891a1f86d415779cf67ca23e626a868e586feb05 by Terry Jan Reedy in 
branch 'master':
bpo-14117: Make minor tweaks to turtledemo (GH-8002)
https://github.com/python/cpython/commit/891a1f86d415779cf67ca23e626a868e586feb05


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32545] Unable to install Python 3.7.0a4 on Windows 10 - Error 0x80070643: Failed to install MSI package.

2018-06-28 Thread Steve Dower


Steve Dower  added the comment:

We'll need you to attach the logs and try rebooting, as described earlier in 
this thread.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14117] Turtledemo: exception and minor glitches.

2018-06-28 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

PR 8002 fixes the remaining minor problems.

--
stage: patch review -> commit review
versions: +Python 3.6, Python 3.7, Python 3.8 -Python 2.7, Python 3.4, Python 
3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14117] Turtledemo: exception and minor glitches.

2018-06-28 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
pull_requests: +7609
stage: needs patch -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14117] Turtledemo: exception and minor glitches.

2018-06-28 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

#21884 was closed as a duplicate of #21882 and hence not a separate dependency.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22051] Turtledemo: stop reloading demos

2018-06-28 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27500] ProactorEventLoop cannot open connection to ::1

2018-06-28 Thread miss-islington


miss-islington  added the comment:


New changeset c00144cd7741a5060662e85717f6559ad46d02aa by Miss Islington (bot) 
in branch '3.6':
bpo-27500: Fix static version of getaddrinfo to resolve IPv6 (GH-7993)
https://github.com/python/cpython/commit/c00144cd7741a5060662e85717f6559ad46d02aa


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27500] ProactorEventLoop cannot open connection to ::1

2018-06-28 Thread miss-islington


miss-islington  added the comment:


New changeset 3ed44141216aa1d2d8dd7d170c2dc216a6e718b6 by Miss Islington (bot) 
in branch '3.7':
bpo-27500: Fix static version of getaddrinfo to resolve IPv6 (GH-7993)
https://github.com/python/cpython/commit/3ed44141216aa1d2d8dd7d170c2dc216a6e718b6


--
nosy: +miss-islington

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27500] ProactorEventLoop cannot open connection to ::1

2018-06-28 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7608

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27500] ProactorEventLoop cannot open connection to ::1

2018-06-28 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7607

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27500] ProactorEventLoop cannot open connection to ::1

2018-06-28 Thread Yury Selivanov


Yury Selivanov  added the comment:


New changeset d904c238ca3551750cb97d15d827c3e525970867 by Yury Selivanov in 
branch 'master':
bpo-27500: Fix static version of getaddrinfo to resolve IPv6 (GH-7993)
https://github.com/python/cpython/commit/d904c238ca3551750cb97d15d827c3e525970867


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33993] zipfile module weird behavior when used with zipinfo

2018-06-28 Thread Micheal Gardner

New submission from Micheal Gardner :

when i want to zip a empty folder, i use following code

```

import zipfile

zfile = zipfile.ZipFile("tmp.zip",'w')
zif = zipfile.ZipInfo("tmp/")
zfile.writestr(zif,"")
zfile.close()
```

but in this case, things become weird.

```
# 先造一个测试文件夹
mkdir /tmp/test_folder/
touch /tmp/test_folder/test.md
```

```
import zipfile
file_path = "/tmp/test_folder/test.md"
rel_name = "test.md"
zfile = zipfile.ZipFile("tmp.zip",'w')
zif = zipfile.ZipInfo("tmp/")
zfile.writestr(zif,"")
zfile.write(file_path, rel_name)
zfile.close()
```

decompression expect 

```
$ tree tmp
tmp
├── test.md

1 file
```

decompression actual

```
$ tree tmp
tmp
├── test.md
└── tmp

1 directory, 1 file
```

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33993] zipfile module weird behavior when used with zipinfo

2018-06-28 Thread Micheal Gardner


Change by Micheal Gardner :


--
components: Library (Lib)
nosy: Micheal Gardner
priority: normal
severity: normal
status: open
title: zipfile module weird behavior when used with zipinfo
type: behavior
versions: Python 2.7, Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33991] lib2to3 should parse f-strings

2018-06-28 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

I'm curious how you are getting f-strings (introduced in Python 3.6) in Python 
2 code that you are passing to 2to3.

--
nosy: +steven.daprano

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33992] Compilation fails on AMD64 Windows8.1 Non-Debug 3.6: The Windows SDK version 10.0.15063.0 was not found

2018-06-28 Thread Zachary Ware


Zachary Ware  added the comment:

Sorry, this seems to have been due to updates on the machine.  It's now fixed.

--
keywords: +buildbot
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33992] Compilation fails on AMD64 Windows8.1 Non-Debug 3.6: The Windows SDK version 10.0.15063.0 was not found

2018-06-28 Thread STINNER Victor


New submission from STINNER Victor :

Build FAILED.
   "D:\buildarea\3.6.ware-win81-release\build\PCbuild\pcbuild.proj" (Build 
target) (1) ->
   "D:\buildarea\3.6.ware-win81-release\build\PCbuild\pythoncore.vcxproj" 
(Build target) (2) ->
   (Desktop_PlatformPrepareForBuild target) -> 
 C:\Program Files 
(x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\x64\PlatformToolsets\v140\Toolset.targets(36,5):
 error MSB8036: The Windows SDK version 10.0.15063.0 was not found. Install the 
required version of Windows SDK or change the SDK version in the project 
property pages or by right-clicking the solution and selecting "Retarget 
solution". 
[D:\buildarea\3.6.ware-win81-release\build\PCbuild\pythoncore.vcxproj]
0 Warning(s)
1 Error(s)

--
components: Tests
messages: 320689
nosy: vstinner, zach.ware
priority: normal
severity: normal
status: open
title: Compilation fails on AMD64 Windows8.1 Non-Debug 3.6: The Windows SDK 
version 10.0.15063.0 was not found
versions: Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29097] [Windows] datetime.fromtimestamp(t) when 0 <= t <= 86399 fails on Python 3.6

2018-06-28 Thread STINNER Victor


Change by STINNER Victor :


--
title: datetime.fromtimestamp(t) when 0 <= t <= 86399 fails on Python 3.6 -> 
[Windows] datetime.fromtimestamp(t) when 0 <= t <= 86399 fails on Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33945] concurrent.futures ProcessPoolExecutor submit() blocks on results being written

2018-06-28 Thread Daniel Barcay


Daniel Barcay  added the comment:

Just got the drop of the python3.7 release. I can confirm that this is fixed in 
python3.7 in my workload.

Nice job! Thanks for changing the mechanism of thread-sync. I'm grateful.

--
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33963] IDLE macosx: add tests.

2018-06-28 Thread Mark Roseman


Change by Mark Roseman :


--
assignee:  -> terry.reedy
components: +IDLE
nosy: +markroseman

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33991] lib2to3 should parse f-strings

2018-06-28 Thread skreft


New submission from skreft :

Currently f-strings are parsed just as regular strings by lib2to3. However, 
this has the problem that the invariant of a string node being a literal is now 
broken.

This poses two problems. On one hand, if I want to compare that two string 
nodes are equivalent I would need to do something like:

def string_nodes_are_eqivalent(node1, node2):
  if is_f_string(node1) and is_f_string(node2):
# This would require to parse the nodes using ast.parse
return f_strings_are_equivalent(node1, node2)
  if not is_f_string(node1) and not is_f_string(node2):
return ast.literal_eval(node1.value) == ast.literal_eval(node2.value)
  return False

Note that ast.literal_eval does not accept f-strings.
Also note that ast.parse returns an ast.JoinedString for f-strings, whose 
elements are either ast.Str or ast.FormattedValue, the latter being ast 
expressions.

On the other hand, this has the problem of not being able to refactor the 
expressions inside an f-string.

--
messages: 320687
nosy: skreft
priority: normal
severity: normal
status: open
title: lib2to3 should parse f-strings

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23544] IDLE hangs when selecting Stack View with debug active

2018-06-28 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

This crashes or hangs the user execution process, but not the IDLE process.  So 
Shell => 'Restart Shell   cntl-F6' still works.

--
versions: +Python 3.6, Python 3.7, Python 3.8 -Python 3.4, Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33990] CPPFLAGS during ./configure are not passed-through in sysconfig.customize_compiler

2018-06-28 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
nosy: +pablogsal

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33983] unify types for lib2to3.pytree.Base.children

2018-06-28 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Concatenating list and tuple (or tuple and list) you can write as:

grandchildren = [*node.children[0].children, *node.children[1].children]

The only list methods not available for tuples are mutating methods (using them 
with a shared empty list would be a bug), and copy() (a[:] and list(a) work 
with both lists and tuples).

>>> sorted(set(dir(list)) - set(dir(tuple)))
['__delitem__', '__iadd__', '__imul__', '__reversed__', '__setitem__', 
'append', 'clear', 'copy', 'extend', 'insert', 'pop', 'remove', 'reverse', 
'sort']

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33990] CPPFLAGS during ./configure are not passed-through in sysconfig.customize_compiler

2018-06-28 Thread Eric N. Vander Weele


Change by Eric N. Vander Weele :


--
keywords: +patch
pull_requests: +7606
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24575] timemodule build fail - missing definitions for _Py_BEGIN_SUPPRESS_IPH and _Py_END_SUPPRESS_IPH

2018-06-28 Thread Neil Schemenauer


Neil Schemenauer  added the comment:

I ran into an error like this and perhaps I have a clue was why some people run 
into it.  Dynamic modules built from Modules/Setup will need to have  
-DPy_BUILD_CORE defined within the Setup file in the case they need to use the 
_Py_BEGIN_SUPPRESS_IPH macro.

The Setup file is generated on figure 'configure' but it is not removed if you 
run "make clean".  So, if it gets generated without the Py_BUILD_CORE flags in 
it, you will get this mysterious build error.

Perhaps Modules/makesetup should be intelligent and add the Py_BUILD_CORE flags 
as needed.  One idea is to check the path of the source code (e.g. 
timemodule.c) and if the source is within the code interpreter folder,  add the 
BUILD_CORE flag.

Not sure about other platform build systems.  It looks like PCbuild does 
something different as it doesn't use makesetup.

--
nosy: +nascheme

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33990] CPPFLAGS during ./configure are not passed-through in sysconfig.customize_compiler

2018-06-28 Thread Eric N. Vander Weele


New submission from Eric N. Vander Weele :

When specifying CPPFLAGS during `./configure`, 
`sysconfig.get_config_var('CPPFLAGS')` does capture the originally specified 
flags.  However, when building a C/C++ extension, any flags specified via 
CPPFLAGS are not present during compilation of extension source files.

Since preprocessor flags (e.g., '-I' rules) may be used during `./configure` 
instead of `CFLAGS`, it appears that the `CPPFLAGS` captured should also be 
injected when customizing the compiler executable to be invoked.

I have PR that will be submitted and linked shortly.

--
components: Build, Distutils
messages: 320683
nosy: dstufft, eric.araujo, ericvw
priority: normal
severity: normal
status: open
title: CPPFLAGS during ./configure are not passed-through in 
sysconfig.customize_compiler
type: behavior
versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33983] unify types for lib2to3.pytree.Base.children

2018-06-28 Thread John Reese


John Reese  added the comment:

The problem I'm trying to solve is around functions that operate on a 
Union[Leaf, Node], and want to be able to do things like `grandchildren = 
node.children[0].children + node.children[1].children` (contrived example, but 
point being tuple+list=TypeError while list+tuple=OK).  There are similar cases 
around list methods not being available for tuples.  In both cases, as is, the 
function needs to do some amount of type checking at runtime of each child to 
determine what operations can be done.  Also, IMO, from a type annotation 
perspective, having a child class that uses a different type for an attribute 
from the base class is an anti-pattern, or weird at best.

re. error prone:  Since the expectation in lib2to3 is already that fixers 
shouldn't be modifying `node.children` directly, I don't see how this makes 
anything more error prone.  Base/Leaf objects lack those methods for 
modifications, so unless the code is already being a bad actor, the situation 
isn't changed.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33985] ContextVar does not have a "name" attribute

2018-06-28 Thread Yury Selivanov


Change by Yury Selivanov :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31546] PyOS_InputHook is not called when waiting for input() in Windows

2018-06-28 Thread Steve Dower


Steve Dower  added the comment:


New changeset 9d92524c11def666a78ff57a9603a9ad6142418a by Steve Dower (Miss 
Islington (bot)) in branch '3.7':
bpo-31546: Fix input hook integration (GH-7978)
https://github.com/python/cpython/commit/9d92524c11def666a78ff57a9603a9ad6142418a


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31546] PyOS_InputHook is not called when waiting for input() in Windows

2018-06-28 Thread miss-islington


miss-islington  added the comment:


New changeset 0ebd1bc94a941a5044e26de946c1100d652dfe46 by Miss Islington (bot) 
in branch '3.6':
bpo-31546: Fix input hook integration (GH-7978)
https://github.com/python/cpython/commit/0ebd1bc94a941a5044e26de946c1100d652dfe46


--
nosy: +miss-islington

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33989] ms.key_compare is not initialized in all pathes of list_sort_impl

2018-06-28 Thread Pochang Chen


New submission from Pochang Chen :

Relevant code (Objects/listobject.c lines 2268 -- 2286 as of commit e76ac9d):

/* Choose the best compare, given what we now know about the keys. */
if (keys_are_all_same_type) {

if (key_type == &PyUnicode_Type && strings_are_latin) {
ms.key_compare = unsafe_latin_compare;
}
else if (key_type == &PyLong_Type && ints_are_bounded) {
ms.key_compare = unsafe_long_compare;
}
else if (key_type == &PyFloat_Type) {
ms.key_compare = unsafe_float_compare;
}
else if ((ms.key_richcompare = key_type->tp_richcompare) != NULL) {
ms.key_compare = unsafe_object_compare;
}
}
else {
ms.key_compare = safe_object_compare;
}

Clearly, ms.key_compare is not assigned here if keys_are_all_same_type is true 
but key_type->tp_richcompare is NULL.

I don't know how to obtain an object with ob_type->tp_richcompare being NULL, 
though.

--
components: Interpreter Core
messages: 320679
nosy: johnchen902
priority: normal
severity: normal
status: open
title: ms.key_compare is not initialized in all pathes of list_sort_impl
type: crash
versions: Python 3.7, Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33985] ContextVar does not have a "name" attribute

2018-06-28 Thread miss-islington


miss-islington  added the comment:


New changeset 4c20d2bf5d174260558c71052b73d73b6c34 by Miss Islington (bot) 
in branch '3.7':
bpo-33985: Implement ContextVar.name attribute. (GH-7980)
https://github.com/python/cpython/commit/4c20d2bf5d174260558c71052b73d73b6c34


--
nosy: +miss-islington

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29097] datetime.fromtimestamp(t) when 0 <= t <= 86399 fails on Python 3.6

2018-06-28 Thread Eryk Sun


Change by Eryk Sun :


--
stage: needs patch -> patch review
versions: +Python 3.7, Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33985] ContextVar does not have a "name" attribute

2018-06-28 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7605

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33985] ContextVar does not have a "name" attribute

2018-06-28 Thread Yury Selivanov


Change by Yury Selivanov :


--
priority: release blocker -> high

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33985] ContextVar does not have a "name" attribute

2018-06-28 Thread Yury Selivanov


Yury Selivanov  added the comment:


New changeset 41cb0baea96a80360971908a0bd79d9d40dd5e44 by Yury Selivanov in 
branch 'master':
bpo-33985: Implement ContextVar.name attribute. (GH-7980)
https://github.com/python/cpython/commit/41cb0baea96a80360971908a0bd79d9d40dd5e44


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27500] ProactorEventLoop cannot open connection to ::1

2018-06-28 Thread Yury Selivanov


Yury Selivanov  added the comment:

> Somebody please submit a PR so this can be fixed in 3.7.1 and the fix can
> be backported to 3.6.7.

Somehow I overlooked this one when I was sifting the issues we needed to fix in 
3.7.  I've opened a PR.

--
priority: normal -> high

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27500] ProactorEventLoop cannot open connection to ::1

2018-06-28 Thread Yury Selivanov


Change by Yury Selivanov :


--
keywords: +patch
pull_requests: +7604
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28411] Eliminate PyInterpreterState.modules.

2018-06-28 Thread Roundup Robot


Change by Roundup Robot :


--
pull_requests: +7603

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27500] ProactorEventLoop cannot open connection to ::1

2018-06-28 Thread Guido van Rossum


Guido van Rossum  added the comment:

Somebody please submit a PR so this can be fixed in 3.7.1 and the fix can
be backported to 3.6.7.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31546] PyOS_InputHook is not called when waiting for input() in Windows

2018-06-28 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7602

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31546] PyOS_InputHook is not called when waiting for input() in Windows

2018-06-28 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7601

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31546] PyOS_InputHook is not called when waiting for input() in Windows

2018-06-28 Thread Steve Dower


Steve Dower  added the comment:


New changeset 9b9d58f0d88b338eb8d2ae0da5cd91d60d1b0e39 by Steve Dower (Thomas A 
Caswell) in branch 'master':
bpo-31546: Fix input hook integration (GH-7978)
https://github.com/python/cpython/commit/9b9d58f0d88b338eb8d2ae0da5cd91d60d1b0e39


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32996] Improve What's New in 3.7

2018-06-28 Thread miss-islington


miss-islington  added the comment:


New changeset 48dc7527e32512a27a58107477926719ea4c589b by Miss Islington (bot) 
in branch '3.7':
bpo-32996: Enhancements to What's New based on feedback (GH-7988)
https://github.com/python/cpython/commit/48dc7527e32512a27a58107477926719ea4c589b


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32996] Improve What's New in 3.7

2018-06-28 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7600

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32996] Improve What's New in 3.7

2018-06-28 Thread Yury Selivanov


Yury Selivanov  added the comment:


New changeset 4d26c8a177d8ada440b3cfdfb1d0423ab5ca81a7 by Yury Selivanov (Elvis 
Pranskevichus) in branch 'master':
bpo-32996: Enhancements to What's New based on feedback (GH-7988)
https://github.com/python/cpython/commit/4d26c8a177d8ada440b3cfdfb1d0423ab5ca81a7


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32996] Improve What's New in 3.7

2018-06-28 Thread Elvis Pranskevichus


Change by Elvis Pranskevichus :


--
pull_requests: +7599

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33963] IDLE macosx: add tests.

2018-06-28 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Mark Roseman emailed me that moving the 3 imports within overrideRootMenu to 
the top of the module does not appear to cause a problem.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6761] Class calling

2018-06-28 Thread Andrés Delfino

Andrés Delfino  added the comment:

The PR uses a slight rewording of David's phrasing.

--
nosy: +adelfino
versions: +Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6761] Class calling

2018-06-28 Thread Andrés Delfino

Change by Andrés Delfino :


--
keywords: +patch
pull_requests: +7598
stage: needs patch -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33954] float.__format__('n') fails with _PyUnicode_CheckConsistency assertion error

2018-06-28 Thread STINNER Victor


STINNER Victor  added the comment:

> The bug is in _PyUnicode_InsertThousandsGrouping()

This function should take a _PyUnicodeWriter as input, not a PyUnicodeObject.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33954] float.__format__('n') fails with _PyUnicode_CheckConsistency assertion error

2018-06-28 Thread Mark Dickinson


Change by Mark Dickinson :


--
nosy: +eric.smith, mark.dickinson

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32545] Unable to install Python 3.7.0a4 on Windows 10 - Error 0x80070643: Failed to install MSI package.

2018-06-28 Thread Amin Radjabov


Amin Radjabov  added the comment:

I have same issue on Win 7 x64

--
nosy: +Amin Radjabov

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33932] Calling Py_Initialize() twice now triggers a fatal error (Python 3.7)

2018-06-28 Thread Miro Hrončok

Change by Miro Hrončok :


--
nosy: +hroncok

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33932] Calling Py_Initialize() twice now triggers a fatal error (Python 3.7)

2018-06-28 Thread STINNER Victor


STINNER Victor  added the comment:

Ok, now with my regression hat.

In Python 3.6, Py_Main() calls Py_Initialize(). If Py_Initialize() is called 
twice, the second call does nothing. So it's fine to call Py_Main() after 
Py_Initialize() in Python 3.6.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33932] Calling Py_Initialize() twice now triggers a fatal error (Python 3.7)

2018-06-28 Thread STINNER Victor


STINNER Victor  added the comment:

I looked quickly at _Py_InitializeCore() and I'm not sure that it's designed to 
replace an existing configuration.

Example:

int Py_HashRandomizationFlag = 0; /* for -R and PYTHONHASHSEED */

(...)

if (!core_config->use_hash_seed || core_config->hash_seed) {
/* Random or non-zero hash seed */
Py_HashRandomizationFlag = 1;
}

If Py_Initialize() sets Py_HashRandomizationFlag to 1, but Py_Main() doesn't 
use an hash seed, Py_HashRandomizationFlag value remains 1 which is wrong.

pymain_read_conf() fills _PyCoreConfig from global configuration flags, but 
then global configuration flags are supposed to be set from the global 
configuration flags.

So maybe for this specific case, _Py_InitializeCore() should always set 
Py_HashRandomizationFlag. But it was just one example to show that right now, 
_Py_InitializeCore() doesn't seem to support to be called twice with two 
different configurations.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33932] Calling Py_Initialize() twice now triggers a fatal error (Python 3.7)

2018-06-28 Thread STINNER Victor


STINNER Victor  added the comment:

I reopen the issue because fontforge still fails on Python 3.7.0 final. 
fontforge calls Py_Initialize() and then calls Py_Main() which fails with an 
assertion: https://bugzilla.redhat.com/show_bug.cgi?id=1595421

The same code works well on Python 3.6, so should we define this issue as a 
regression?

Call stack:

* Py_Main()
* pymain_main()
* _Py_InitializeCore() which fails

The problem is that the first call of Py_Initialize() sets a first 
configuration, but then Py_Main() sets a different configuration.

Is it correct to call Py_Initialize() before Py_Main()?

--
resolution: fixed -> 
status: closed -> open

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33983] unify types for lib2to3.pytree.Base.children

2018-06-28 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Empty list takes more memory and more time for creating than an empty tuple 
(the latter is just a singleton). Since all Node and Leaf instances share the 
same children by default, making it a list is errorprone.

What is the problem of having an empty tuple instead of an empty list?

--
nosy: +benjamin.peterson, serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33974] _stringify handles quoted strings incorrectly

2018-06-28 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

This issue needs more complex fix. PR 7986 adds necessary changes and tests.

Thank you for your report Gauchj.

--
versions: +Python 2.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33974] _stringify handles quoted strings incorrectly

2018-06-28 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +7597
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33988] [EASY] [3.7] test_platform fails when run with -Werror

2018-06-28 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
pull_requests: +7596
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29672] `catch_warnings` context manager causes all warnings to be printed every time, even after exiting

2018-06-28 Thread Erik Bray


Erik Bray  added the comment:

I just encountered this as well.  The way catch_warnings is implemented is a 
bit "dumb" in how it treats _filter_version (it calls _filters_mutated even if 
the active filters are not actually changed when entering catch_warnings).

More significantly, _filter_version is not fine-grained enough.  If some 
warning was already displayed, calling catch_warnings() should not later cause 
that same warning to be displayed again unless the filters were modified in 
such a way, during catch_warnings(), that that warning should be displayed 
(e.g. changed to 'always').

I'm not really sure what to do about that though.  Maybe the "filter version" 
should be per-warning?  Currently the value assigned to each warning in 
__warningregistry__ is not used (it is just set to True), so maybe that could 
actually be used for this.

--
nosy: +erik.bray

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33988] [EASY] [3.7] test_platform fails when run with -Werror

2018-06-28 Thread STINNER Victor


STINNER Victor  added the comment:

Would you mind to create a PR instead of a patch file?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27500] ProactorEventLoop cannot open connection to ::1

2018-06-28 Thread bay


bay  added the comment:

The bug is reproducible on Python 3.7. The connect call always fails when I
try to use connect to any IPv6 address with ProactorEventLoop.

The bug can be bypassed by adding "%0" to the IPv6 address. This will cause
to trigger this if construction:
https://github.com/python/cpython/blob/e76ac9d4ef77b74ea7de768f4de7c38893fad539/Lib/asyncio/base_events.py#L133

As mentioned by Sebastian, it happen because the _ipaddr_info function returns
only the host and the port for IPv6: return af, type, proto, '', (host, port)
https://github.com/python/cpython/blob/e76ac9d4ef77b74ea7de768f4de7c38893fad539/Lib/asyncio/base_events.py#L142

This (host, port) tuple used in ConnectEx call, but it expect 4-element tuple
to connect IPv6: 
https://github.com/python/cpython/blob/55edd0c185ad2d895b5d73e47d67049bc156b654/Modules/overlapped.c#L1090
Instead it tries to connect, using IPv4 and fails.

The bug can be fixed by doing the following:
if af == socket.AF_INET6:
return af, type, proto, '', (host, port, 0, 0)
else:
return af, type, proto, '', (host, port)

instead of
return af, type, proto, '', (host, port) 

in
https://github.com/python/cpython/blob/e76ac9d4ef77b74ea7de768f4de7c38893fad539/Lib/asyncio/base_events.py#L142

--
nosy: +bay

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33988] [EASY] [3.7] test_platform fails when run with -Werror

2018-06-28 Thread Karthikeyan Singaravelan

Karthikeyan Singaravelan  added the comment:

I was looking into this and it seems that using replacing 
PendingDeprecationWarning with DeprecationWarning fixes the issue. Should I be 
using check_warnings?

Attaching a patch of this so that I can raise a PR for the same.

I grepped for PendingDeprecationWarning and there is a similar crash with 
test_ssl

➜  cpython git:(1bf9cc5) ✗ ./python -Werror -m test -v test_ssl
== CPython 3.7.0 (v3.7.0:1bf9cc5, Jun 28 2018, 11:20:40) [GCC 5.4.0 20160609]
== Linux-4.4.0-127-generic-x86_64-with-debian-stretch-sid little-endian
== cwd: /home/cpython/build/test_python_31365
== CPU count: 1
== encodings: locale=UTF-8, FS=utf-8
Run tests sequentially
0:00:00 load avg: 0.08 [1/1] test_ssl
test test_ssl crashed -- Traceback (most recent call last):
  File "/home/cpython/Lib/test/libregrtest/runtest.py", line 176, in 
runtest_inner
test_runner()
  File "/home/cpython/Lib/test/test_ssl.py", line 4151, in test_main
plat = func()
  File "/home/cpython/Lib/platform.py", line 305, in linux_distribution
"in Python 3.5", DeprecationWarning, stacklevel=2)
DeprecationWarning: dist() and linux_distribution() functions are deprecated in 
Python 3.5

test_ssl failed

== Tests result: FAILURE ==

1 test failed:
test_ssl

Total duration: 194 ms
Tests result: FAILURE

Thanks

--
keywords: +patch
nosy: +xtreak
Added file: https://bugs.python.org/file47657/33988.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33988] [EASY] [3.7] test_platform fails when run with -Werror

2018-06-28 Thread STINNER Victor


STINNER Victor  added the comment:

Python 3.8 (master branch), platform.linux_distribution() and its the tests 
have been removed: see bpo-28167.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33988] [EASY] [3.7] test_platform fails when run with -Werror

2018-06-28 Thread STINNER Victor


New submission from STINNER Victor :

vstinner@apu$ ./python -Werror -m test -v test_platform

==
ERROR: test_dist (test.test_platform.PlatformTest)
--
Traceback (most recent call last):
  File "/home/vstinner/prog/python/3.7/Lib/test/test_platform.py", line 270, in 
test_dist
res = platform.dist()
  File "/home/vstinner/prog/python/3.7/Lib/platform.py", line 379, in dist
"in Python 3.5", DeprecationWarning, stacklevel=2)
DeprecationWarning: dist() and linux_distribution() functions are deprecated in 
Python 3.5

==
ERROR: test_linux_distribution_encoding (test.test_platform.PlatformTest)
--
Traceback (most recent call last):
  File "/home/vstinner/prog/python/3.7/Lib/test/test_platform.py", line 346, in 
test_linux_distribution_encoding
distname, version, distid = platform.linux_distribution()
  File "/home/vstinner/prog/python/3.7/Lib/platform.py", line 305, in 
linux_distribution
"in Python 3.5", DeprecationWarning, stacklevel=2)
DeprecationWarning: dist() and linux_distribution() functions are deprecated in 
Python 3.5

The code calling the deprecated function should be surrounded by something like 
that:

with support.check_warnings(('cgi.parse_qs is deprecated', DeprecationWarning)):

--
components: Tests
keywords: easy
messages: 320657
nosy: vstinner
priority: normal
severity: normal
status: open
title: [EASY] [3.7] test_platform fails when run with -Werror
versions: Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33984] test_multiprocessing_forkserver leaked [1, 2, 1] memory blocks on x86 Gentoo Refleaks 3.x

2018-06-28 Thread STINNER Victor


STINNER Victor  added the comment:

> http://buildbot.python.org/all/#/builders/1/builds/267

Oh, this is: x86 Gentoo Refleaks 3.x.

--

x86 Gentoo Refleaks 3.7 also leaked:
http://buildbot.python.org/all/#/builders/114/builds/150

test_multiprocessing_forkserver leaked [1, 2, 1] memory blocks, sum=4
Re-running failed tests in verbose mode
Re-running test 'test_multiprocessing_forkserver' in verbose mode
test_multiprocessing_forkserver leaked [21, 2, 1] memory blocks, sum=24
test_multiprocessing_forkserver leaked [2, 0, 0] file descriptors, sum=2

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33842] Remove tarfile.filemode

2018-06-28 Thread INADA Naoki


Change by INADA Naoki :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33842] Remove tarfile.filemode

2018-06-28 Thread INADA Naoki


INADA Naoki  added the comment:


New changeset 461a1c4b497e5e118ebb6b77eb59348cc4ec83f9 by INADA Naoki in branch 
'master':
bpo-33842: Remove tarfile.filemode (GH-7661)
https://github.com/python/cpython/commit/461a1c4b497e5e118ebb6b77eb59348cc4ec83f9


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31647] asyncio: StreamWriter write_eof() after close raises mysterious AttributeError

2018-06-28 Thread Ned Deily


Ned Deily  added the comment:


New changeset 0c5918f6f4f113e0c245feac31d00ded29985cce by Ned Deily in branch 
'3.7':
Fix NEWS entry for bpo-31647
https://github.com/python/cpython/commit/0c5918f6f4f113e0c245feac31d00ded29985cce


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33978] logging.config.dictConfig with file handler leaks resources

2018-06-28 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

This seems to be a related issue https://bugs.python.org/issue23010 and fix 
attached but I think it's more towards file handler to be not opened  until 
it's required.

Thanks

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33978] logging.config.dictConfig with file handler leaks resources

2018-06-28 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

I think while initializing it on the second call we just delete the handlers 
list variable which contains references to the file handlers instead of 
properly closing them like it's done in shutdown. handlers is a list of 
weakreferences and I don't know if they will close file handlers or other 
resources automatically as they are deleted. If the initialization is done in a 
loop involving threads then there might be others who are using the handlers as 
we delete them. The attached patch tries to close the handlers before deletion 
thus removing the warning. The same is observed in FileConfig too where 
handlers list is deleted before removal.

shutdown method : 
https://github.com/python/cpython/blob/master/Lib/logging/__init__.py#L1994
deletion of handlers before closing them : 
https://github.com/python/cpython/blob/master/Lib/logging/config.py#L528

I think this is merged from Python 2.7 with commit 
https://github.com/python/cpython/commit/00ee7baf49430d8a6eed355a5fd7a05179325747
 12 years back but doesn't produce any effect on Python 2.7 does -W all or 
-Wall have any effect ? 


Thanks

--
keywords: +patch
nosy: +xtreak
Added file: https://bugs.python.org/file47656/33978.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com