[issue30109] make reindent failed.

2017-04-19 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:


New changeset 58f3c9dc8f5626abe09ac9738c34f6ba99ce2972 by Mariatta in branch 
'master':
bpo-30109: Fix reindent.py (GH-1207)
https://github.com/python/cpython/commit/58f3c9dc8f5626abe09ac9738c34f6ba99ce2972


--

___
Python tracker 

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



[issue30109] make reindent failed.

2017-04-19 Thread Mariatta Wijaya

Changes by Mariatta Wijaya :


--
assignee:  -> Mariatta
nosy: +Mariatta
stage:  -> patch review

___
Python tracker 

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



[issue30109] make reindent failed.

2017-04-19 Thread Mariatta Wijaya

Changes by Mariatta Wijaya :


--
pull_requests: +1329

___
Python tracker 

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



[issue30024] Treat `import a.b.c as m` as `m = sys.modules['a.b.c']`

2017-04-19 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

No, because the compiler generates different arguments for the IMPORT_NAME 
opcode.

--

___
Python tracker 

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



[issue30108] test_site modifies sys.path

2017-04-19 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I'm wondering if the user site directory should be removed in tearDownModule().

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue10379] locale.format() input regression

2017-04-19 Thread Berker Peksag

Changes by Berker Peksag :


--
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



[issue10379] locale.format() input regression

2017-04-19 Thread Berker Peksag

Berker Peksag added the comment:


New changeset 6dbdedb0b18a5ca850ab8ce512fda24d5a9d0688 by Berker Peksag in 
branch 'master':
bpo-10379: Add %char examples to locale.format() docs (GH-1145)
https://github.com/python/cpython/commit/6dbdedb0b18a5ca850ab8ce512fda24d5a9d0688


--

___
Python tracker 

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



[issue30078] "-m unittest --help" says nothing about direct script exection

2017-04-19 Thread Berker Peksag

Berker Peksag added the comment:

Thanks!

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
type:  -> enhancement
versions: +Python 3.5

___
Python tracker 

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



[issue30078] "-m unittest --help" says nothing about direct script exection

2017-04-19 Thread Berker Peksag

Berker Peksag added the comment:


New changeset 596e714d79a22d1d53f26ae1a579dcd43f15865a by Berker Peksag in 
branch '3.6':
bpo-30078: Add an example of passing a path to unittest (GH-1178)
https://github.com/python/cpython/commit/596e714d79a22d1d53f26ae1a579dcd43f15865a


--

___
Python tracker 

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



[issue30078] "-m unittest --help" says nothing about direct script exection

2017-04-19 Thread Berker Peksag

Berker Peksag added the comment:


New changeset 6fb0f801d73b1e2794888772d016d978eccf52a6 by Berker Peksag in 
branch '3.5':
bpo-30078: Add an example of passing a path to unittest (GH-1178)
https://github.com/python/cpython/commit/6fb0f801d73b1e2794888772d016d978eccf52a6


--

___
Python tracker 

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



[issue24739] allow argparse.FileType to accept newline argument

2017-04-19 Thread Berker Peksag

Berker Peksag added the comment:

I agree with paul j3. It would be nice to keep the current FileType API as is. 
The argparse documentation already encourages people to write their own custom 
types and I think this is a good use case for following the advice.

Thanks for the report!

--
nosy: +berker.peksag
resolution:  -> rejected
stage:  -> resolved
status: open -> closed
versions: +Python 3.7 -Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 
3.6

___
Python tracker 

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



[issue19225] lack of PyExc_BufferError doc

2017-04-19 Thread Berker Peksag

Berker Peksag added the comment:

Thanks for the backport PRs!

--
resolution:  -> fixed
stage: backport needed -> 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



[issue19225] lack of PyExc_BufferError doc

2017-04-19 Thread Berker Peksag

Berker Peksag added the comment:


New changeset 450a69c6a4bfee6a10cbcc0c43b221bb135689c8 by Berker Peksag 
(cocoatomo) in branch '2.7':
bpo-19225: Remove duplicated description for standard warning categories 
(GH-1068)
https://github.com/python/cpython/commit/450a69c6a4bfee6a10cbcc0c43b221bb135689c8


--

___
Python tracker 

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



[issue19225] lack of PyExc_BufferError doc

2017-04-19 Thread Berker Peksag

Berker Peksag added the comment:


New changeset 7e56fe35efe3aef0b9aac989255c4f13dfc01b09 by Berker Peksag 
(cocoatomo) in branch '3.5':
bpo-19225: Remove duplicated description for standard warning categories 
(GH-1068)
https://github.com/python/cpython/commit/7e56fe35efe3aef0b9aac989255c4f13dfc01b09


--

___
Python tracker 

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



[issue19225] lack of PyExc_BufferError doc

2017-04-19 Thread Berker Peksag

Berker Peksag added the comment:


New changeset 5fb4bf91e78e128a22b5b58da179f09d0b307f2d by Berker Peksag 
(cocoatomo) in branch '3.6':
bpo-19225: Remove duplicated description for standard warning categories 
(GH-1068)
https://github.com/python/cpython/commit/5fb4bf91e78e128a22b5b58da179f09d0b307f2d


--

___
Python tracker 

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



[issue30078] "-m unittest --help" says nothing about direct script exection

2017-04-19 Thread Berker Peksag

Changes by Berker Peksag :


--
pull_requests: +1328

___
Python tracker 

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



[issue30078] "-m unittest --help" says nothing about direct script exection

2017-04-19 Thread Berker Peksag

Changes by Berker Peksag :


--
pull_requests: +1327

___
Python tracker 

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



[issue30078] "-m unittest --help" says nothing about direct script exection

2017-04-19 Thread Berker Peksag

Berker Peksag added the comment:


New changeset f7e62cf8adfb8ab6a6a870903defe8ff218a0383 by Berker Peksag (Louie 
Lu) in branch 'master':
bpo-30078: Add an example of passing a path to unittest (#1178)
https://github.com/python/cpython/commit/f7e62cf8adfb8ab6a6a870903defe8ff218a0383


--
nosy: +berker.peksag

___
Python tracker 

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



[issue30109] make reindent failed.

2017-04-19 Thread Dong-hee Na

Changes by Dong-hee Na :


--
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



[issue30109] make reindent failed.

2017-04-19 Thread Dong-hee Na

New submission from Dong-hee Na:

When I try to `make reindent`

It was failed with this messages.


./python.exe ./Tools/scripts/reindent.py -r ./Lib
Traceback (most recent call last):
  File "/Users/corona10/cpython/Lib/tokenize.py", line 404, in find_cookie
codec = lookup(encoding)
LookupError: unknown encoding: uft-8

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./Tools/scripts/reindent.py", line 329, in 
main()
  File "./Tools/scripts/reindent.py", line 101, in main
check(arg)
  File "./Tools/scripts/reindent.py", line 115, in check
check(fullname)
  File "./Tools/scripts/reindent.py", line 115, in check
check(fullname)
  File "./Tools/scripts/reindent.py", line 121, in check
encoding, _ = tokenize.detect_encoding(f.readline)
  File "/Users/corona10/cpython/Lib/tokenize.py", line 433, in detect_encoding
encoding = find_cookie(first)
  File "/Users/corona10/cpython/Lib/tokenize.py", line 412, in find_cookie
raise SyntaxError(msg)
SyntaxError: unknown encoding for './Lib/test/bad_coding.py': uft-8
make: *** [reindent] Error 1

```

--
messages: 291935
nosy: corona10
priority: normal
severity: normal
status: open
title: make reindent failed.

___
Python tracker 

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



[issue19225] lack of PyExc_BufferError doc

2017-04-19 Thread KINEBUCHI Tomohiko

Changes by KINEBUCHI Tomohiko :


--
pull_requests: +1326

___
Python tracker 

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



[issue19225] lack of PyExc_BufferError doc

2017-04-19 Thread KINEBUCHI Tomohiko

Changes by KINEBUCHI Tomohiko :


--
pull_requests: +1325

___
Python tracker 

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



[issue19225] lack of PyExc_BufferError doc

2017-04-19 Thread KINEBUCHI Tomohiko

Changes by KINEBUCHI Tomohiko :


--
pull_requests: +1324

___
Python tracker 

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



[issue12414] getsizeof() on code objects is wrong

2017-04-19 Thread Dong-hee Na

Dong-hee Na added the comment:

I create PR 1168 and PR 1198 for master branch and the 3.6 branch.

--

___
Python tracker 

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



[issue12414] getsizeof() on code objects is wrong

2017-04-19 Thread Dong-hee Na

Changes by Dong-hee Na :


--
pull_requests: +1323

___
Python tracker 

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



[issue30106] test_asyncore: test_handle_write() fails in tearDown()

2017-04-19 Thread STINNER Victor

STINNER Victor added the comment:

I started to work on this issue because I noticed many "xxx modified by 
test_xxx" on the two FreeBSD CURRENT buildbots. Examples:

AMD64_FreeBSD_CURRENT_Debug_3.x/163:Warning -- threading._dangling was modified 
by test_logging

AMD64_FreeBSD_CURRENT_Debug_3.x/159:Warning -- asyncore.socket_map was modified 
by test_ssl

--

___
Python tracker 

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



[issue29887] test_normalization doesn't work

2017-04-19 Thread STINNER Victor

STINNER Victor added the comment:

Cool! "x86 Gentoo Installed with X 3.x" succeeded.

--

___
Python tracker 

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



[issue30106] test_asyncore: test_handle_write() fails in tearDown()

2017-04-19 Thread STINNER Victor

STINNER Victor added the comment:

Since my change 7b9619ae249ed637924d1c76687b411061753e5a, test_asyncore now 
fails on the AMD64 FreeBSD CURRENT Debug 3.x buildbot, it wasn't the case 
before. First fail:
http://buildbot.python.org/all/builders/AMD64%20FreeBSD%20CURRENT%20Debug%203.x/builds/174/

--

___
Python tracker 

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



[issue30106] test_asyncore: test_handle_write() fails in tearDown()

2017-04-19 Thread STINNER Victor

STINNER Victor added the comment:

It seems like the change 11470b6dcdbc170779499a4a040b93c842a0d194 fixed 
test_handle_write(), but test_quick_connect() fails on thread.join().

test_quick_connect (test.test_asyncore.TestAPI_UseIPv4Poll) ... Exception in 
thread Thread-2:
Traceback (most recent call last):
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/threading.py", 
line 916, in _bootstrap_inner
self.run()
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/threading.py", 
line 864, in run
self._target(*self._args, **self._kwargs)
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/test_asyncore.py",
 line 785, in 
count=500))
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/asyncore.py", 
line 207, in loop
poll_fun(timeout, map)
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/asyncore.py", 
line 144, in poll
r, w, e = select.select(r, w, e, timeout)
OSError: [Errno 9] Bad file descriptor

FAIL

test_quick_connect (test.test_asyncore.TestAPI_UseIPv4Select) ... Exception in 
thread Thread-3:
Traceback (most recent call last):
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/threading.py", 
line 916, in _bootstrap_inner
self.run()
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/threading.py", 
line 864, in run
self._target(*self._args, **self._kwargs)
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/test_asyncore.py",
 line 785, in 
count=500))
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/asyncore.py", 
line 207, in loop
poll_fun(timeout, map)
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/asyncore.py", 
line 144, in poll
r, w, e = select.select(r, w, e, timeout)
OSError: [Errno 9] Bad file descriptor

FAIL

==
FAIL: test_quick_connect (test.test_asyncore.TestAPI_UseIPv4Poll)
--
Traceback (most recent call last):
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/support/__init__.py",
 line 2042, in decorator
return func(*args)
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/test_asyncore.py",
 line 800, in test_quick_connect
self.fail("join() timed out")
AssertionError: join() timed out

==
FAIL: test_quick_connect (test.test_asyncore.TestAPI_UseIPv4Select)
--
Traceback (most recent call last):
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/support/__init__.py",
 line 2042, in decorator
return func(*args)
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/test_asyncore.py",
 line 800, in test_quick_connect
self.fail("join() timed out")
AssertionError: join() timed out

--

___
Python tracker 

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



[issue25002] Deprecate asyncore/asynchat

2017-04-19 Thread Barry A. Warsaw

Barry A. Warsaw added the comment:

For the archaeologists of the future, smtpd.py is also deprecated in favor of 
aiosmtpd.

http://aiosmtpd.readthedocs.io/en/latest/

--

___
Python tracker 

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



[issue30102] improve performance of libSSL usage on hashing

2017-04-19 Thread STINNER Victor

STINNER Victor added the comment:

> This small change also changes behavior of OpenSSL dramatically.

What do you mean by "dramatically"? What does a openssl.cnf configuration 
contain?

Do other applications using OpenSSL call OPENSSL_config(NULL)?

Since OPENSSL_config() accepts a filename, maybe a first step would be to 
expose the function as ssl.OPENSSL_config(filename) to allow user to load 
*explicitly* a configuration file? ssl.OPENSSL_config() would call 
OPENSSL_config(NULL). Would it work for you, Gustavo?

--

More links:

- https://wiki.openssl.org/index.php/Manual:OPENSSL_config(3)
- https://en.wikibooks.org/wiki/OpenSSL/Initialization

--
nosy: +haypo

___
Python tracker 

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



[issue30106] test_asyncore: test_handle_write() fails in tearDown()

2017-04-19 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 11470b6dcdbc170779499a4a040b93c842a0d194 by Victor Stinner in 
branch 'master':
bpo-30106: Fix tearDown() of test_asyncore (#1194)
https://github.com/python/cpython/commit/11470b6dcdbc170779499a4a040b93c842a0d194


--

___
Python tracker 

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



[issue30024] Treat `import a.b.c as m` as `m = sys.modules['a.b.c']`

2017-04-19 Thread Pavol Lisy

Pavol Lisy added the comment:

Maybe I am wrong but don't we get another weird behavior? 

   import sys.path  # this is error now
   ModuleNotFoundError: No module named 'sys.path'; 'sys' is not a package

So we probably expect same behavior here:

   import sys.path as foo

But if we just replace LOAD_ATTR with IMPORT_FROM in the compiler then wouldn't 
it works like:

   from sys import path as foo

?

--
nosy: +Pavol Lisy

___
Python tracker 

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



[issue29887] test_normalization doesn't work

2017-04-19 Thread STINNER Victor

STINNER Victor added the comment:


New changeset d13d54748d3a7db023d9db37223ea7d40bb8f8e3 by Victor Stinner in 
branch 'master':
bpo-29887: test_normalization handles PermissionError (#1196)
https://github.com/python/cpython/commit/d13d54748d3a7db023d9db37223ea7d40bb8f8e3


--

___
Python tracker 

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



[issue30108] test_site modifies sys.path

2017-04-19 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +1322

___
Python tracker 

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



[issue30108] test_site modifies sys.path

2017-04-19 Thread STINNER Victor

STINNER Victor added the comment:

Ah, I reproduced the bug:

$ rmdir ~/.local/lib/python3.7/site-packages; ./python -m test test_site 
Run tests sequentially
0:00:00 [1/1] test_site
Warning -- sys.path was modified by test_site
  Before: (140302199734024, ['', '/home/haypo/prog/GIT/perf', 
'/usr/local/lib/python37.zip', '/home/haypo/prog/python/master/Lib', 
'/home/haypo/prog/python/master/build/lib.linux-x86_64-3.7'], ['', 
'/home/haypo/prog/GIT/perf', '/usr/local/lib/python37.zip', 
'/home/haypo/prog/python/master/Lib', 
'/home/haypo/prog/python/master/build/lib.linux-x86_64-3.7'])
  After:  (140302199734024, ['', '/home/haypo/prog/GIT/perf', 
'/usr/local/lib/python37.zip', '/home/haypo/prog/python/master/Lib', 
'/home/haypo/prog/python/master/build/lib.linux-x86_64-3.7'], ['', 
'/home/haypo/prog/GIT/perf', '/usr/local/lib/python37.zip', 
'/home/haypo/prog/python/master/Lib', 
'/home/haypo/prog/python/master/build/lib.linux-x86_64-3.7', 
'/home/haypo/.local/lib/python3.7/site-packages']) 
test_site failed (env changed)

1 test altered the execution environment:
test_site

Total duration: 229 ms
Tests result: SUCCESS

--

___
Python tracker 

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



[issue30108] test_site modifies sys.path

2017-04-19 Thread STINNER Victor

New submission from STINNER Victor:

See on Travis CI: https://travis-ci.org/python/cpython/jobs/223771666

Warning -- sys.path was modified by test_site

  Before: (47345855849656, ['', '/usr/local/lib/python37.zip', 
'/home/travis/build/python/cpython/Lib', 
'/home/travis/build/python/cpython/build/lib.linux-x86_64-3.7-pydebug'], ['', 
'/usr/local/lib/python37.zip', '/home/travis/build/python/cpython/Lib', 
'/home/travis/build/python/cpython/build/lib.linux-x86_64-3.7-pydebug'])

  After:  (47345855849656, ['', '/usr/local/lib/python37.zip', 
'/home/travis/build/python/cpython/Lib', 
'/home/travis/build/python/cpython/build/lib.linux-x86_64-3.7-pydebug'], ['', 
'/usr/local/lib/python37.zip', '/home/travis/build/python/cpython/Lib', 
'/home/travis/build/python/cpython/build/lib.linux-x86_64-3.7-pydebug', 
'/home/travis/.local/lib/python3.7/site-packages'])

--
components: Tests
messages: 291923
nosy: haypo
priority: normal
severity: normal
status: open
title: test_site modifies sys.path
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



[issue29887] test_normalization doesn't work

2017-04-19 Thread STINNER Victor

STINNER Victor added the comment:

> The test should try to write the file in a temporary file, or simply skip the 
> test.

I proposed https://github.com/python/cpython/pull/1196 to skip the test in that 
case.

Creating a temporary file is more complex since the API doesn't work as a 
context manager, and it's unclear who would be responsible to remove the 
temporary file.

--

___
Python tracker 

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



[issue29887] test_normalization doesn't work

2017-04-19 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +1321

___
Python tracker 

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



[issue30107] python.core file created when running tests on AMD64 FreeBSD CURRENT Non-Debug 3.x buildbot

2017-04-19 Thread STINNER Victor

New submission from STINNER Victor:

Example of buildbot build which created a python.core file.

Tests crashing Python on purpose should use test.support.SuppressCrashReport. I 
don't see which test can crash in the following list.

http://buildbot.python.org/all/builders/AMD64%20FreeBSD%20CURRENT%20Non-Debug%203.x/builds/175/steps/test/logs/stdio

0:04:54 [132/404/6] test_raise passed -- running: test_subprocess (61 sec)
0:04:54 [133/404/6] test_dict passed -- running: test_subprocess (62 sec)
0:04:54 [134/404/6] test_telnetlib passed -- running: test_subprocess (62 sec)
0:04:55 [135/404/6] test_robotparser passed -- running: test_subprocess (63 sec)
0:04:56 [136/404/6] test_py_compile passed -- running: test_subprocess (64 sec)
0:04:56 [137/404/6] test_listcomps passed -- running: test_subprocess (64 sec)
0:04:56 [138/404/6] test_pty passed -- running: test_subprocess (64 sec)
0:04:56 [139/404/6] test_defaultdict passed -- running: test_subprocess (64 sec)
running: test_io (30 sec), test_subprocess (94 sec)
0:05:27 [140/404/6] test_subprocess passed (94 sec) -- running: test_io (31 sec)
0:05:27 [141/404/6] test_unpack passed -- running: test_io (31 sec)
0:05:28 [142/404/6] test_bytes passed -- running: test_io (33 sec)
0:05:29 [143/404/6] test_weakset passed -- running: test_io (33 sec)
0:05:36 [144/404/6] test_eintr passed -- running: test_io (40 sec)
0:05:37 [145/404/6] test_userstring passed -- running: test_io (41 sec)
0:05:37 [146/404/6] test_support passed -- running: test_io (41 sec)
0:05:37 [147/404/6] test_ioctl skipped -- running: test_io (42 sec)
test_ioctl skipped -- Unable to open /dev/tty
0:05:40 [148/404/6] test_cmd_line passed -- running: test_io (44 sec)
0:05:41 [149/404/6] test_turtle skipped -- running: test_io (45 sec)
test_turtle skipped -- No module named '_tkinter'
0:05:41 [150/404/6] test_subclassinit passed -- running: test_io (45 sec)
0:05:42 [151/404/6] test_set passed -- running: test_io (46 sec)
0:05:43 [152/404/6] test_xml_etree_c passed -- running: test_io (47 sec)
0:05:43 [153/404/6] test_binascii passed -- running: test_io (47 sec)
0:05:48 [154/404/6] test_normalization passed -- running: test_io (52 sec)
fetching http://www.pythontest.net/unicode/9.0.0/NormalizationTest.txt ...
0:05:49 [155/404/6] test_os passed -- running: test_io (54 sec)
stty: stdin isn't a terminal
0:05:50 [156/404/6] test_abc passed -- running: test_io (54 sec)
0:05:50 [157/404/6] test_dummy_threading passed -- running: test_io (54 sec)
0:05:50 [158/404/6] test_pkgutil passed -- running: test_io (54 sec)
0:05:50 [159/404/6] test_compile passed -- running: test_io (55 sec)
0:05:51 [160/404/6] test_largefile passed -- running: test_io (55 sec)
0:05:54 [161/404/6] test_io failed (env changed) (57 sec)
test_BufferedIOBase_destructor (test.test_io.CIOTest) ... ok
...
test_interrupted_write_unbuffered (test.test_io.PySignalsTest) ... ok
--
Ran 565 tests in 57.439s

OK (skipped=2)
Warning -- files was modified by test_io
  Before: []
  After:  ['python.core']

--
components: Tests
messages: 291921
nosy: haypo, koobs
priority: normal
severity: normal
status: open
title: python.core file created when running tests on AMD64 FreeBSD CURRENT 
Non-Debug 3.x buildbot
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



[issue30106] test_asyncore: test_handle_write() fails in tearDown()

2017-04-19 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +1320

___
Python tracker 

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



[issue30106] test_asyncore: test_handle_write() fails in tearDown()

2017-04-19 Thread STINNER Victor

New submission from STINNER Victor:

On the AMD64 FreeBSD CURRENT Non-Debug 3.x buildbot, test_handle_write() of 
test_asyncore now fails on calling asyncore.close_all() in tearDown().

Moreover, since my commit 7b9619ae249ed637924d1c76687b411061753e5a, the 
following test_quick_connect() now fails on self.fail("join() timed out"). I 
guess that asyncore.socket_map still contains unwanted sockets from 
test_handle_write() which failed.

Attached PR should fix the test_handle_write() failure by calling 
asyncore.close_all() with ignore_all=True.

http://buildbot.python.org/all/builders/AMD64%20FreeBSD%20CURRENT%20Non-Debug%203.x/builds/174/steps/test/logs/stdio

==
ERROR: test_handle_write (test.test_asyncore.TestAPI_UseIPv6Poll)
--
Traceback (most recent call last):
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current.nondebug/build/Lib/test/test_asyncore.py",
 line 505, in tearDown
asyncore.close_all()
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current.nondebug/build/Lib/asyncore.py",
 line 561, in close_all
x.close()
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current.nondebug/build/Lib/asyncore.py",
 line 397, in close
self.socket.close()
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current.nondebug/build/Lib/socket.py",
 line 417, in close
self._real_close()
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current.nondebug/build/Lib/socket.py",
 line 411, in _real_close
_ss.close(self)
ConnectionResetError: [Errno 54] Connection reset by peer

==
FAIL: test_quick_connect (test.test_asyncore.TestAPI_UseIPv6Poll)
--
Traceback (most recent call last):
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current.nondebug/build/Lib/test/support/__init__.py",
 line 2042, in decorator
return func(*args)
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current.nondebug/build/Lib/test/test_asyncore.py",
 line 800, in test_quick_connect
self.fail("join() timed out")
AssertionError: join() timed out

--
components: Tests
messages: 291920
nosy: haypo
priority: normal
severity: normal
status: open
title: test_asyncore: test_handle_write() fails in tearDown()
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



[issue30105] Duplicated connection_made() call for some SSL connections

2017-04-19 Thread kyuupichan

New submission from kyuupichan:

An asyncio SSL server frequently sees duplicated connection_made() calls for an 
incoming SSL connection.  It does not happen to all SSL connections; perhaps 
10-25% of them.  It never happens to TCP connections. 

Here are some examples of logs from one I run.  I see this on MacOSX and 
DragonflyBSD, others have reported the same on Linux, so I believe it's a quirk 
in asyncio and not O/S specific.  I assume it is a bug in the wrapping of the 
raw TCP transport with an SSL one.

2017-04-20 07:22:44.676180500 INFO:ElectrumX:[14755] SSL 218.185.137.81:52844, 
256 total
2017-04-20 07:22:45.666747500 INFO:ElectrumX:[14756] SSL 218.185.137.81:52847, 
256 total

The log is output on a connection_made() callback to a protocol, and not from 
the protocol's constructor.  They are very close together, from the same IP 
address and ports that are close together.  The first connection was closed 
with connection_lost() before the 2nd connection_made() because the total 
session count (here 256) did not increase.

Here is another section of my log with 2 more examples.  Totals are not 
monotonic because of course disconnections (not logged) happen all the time.

2017-04-20 07:30:31.529671500 INFO:ElectrumX:[14796] SSL 193.90.12.86:42262, 
259 total
2017-04-20 07:31:04.434559500 INFO:ElectrumX:[14797] SSL 70.199.157.209:10851, 
259 total
2017-04-20 07:31:05.765178500 INFO:ElectrumX:[14798] SSL 70.199.157.209:10877, 
259 total
2017-04-20 07:31:32.305260500 INFO:ElectrumX:[14799] SSL 64.113.32.29:35025, 
256 total
2017-04-20 07:31:44.731859500 INFO:ElectrumX:[14800] SSL 188.107.123.236:60867, 
255 total
2017-04-20 07:31:45.504245500 INFO:ElectrumX:[14801] SSL 188.107.123.236:60868, 
255 total
2017-04-20 07:31:48.943430500 INFO:ElectrumX:[14802] SSL 136.24.49.122:54987, 
255 total
2017-04-20 07:31:59.967676500 INFO:ElectrumX:[14803] TCP 113.161.81.136:2559, 
256 total
2017-04-20 07:32:03.249780500 INFO:ElectrumX:[14804] SSL 69.121.8.201:63409, 
256 total

Another reason I believe this is an asyncio issue on the server side is that 
someone else's server software that doesn't use asyncio logs in a similar way 
and does not see duplicated incoming "connections".

--
components: asyncio
messages: 291919
nosy: kyuupichan, yselivanov
priority: normal
severity: normal
status: open
title: Duplicated connection_made() call for some SSL connections
type: behavior
versions: Python 3.5, Python 3.6

___
Python tracker 

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



[issue30100] WeakSet should all discard and remove on items that can have weak references

2017-04-19 Thread donkopotamus

donkopotamus added the comment:

Just to add, I framed this slightly wrongly by using a list [] as an example, 
whereas my original motivating case was objects that are hashable but not 
weakly referenceable.   (eg () ).

So there are two cases to consider ... what to do in discard/remove etc when 
the value is (i) not weakly referenceable, and (ii) when the value is not 
hashable.

--

___
Python tracker 

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



[issue30030] Simplify _RandomNameSequence

2017-04-19 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

test_threadedtempfile passed on Linux, but randomly failed on Windows. :( And 
_RandomNameSequence is used not only in tempfile.

I suggest to wait until add a wrapper that makes generators thread-safe. Since 
it added we could restore the generator implementation of _RandomNameSequence.

--

___
Python tracker 

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



[issue30030] Simplify _RandomNameSequence

2017-04-19 Thread STINNER Victor

STINNER Victor added the comment:

> Remoe _get_candidate_names() and the global _name_sequence

I understood the rationale behind _get_candidate_names() is to prevent 
generating the same name when _RandomNameSequence() uses random.Random. Since 
my change uses random.SystemRandom, I consider that it's now ok to create 
multiple generators in paralle. Is that rationale correct?

--

___
Python tracker 

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



[issue19764] subprocess: use PROC_THREAD_ATTRIBUTE_HANDLE_LIST with STARTUPINFOEX on Windows Vista

2017-04-19 Thread Segev Finer

Segev Finer added the comment:

Added the 4th version after review by eryksun (In rietveld).

--
Added file: 
http://bugs.python.org/file46814/windows-subprocess-close-fds-v4.patch

___
Python tracker 

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



[issue30030] Simplify _RandomNameSequence

2017-04-19 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This isn't a different approach and this doesn't work because generators are 
not thread-safe.

--

___
Python tracker 

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



[issue30030] Simplify _RandomNameSequence

2017-04-19 Thread STINNER Victor

STINNER Victor added the comment:

I reopen the issue to propose a different approach: 
https://github.com/python/cpython/pull/1191 replaces Random with SystemRandom 
and drops get_candidate_names().

@Serhiy: I hesitated to add you as a co-author, but I'm not sure that you like 
my approach :-) Tell me what do you think. At least, I reused your docstring 
and your updated unit test!

--
resolution: rejected -> 
status: closed -> open

___
Python tracker 

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



[issue30030] Simplify _RandomNameSequence

2017-04-19 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +1319

___
Python tracker 

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



[issue30078] "-m unittest --help" says nothing about direct script exection

2017-04-19 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +ezio.melotti, michael.foord, rbcollins
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



[issue25002] Deprecate asyncore/asynchat

2017-04-19 Thread Guido van Rossum

Guido van Rossum added the comment:

Sounds good.

--
resolution:  -> fixed
stage: needs patch -> 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



[issue30065] Insufficient validation in _posixsubprocess.fork_exec()

2017-04-19 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
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



[issue30065] Insufficient validation in _posixsubprocess.fork_exec()

2017-04-19 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset c97c1914f401359f2a7e6c8e0364e71ad9fb5bc8 by Serhiy Storchaka in 
branch '3.5':
[3.5] bpo-30065: Fixed arguments validation in _posixsubprocess.fork_exec(). 
(GH-1110) (#1190)
https://github.com/python/cpython/commit/c97c1914f401359f2a7e6c8e0364e71ad9fb5bc8


--

___
Python tracker 

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



[issue30070] Fix errors handling in the parser module

2017-04-19 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
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



[issue30070] Fix errors handling in the parser module

2017-04-19 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset 2a1bf0633cd0c55662df7875ee2b1654251adf6b by Serhiy Storchaka in 
branch '2.7':
[2.7] [3.5] bpo-30070: Fixed leaks and crashes in errors handling in the parser 
module. (GH-1131). (GH-1185) (#1189)
https://github.com/python/cpython/commit/2a1bf0633cd0c55662df7875ee2b1654251adf6b


--

___
Python tracker 

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



[issue25002] Deprecate asyncore/asynchat

2017-04-19 Thread STINNER Victor

STINNER Victor added the comment:

I suggest to close this issue and instead work on the the issue #28533: modify 
code using asyncore to use something else.

--

___
Python tracker 

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



[issue28533] Replace asyncore

2017-04-19 Thread STINNER Victor

STINNER Victor added the comment:

asyncore was modified to emit a DeprecationWarning:
http://bugs.python.org/issue25002#msg279417

But then a lot of code starts with to fail -Werror.

Copy of Martin Panter's msg279469:

I normally run the tests with -Werror, and the failures I get are:

* test_ssl, test_smtplib, test_poplib, test_logging, test_ftplib, test_support: 
tests use asyncore
* test_os: test uses asynchat (When you import asynchat, the first error 
complains about importing asyncore, there are actually two warnings)
* test_all: This seems to ignore DeprecationWarning; perhaps an exception for 
PendingDeprecationWarning should also be added?
* test_asyncore and test_asynchat: Obviously these have to still test the 
modules, so they should anticipate the warnings, perhaps using Serhiy’s code
* test_smtpd: smtpd module itself uses asyncore; see Issue 25008

--

___
Python tracker 

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



[issue28533] Replace asyncore

2017-04-19 Thread STINNER Victor

STINNER Victor added the comment:

> asyncore is still used in several tests and should be replaced.

Here is the list of Python files using asyncore:

haypo@selma$ grep -l asyncore $(find -name "*.py")
./Lib/asyncore.py
./Lib/asynchat.py
./Lib/test/test_smtpd.py
./Lib/test/test_asyncore.py
./Lib/test/test_smtplib.py
./Lib/test/test_os.py
./Lib/test/test_ssl.py
./Lib/test/test_logging.py
./Lib/test/libregrtest/save_env.py
./Lib/test/test_asynchat.py
./Lib/test/test_pyclbr.py
./Lib/test/test_support.py
./Lib/test/test_poplib.py
./Lib/test/test_ftplib.py
./Lib/smtpd.py

smtpd has been rewritten with asyncio:
http://aiosmtpd.readthedocs.io/

The documentation of the smtpd module already points to aiosmtpd.

libregrtest/save_env.py only checks that asyncore.socket_map is not modified, 
we can keep it until asyncore is really removed.

test_support.py only tests that it's possible to have a "clean" import of 
asyncore, it can be easily be replaced later.

The list can reduced to:

./Lib/test/test_smtplib.py
./Lib/test/test_os.py
./Lib/test/test_ssl.py
./Lib/test/test_logging.py
./Lib/test/test_pyclbr.py
./Lib/test/test_poplib.py
./Lib/test/test_ftplib.py

--
nosy: +haypo

___
Python tracker 

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



[issue30065] Insufficient validation in _posixsubprocess.fork_exec()

2017-04-19 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
pull_requests: +1318

___
Python tracker 

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



[issue30070] Fix errors handling in the parser module

2017-04-19 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
pull_requests: +1317

___
Python tracker 

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



[issue30030] Simplify _RandomNameSequence

2017-04-19 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you Victor. I was going to do this but was unable to do this because I 
was out of my developing environment.

--
resolution:  -> rejected
status: open -> closed

___
Python tracker 

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



[issue30065] Insufficient validation in _posixsubprocess.fork_exec()

2017-04-19 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset e2546172622dd52692cf0e26c2b931f942f345b6 by Serhiy Storchaka in 
branch '3.6':
[3.6] bpo-30065: Fixed arguments validation in _posixsubprocess.fork_exec(). 
(GH-1110) (#1186)
https://github.com/python/cpython/commit/e2546172622dd52692cf0e26c2b931f942f345b6


--

___
Python tracker 

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



[issue30030] Simplify _RandomNameSequence

2017-04-19 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 1e62bf145b4865d03a29a5720a4eb84c321a9829 by Victor Stinner in 
branch 'master':
bpo-30030: Revert f50354ad (tempfile) (#1187)
https://github.com/python/cpython/commit/1e62bf145b4865d03a29a5720a4eb84c321a9829


--

___
Python tracker 

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



[issue30070] Fix errors handling in the parser module

2017-04-19 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset 952a05e4e2cf082b74a1676a2804f1f43a9b7702 by Serhiy Storchaka in 
branch '3.5':
[3.5] bpo-30070: Fixed leaks and crashes in errors handling in the parser 
module. (GH-1131). (#1185)
https://github.com/python/cpython/commit/952a05e4e2cf082b74a1676a2804f1f43a9b7702


--

___
Python tracker 

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



[issue30030] Simplify _RandomNameSequence

2017-04-19 Thread STINNER Victor

STINNER Victor added the comment:

Until a solution is found, I proposed to revert the change to "repair" 
buildbots.

See also the python-ideas thread: [Python-ideas] Thread-safe generators
https://mail.python.org/pipermail/python-ideas/2017-April/045427.html

--

___
Python tracker 

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



[issue30104] Float rounding errors on AMD64 FreeBSD CURRENT Debug 3.x buildbot

2017-04-19 Thread STINNER Victor

Changes by STINNER Victor :


--
components: +Interpreter Core, Tests
nosy: +mark.dickinson

___
Python tracker 

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



[issue30104] Float rounding errors on AMD64 FreeBSD CURRENT Debug 3.x buildbot

2017-04-19 Thread STINNER Victor

New submission from STINNER Victor:

Since the build 154, many tests fail on the AMD64 FreeBSD CURRENT Debug 3.x 
buildbot slave because of float rounding errors. Failing tests:

* test_cmath
* test_float
* test_json
* test_marshal
* test_math
* test_statistics
* test_strtod

http://buildbot.python.org/all/builders/AMD64%20FreeBSD%20CURRENT%20Non-Debug%203.x/builds/154/steps/test/logs/stdio

Problem: none of build 154 changes are related to floats

* commit f9f87f0934ca570293ba7194bed3448a7f9bf39c
* commit 947629916a5ecb1f6f6792e9b9234e084c5bf274

It looks more like a libc change of the FreeBSD CURRENT slave.

Example of errors:

==
FAIL: test_specific_values (test.test_cmath.CMathTests)
--
Traceback (most recent call last):
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current.nondebug/build/Lib/test/test_cmath.py",
 line 420, in test_specific_values
msg=error_message)
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current.nondebug/build/Lib/test/test_cmath.py",
 line 149, in rAssertAlmostEqual
'{!r} and {!r} are not sufficiently close'.format(a, b))
AssertionError: acos0036: acos(complex(-1.0002, 0.0))
Expected: complex(3.141592653589793, -0.04471763360830684)
Received: complex(3.141592653589793, -0.04471763360829195)
Received value insufficiently close to expected value.

==
FAIL: test_floats (test.test_json.test_float.TestPyFloat)
--
Traceback (most recent call last):
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/test_json/test_float.py",
 line 8, in test_floats
self.assertEqual(float(self.dumps(num)), num)
AssertionError: 1.9275814160560202e-50 != 1.9275814160560204e-50

FAIL: test_bigcomp (test.test_strtod.StrtodTests)
--
Traceback (most recent call last):
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current.nondebug/build/Lib/test/test_strtod.py",
 line 213, in test_bigcomp
self.check_strtod(s)
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current.nondebug/build/Lib/test/test_strtod.py",
 line 104, in check_strtod
"expected {}, got {}".format(s, expected, got))
AssertionError: '0x1.8265ea9f864bcp+579' != '0x1.8265ea9f864bdp+579'
- 0x1.8265ea9f864bcp+579
? ^
+ 0x1.8265ea9f864bdp+579
? ^
 : Incorrectly rounded str->float conversion for 29865e170: expected 
0x1.8265ea9f864bcp+579, got 0x1.8265ea9f864bdp+579

--
messages: 291901
nosy: haypo, koobs
priority: normal
severity: normal
status: open
title: Float rounding errors on AMD64 FreeBSD CURRENT Debug 3.x buildbot
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



[issue30030] Simplify _RandomNameSequence

2017-04-19 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +1316

___
Python tracker 

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



[issue19764] subprocess: use PROC_THREAD_ATTRIBUTE_HANDLE_LIST with STARTUPINFOEX on Windows Vista

2017-04-19 Thread Eryk Sun

Eryk Sun added the comment:

In case you didn't get notified by Rietveld, I made a couple suggestions on 
your latest patch. Also, if you wouldn't mind, please update the patch to apply 
cleanly to 3.7 -- especially since STARTUPINFO now has an __init__ method.

--

___
Python tracker 

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



[issue30065] Insufficient validation in _posixsubprocess.fork_exec()

2017-04-19 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
pull_requests: +1315

___
Python tracker 

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



[issue30070] Fix errors handling in the parser module

2017-04-19 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset 39dedb6e1a18069ce8f5c8e6076e9d9ef9d6d515 by Serhiy Storchaka in 
branch '3.6':
[3.6] bpo-30070: Fixed leaks and crashes in errors handling in the parser 
module. (GH-1131). (#1184)
https://github.com/python/cpython/commit/39dedb6e1a18069ce8f5c8e6076e9d9ef9d6d515


--

___
Python tracker 

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



[issue30070] Fix errors handling in the parser module

2017-04-19 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
pull_requests: +1314

___
Python tracker 

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



[issue30061] Check if PyObject_Size() raised an error

2017-04-19 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
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



[issue30061] Check if PyObject_Size() raised an error

2017-04-19 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset 64aa4df8502ca5d0a8ffb767ff97f625625c758c by Serhiy Storchaka in 
branch '2.7':
[2.7] bpo-30061: Check if PyObject_Size()/PySequence_Size()/PyMapping_Size() 
(GH-1096) (GH-1180) (#1183)
https://github.com/python/cpython/commit/64aa4df8502ca5d0a8ffb767ff97f625625c758c


--

___
Python tracker 

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



[issue30102] improve performance of libSSL usage on hashing

2017-04-19 Thread Gustavo Serra Scalet

Gustavo Serra Scalet added the comment:

> Christian Heimes added the comment:
> 
> This small change also changes behavior of OpenSSL dramatically. What
> are your Python and OpenSSL versions? 

I tested by compiling my own python3 (8aaf499) against its parent (d6d344d) For 
python2, I made the same by compiling the 2.7.13 as a baseline and results were 
consistent with the python I have on Ubuntu 17.10 (3.5.3 and 2.7.13).

> How did you profile the
> performance of the hashing functions?

I compared the timings between my patched vs patchless python versions by using 
a 630MB file to calculate sha256 as:

perf stat -r 10 Python-2.7.13/python -c "import hashlib; 
print(hashlib.sha256(open('ubuntu-16.10-server-ppc64el.iso','rb').read()).hexdigest())"

The speedup of ~50% is given due to patchless taking 3.082156387s and patched 
taking 2.027484800s (errors are less than 1%)

I also noticed what changed on a code level by checking with gdb what is being 
executed on the sha loop. After my patch I see altivec (SIMD) functions being 
used on SHA main loop.

> If OpenSSL_config() really improves performance on relevant platforms,
> then we should be consistent and call it in _ssl.c, too.

I'll check that then. Thanks for the hint.

Ps: please note this behavior is noticed on a POWER8 machine. I'm not an 
OpenSSL expert so I don't know if there are now more optimizations enabled on 
other architectures as well.

--

___
Python tracker 

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



[issue30070] Fix errors handling in the parser module

2017-04-19 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
pull_requests: +1313

___
Python tracker 

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



[issue30061] Check if PyObject_Size() raised an error

2017-04-19 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset e63af29c87b44bb7ada5783cd0ff6ee6d4f9c17c by Serhiy Storchaka in 
branch '3.5':
[3.5] bpo-30061: Check if PyObject_Size()/PySequence_Size()/PyMapping_Size() 
(GH-1096) (GH-1180) (#1182)
https://github.com/python/cpython/commit/e63af29c87b44bb7ada5783cd0ff6ee6d4f9c17c


--

___
Python tracker 

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



[issue30102] improve performance of libSSL usage on hashing

2017-04-19 Thread Christian Heimes

Christian Heimes added the comment:

This small change also changes behavior of OpenSSL dramatically. What are your 
Python and OpenSSL versions? How did you profile the performance of the hashing 
functions?

If OpenSSL_config() really improves performance on relevant platforms, then we 
should be consistent and call it in _ssl.c, too.

--

___
Python tracker 

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



[issue30061] Check if PyObject_Size() raised an error

2017-04-19 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
pull_requests: +1312

___
Python tracker 

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



[issue30061] Check if PyObject_Size() raised an error

2017-04-19 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
pull_requests: +1311

___
Python tracker 

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



[issue30103] uu package uses old encoding

2017-04-19 Thread R. David Murray

Changes by R. David Murray :


--
type: behavior -> enhancement
versions: +Python 3.7 -Python 3.4

___
Python tracker 

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



[issue30103] uu package uses old encoding

2017-04-19 Thread R. David Murray

Changes by R. David Murray :


--
components: +Library (Lib) -Extension Modules

___
Python tracker 

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



[issue30061] Check if PyObject_Size() raised an error

2017-04-19 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset 680fea4067537a9b9c79aadd44a3a19e83cd2dbf by Serhiy Storchaka in 
branch '3.6':
bpo-30061: Check if PyObject_Size()/PySequence_Size()/PyMapping_Size() (#1096) 
(#1180)
https://github.com/python/cpython/commit/680fea4067537a9b9c79aadd44a3a19e83cd2dbf


--

___
Python tracker 

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



[issue30103] uu package uses old encoding

2017-04-19 Thread Kyle Glowacki

New submission from Kyle Glowacki:

Looking in the man pages for the uuencode and uudecode 
(http://www.manpagez.com/man/5/uuencode/), I see that the encoding used to go 
from ascii 32 to 95 but that 32 is deprecated and generally newer releases go 
from 33-96 (with 96 being used in place of 32).   This replaces the " " in the 
encoding with "`".  

For example, the newest version of busybox only accepts the new encoding.

The uu package has no way to specify to use this new encoding making it a pain 
to integrate.   Oddly, the uu.decode function does properly decode files 
encoded using "`", but encode is unable to create them.

--
components: Extension Modules
messages: 291893
nosy: LawfulEvil
priority: normal
severity: normal
status: open
title: uu package uses old encoding
type: behavior
versions: Python 3.4

___
Python tracker 

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



[issue27869] test failures under Bash on Windows / WSL

2017-04-19 Thread Brett Cannon

Changes by Brett Cannon :


--
title: test failures under Bash on Windows -> test failures under Bash on 
Windows / WSL

___
Python tracker 

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



[issue30102] improve performance of libSSL usage on hashing

2017-04-19 Thread Gustavo Serra Scalet

Changes by Gustavo Serra Scalet :


--
pull_requests: +1309

___
Python tracker 

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



[issue30102] improve performance of libSSL usage on hashing

2017-04-19 Thread Gustavo Serra Scalet

New submission from Gustavo Serra Scalet:

To correctly pick the best algorithm for the current architecture,
libssl needs to have OPENSSL_config(NULL) called as described on:
https://wiki.openssl.org/index.php/Libcrypto_API

This short change lead to a speedup of 50% on POWER8 when using
hashlib.sha256 digest functionality as it now uses a SIMD approach that was 
already existing but not used by cpython.

--
assignee: christian.heimes
components: SSL
messages: 291892
nosy: christian.heimes, gut
priority: normal
severity: normal
status: open
title: improve performance of libSSL usage on hashing
type: enhancement
versions: Python 2.7, Python 3.7

___
Python tracker 

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



[issue30065] Insufficient validation in _posixsubprocess.fork_exec()

2017-04-19 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset 66bffd1663489d080349debbf1b472d432351038 by Serhiy Storchaka in 
branch 'master':
bpo-30065: Fixed arguments validation in _posixsubprocess.fork_exec(). (#1110)
https://github.com/python/cpython/commit/66bffd1663489d080349debbf1b472d432351038


--

___
Python tracker 

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



[issue30070] Fix errors handling in the parser module

2017-04-19 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset a79f4c219531c05fc8f670c1e4bbf12c081935d3 by Serhiy Storchaka in 
branch 'master':
bpo-30070: Fixed leaks and crashes in errors handling in the parser module. 
(#1131)
https://github.com/python/cpython/commit/a79f4c219531c05fc8f670c1e4bbf12c081935d3


--

___
Python tracker 

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



[issue22352] Ensure opcode names and args fit in disassembly output

2017-04-19 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
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



[issue22352] Ensure opcode names and args fit in disassembly output

2017-04-19 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset d90045f319e2ea9772b9fbd62a05fdf34af96b6c by Serhiy Storchaka in 
branch 'master':
bpo-22352: Adjust widths in the output of dis.dis() for large line numbers and 
(#1153)
https://github.com/python/cpython/commit/d90045f319e2ea9772b9fbd62a05fdf34af96b6c


--

___
Python tracker 

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



[issue30061] Check if PyObject_Size() raised an error

2017-04-19 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
pull_requests: +1308

___
Python tracker 

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



[issue30101] Add support for ncurses A_ITALIC

2017-04-19 Thread Eijebong

Changes by Eijebong :


--
components: Library (Lib)
nosy: Eijebong
priority: normal
pull_requests: 1307
severity: normal
status: open
title: Add support for ncurses A_ITALIC
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



[issue30061] Check if PyObject_Size() raised an error

2017-04-19 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset bf623ae8843dc30b28c574bec8d29fc14be59d86 by Serhiy Storchaka in 
branch 'master':
bpo-30061: Check if PyObject_Size()/PySequence_Size()/PyMapping_Size() (#1096)
https://github.com/python/cpython/commit/bf623ae8843dc30b28c574bec8d29fc14be59d86


--

___
Python tracker 

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



[issue21150] Add quick links table to argparse docs

2017-04-19 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
nosy: +bethard

___
Python tracker 

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



[issue21150] Add quick links table to argparse docs

2017-04-19 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Gaurav, overall this looks nice.  

I would drop the example column because it will make the row too wide for 
viewing.  Alternatively, put the examples in a separate table (as was done for 
the combinatoric functions in the itertools docs: 
https://docs.python.org/3/library/itertools.html#module-itertools ).

--

___
Python tracker 

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



[issue21150] Add quick links table to argparse docs

2017-04-19 Thread Louie Lu

Changes by Louie Lu :


--
nosy: +louielu

___
Python tracker 

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



[issue30061] Check if PyObject_Size() raised an error

2017-04-19 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka

___
Python tracker 

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



[issue27727] Update Tools/freeze to use .vcxproj files

2017-04-19 Thread Kaeptm Blaubaer

Changes by Kaeptm Blaubaer :


--
resolution: duplicate -> 

___
Python tracker 

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



  1   2   >