[issue31453] ssl.PROTOCOL_TLS only select TLSv1.2

2017-09-13 Thread Alex Gaynor
Alex Gaynor added the comment: What operating system are you on? -- nosy: +Alex Gaynor ___ Python tracker ___ ___ Python-bugs-list ma

[issue31438] IDLE 3 crashes and quits when caret character typed

2017-09-13 Thread ALPER PAKSOY
ALPER PAKSOY added the comment: I downloaded and installed TCL 8.6.6.8606 and restarted my computer. I verified that the new version was installed. Unfortunately the problem has not been solved. Thank you. Alper -- ___ Python tracker

[issue31452] asyncio.gather does not cancel tasks if one fails

2017-09-13 Thread Andrew Lytvyn
New submission from Andrew Lytvyn: If you do not await gather, then if one of gather inner coroutines fails, others keep working, but they should not. ```python import asyncio import logging logging.basicConfig(level=logging.DEBUG) loop = asyncio.get_event_loop() async def success_coro(seco

[issue31234] Make support.threading_cleanup() stricter

2017-09-13 Thread STINNER Victor
STINNER Victor added the comment: test_ssl: test_recv_zero (test.test_ssl.ThreadedTests) ... server: new connection from ('127.0.0.1', 54502) server: connection cipher is now ('ECDHE-RSA-AES256-SHA', 'TLSv1/SSLv3', 256) server: selected protocol is now None Warning -- threading_cleanup() fa

[issue31451] PYTHONHOME is not absolutized

2017-09-13 Thread Xiang Zhang
New submission from Xiang Zhang: I find that PYTHONHOME is not absolutized even after VM initialization. So sys.prefix will be "usr" if I execute `PYTHONHOME=usr python`. This could lead to libraries like pip to fail if the current directory is changed, such as by `os.chdir`. I am not sure t

[issue31234] Make support.threading_cleanup() stricter

2017-09-13 Thread STINNER Victor
STINNER Victor added the comment: New changeset b157ce1e58b03988ce4340a55d0b856125833cc5 by Victor Stinner in branch 'master': bpo-31234: Fix dangling thread in test_ftplib (#3544) https://github.com/python/cpython/commit/b157ce1e58b03988ce4340a55d0b856125833cc5 -- __

[issue31449] Potential DoS Attack when Parsing Email with Huge Number of MIME Parts

2017-09-13 Thread R. David Murray
R. David Murray added the comment: 10 million mime parts? That sounds like the kind of thing rfc 1870 was designed to address in a more general fashion (ie: the SMTP server should be enforcing maximum message size if you are worried about DOS attacks). 1 million = 3 seconds, 10 million = "ove

[issue31447] proc communicate not exiting on python subprocess timeout using PIPES

2017-09-13 Thread R. David Murray
Changes by R. David Murray : -- nosy: +r.david.murray ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue31443] Possibly out of date C extension documentation

2017-09-13 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: On Windows at least: I think "another C module" should be understood as "another DLL or executable". A user extension module is a different DLL from the core Python, so the advice is still valid. -- nosy: +amaury.forgeotdarc ___

[issue31234] Make support.threading_cleanup() stricter

2017-09-13 Thread STINNER Victor
Changes by STINNER Victor : -- pull_requests: +3538 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue31448] test_poplib started to log a lot of ResourceWarning warnings on AMD64 Windows8.1 Refleaks 3.x

2017-09-13 Thread STINNER Victor
STINNER Victor added the comment: New changeset 769ddb075ac3a840d473930a12a5b72bfbab366f by Victor Stinner (Miss Islington (bot)) in branch '3.6': [3.6] bpo-31448, test_poplib: Fix ResourceWarning (GH-3542) (#3543) https://github.com/python/cpython/commit/769ddb075ac3a840d473930a12a5b72bfbab366

[issue31441] Descriptor example in documentation is confusing, possibly wrong

2017-09-13 Thread R. David Murray
R. David Murray added the comment: Here is a not-much-more-complicated version that solves the problem. It is probably worth changing as the revised example makes clear the difference between self and obj, which is an important distinction. class RevealAccess(object):

[issue31447] proc communicate not exiting on python subprocess timeout using PIPES

2017-09-13 Thread Leonardo Francalanci
Leonardo Francalanci added the comment: (forgot: Issue 26534 is about shell=True, I use shell=False, right?) -- ___ Python tracker ___ __

[issue30566] punycode codec raises IndexError in decode_generalized_number()

2017-09-13 Thread Vikram Hegde
Vikram Hegde added the comment: Could someone please review my PR. It has been in the pending state for over three months. -- nosy: +vikhegde ___ Python tracker ___ ___

[issue31448] test_poplib started to log a lot of ResourceWarning warnings on AMD64 Windows8.1 Refleaks 3.x

2017-09-13 Thread Roundup Robot
Changes by Roundup Robot : -- pull_requests: +3537 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue31447] proc communicate not exiting on python subprocess timeout using PIPES

2017-09-13 Thread Leonardo Francalanci
Leonardo Francalanci added the comment: thank you for your replies! I used waitfor because it's the simplest and shortest way to have reproducible code. The issue I'm having is obviously not with waitfor, but with another exe, but this doesn't change the fact that I need a way to exit as soon

[issue31448] test_poplib started to log a lot of ResourceWarning warnings on AMD64 Windows8.1 Refleaks 3.x

2017-09-13 Thread STINNER Victor
STINNER Victor added the comment: New changeset d165e14e29b45a22450263722f5c2c386c3a748a by Victor Stinner in branch 'master': bpo-31448, test_poplib: Fix ResourceWarning (#3542) https://github.com/python/cpython/commit/d165e14e29b45a22450263722f5c2c386c3a748a --

[issue31447] proc communicate not exiting on python subprocess timeout using PIPES

2017-09-13 Thread Martin Panter
Martin Panter added the comment: I’m not familiar with Windows commands or processes enough, but going by Erik’s comment, this sounds similar to Issue 26534 and Issue 30154. Doesn’t your “waitfor” command inherit the same parent process’s stdout etc pipes? -- nosy: +martin.panter

[issue31450] Subprocess exceptions re-raised in parent process do not have child_traceback attribute

2017-09-13 Thread Christian Heimes
Christian Heimes added the comment: Documentation and implementation are out of sync. Python 3's subprocess module no longer sets child_traceback. I checked 3.3 to master. The assignment has been removed. -- nosy: +christian.heimes, gregory.p.smith versions: +Python 3.7 __

[issue30188] test_nntplib: random EOFError in setUpClass()

2017-09-13 Thread STINNER Victor
STINNER Victor added the comment: The SSL EOF error is still common, but in the test, not in setUpClass(). Example: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%2010.x%20Shared%203.x/builds/874/steps/test/logs/stdio ===

[issue31450] Subprocess exceptions re-raised in parent process do not have child_traceback attribute

2017-09-13 Thread Charalampos Stratakis
Changes by Charalampos Stratakis : -- nosy: +cstratak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue31429] TLS cipher suite compile time option for downstream

2017-09-13 Thread Charalampos Stratakis
Changes by Charalampos Stratakis : -- nosy: +cstratak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue31174] test_tools leaks randomly references on x86 Gentoo Refleaks 3.6 and 3.x

2017-09-13 Thread STINNER Victor
Changes by STINNER Victor : -- title: test_tools leaks randomly references on x86 Gentoo Refleaks 3.x -> test_tools leaks randomly references on x86 Gentoo Refleaks 3.6 and 3.x versions: +Python 3.6 ___ Python tracker

[issue31450] Subprocess exceptions re-raised in parent process do not have child_traceback attribute

2017-09-13 Thread Michal Sekletar
New submission from Michal Sekletar: Issue - Documentation of subprocess module claims that exceptions raised in child process will be re-raised in the parent process and will have child_traceback attribute set [1]. At least on Fedora Rawhide with python-3.6.2 this is not the case. Repro

[issue31174] test_tools leaks randomly references on x86 Gentoo Refleaks 3.x

2017-09-13 Thread STINNER Victor
STINNER Victor added the comment: test_tools also fails on x86 Gentoo Refleaks 3.6: http://buildbot.python.org/all/builders/x86%20Gentoo%20Refleaks%203.6/builds/90 test_tools leaked [1, 1, 118] memory blocks, sum=120 (...) test_tools leaked [7, 1, 6] memory blocks, sum=14 -- _

[issue31447] proc communicate not exiting on python subprocess timeout using PIPES

2017-09-13 Thread Leonardo Francalanci
Leonardo Francalanci added the comment: The called "C:\\Program Files (x86)\\Anaconda3\\Python.exe" process exits after 4 seconds. The reason why it ends shouldn't matter, right? I expect that a call to communicate should exit as soon as the called process is not running anymore. I don't hold

[issue31069] test_multiprocessing_spawn and test_multiprocessing_forkserver leak dangling processes

2017-09-13 Thread STINNER Victor
STINNER Victor added the comment: New test_multiprocessing_fork failure on AMD64 FreeBSD CURRENT Debug 3.x: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%20CURRENT%20Debug%203.x/builds/869/steps/test/logs/stdio (...) test_traceback (test.test_multiprocessing_fork.WithThreadsTestPool)

[issue31449] Potential DoS Attack when Parsing Email with Huge Number of MIME Parts

2017-09-13 Thread Christian Koßmann
New submission from Christian Koßmann: Python's email parser consumes a lot of resources (CPU and memory) when parsing emails with a large amount of MIME parts. Attackers can probably exploit this behavior to perform denial-of-service (DoS) attacks. A potentially malicious email has the follow

[issue31448] test_poplib started to log a lot of ResourceWarning warnings on AMD64 Windows8.1 Refleaks 3.x

2017-09-13 Thread STINNER Victor
Changes by STINNER Victor : -- keywords: +patch pull_requests: +3536 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-l

[issue31448] test_poplib started to log a lot of ResourceWarning warnings on AMD64 Windows8.1 Refleaks 3.x

2017-09-13 Thread STINNER Victor
Changes by STINNER Victor : -- title: test_pop started to log a lot of ResourceWarning warnings on AMD64 Windows8.1 Refleaks 3.x -> test_poplib started to log a lot of ResourceWarning warnings on AMD64 Windows8.1 Refleaks 3.x ___ Python tracker

[issue31447] proc communicate not exiting on python subprocess timeout using PIPES

2017-09-13 Thread Eryk Sun
Eryk Sun added the comment: I don't see a bug here. The inner run() kills cmd.exe after 4 seconds. But the waitfor.exe process waits for 200 seconds and has handles for the pipes. The OS won't close out the pipes as long as there are potential writers, so the outer communicate() waits the full

[issue31234] Make support.threading_cleanup() stricter

2017-09-13 Thread STINNER Victor
STINNER Victor added the comment: New changeset d403a29c0055de6b03ed5ae7a5c564e1c95a5950 by Victor Stinner in branch 'master': bpo-31234: Fix dangling thread in test_ftp/poplib (#3540) https://github.com/python/cpython/commit/d403a29c0055de6b03ed5ae7a5c564e1c95a5950 -- __

[issue31448] test_pop started to log a lot of ResourceWarning warnings on AMD64 Windows8.1 Refleaks 3.x

2017-09-13 Thread STINNER Victor
Changes by STINNER Victor : -- components: +Tests ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue31448] test_pop started to log a lot of ResourceWarning warnings on AMD64 Windows8.1 Refleaks 3.x

2017-09-13 Thread STINNER Victor
New submission from STINNER Victor: On AMD64 Windows8.1 Refleaks 3.x buildbot, test_poplib started to log a lot of ResourceWarning warnings since the build 101: http://buildbot.python.org/all/builders/AMD64%20Windows8.1%20Refleaks%203.x/builds/101/ 2:30:30 [388/405/3] test_poplib passed (64 se

[issue31234] Make support.threading_cleanup() stricter

2017-09-13 Thread STINNER Victor
Changes by STINNER Victor : -- pull_requests: +3535 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue31234] Make support.threading_cleanup() stricter

2017-09-13 Thread STINNER Victor
STINNER Victor added the comment: New changeset 89bfc9b0d9033f7c9f086c7281a31a489fe1136f by Victor Stinner (Miss Islington (bot)) in branch '3.6': [3.6] bpo-31234: test_threaded_import: fix test_side_effect_import() (GH-3189) (#3537) https://github.com/python/cpython/commit/89bfc9b0d9033f7c9f0

[issue31234] Make support.threading_cleanup() stricter

2017-09-13 Thread STINNER Victor
STINNER Victor added the comment: New changeset 6c25b73194714e78975eddea3799f06f3de74647 by Victor Stinner (Miss Islington (bot)) in branch '3.6': [3.6] bpo-31234: test_httpservers joins the server thread (GH-3188) (#3536) https://github.com/python/cpython/commit/6c25b73194714e78975eddea3799f06

[issue31323] test_ssl: reference cycle between ThreadedEchoServer and its ConnectionHandler

2017-09-13 Thread STINNER Victor
STINNER Victor added the comment: New changeset 1b00bddd5c4a5728b15eee5a27ed3f78a173ef64 by Victor Stinner (Miss Islington (bot)) in branch '3.6': [3.6] bpo-31323: Fix reference leak in test_ssl (GH-3263) (#3538) https://github.com/python/cpython/commit/1b00bddd5c4a5728b15eee5a27ed3f78a173ef64

[issue31234] Make support.threading_cleanup() stricter

2017-09-13 Thread STINNER Victor
STINNER Victor added the comment: New changeset 42f7e0d8b0ca940a809a786f25d967dcce4d71b6 by Victor Stinner in branch '2.7': bpo-31234: fork_wait tests now join threads (#3139) (#3535) https://github.com/python/cpython/commit/42f7e0d8b0ca940a809a786f25d967dcce4d71b6 -- ___

[issue31418] assertion failure in PyErr_WriteUnraisable() in case of an exception with a bad __module__

2017-09-13 Thread Oren Milman
Changes by Oren Milman : -- keywords: +patch pull_requests: +3534 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list

[issue31336] Speed up _PyType_Lookup() for class creation

2017-09-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: On my computer the speed up is 13% without LTO and PGO and around 20% with LTO and PGO. Building with LTO and PGO adds other 20%. -- ___ Python tracker

[issue31447] proc communicate not exiting on python subprocess timeout using PIPES

2017-09-13 Thread Leonardo Francalanci
Changes by Leonardo Francalanci : -- components: +Interpreter Core type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mai

[issue31447] proc communicate not exiting on python subprocess timeout using PIPES

2017-09-13 Thread Leonardo Francalanci
New submission from Leonardo Francalanci: the script below (a python process is called, which calls a waitfor cmd with a timeout of 4 seconds) is supposed to end after 4 seconds. But instead proc.communicate stops after the 20 seconds timeout. Everything works 100% ok if I remove the stdin/std

[issue31444] ResourceWarning in Python/traceback.c in case of a bad io.TextIOWrapper

2017-09-13 Thread STINNER Victor
STINNER Victor added the comment: Ok, thanks for the confirmation Serhiy. I close the bug. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___

[issue31444] ResourceWarning in Python/traceback.c in case of a bad io.TextIOWrapper

2017-09-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think it should be closed as "not a bug". If io.TextIOWrapper() is successful, it is responsible for property closing a binary file. The bug is in user code, not in the interpreter code. _Py_DisplaySourceLine() correctly calls binary.close() if io.TextIOWr

[issue31234] Make support.threading_cleanup() stricter

2017-09-13 Thread STINNER Victor
STINNER Victor added the comment: I rebased PR 3138: 3 tests failed on Travis CI. test_ssl: Warning -- threading_cleanup() failed to cleanup 0 threads (count: 0, dangling: 3) Dangling thread: Dangling thread: Dangling thread: <_MainThread(MainThread, started 47903383548928)> test_poplib: W

[issue31446] _winapi.CreateProcess (used by subprocess) is not thread-safe

2017-09-13 Thread STINNER Victor
STINNER Victor added the comment: I remove Python 3.3-3.5 from Python versions since these versions don't accept bugfixes anymore, only security fixes: https://devguide.python.org/#status-of-python-branches -- nosy: +haypo versions: -Python 3.3, Python 3.4, Python 3.5

[issue31418] assertion failure in PyErr_WriteUnraisable() in case of an exception with a bad __module__

2017-09-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PyFile_WriteObject(moduleName, f, Py_PRINT_RAW) implicitly converts its argument to string. I mean that treating non-string moduleName the same way as string moduleName not equal to string "builtins" and calling PyFile_WriteObject() would cause other problem

[issue31446] _winapi.CreateProcess (used by subprocess) is not thread-safe

2017-09-13 Thread STINNER Victor
Changes by STINNER Victor : -- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware ___ Python tracker ___ ___

[issue31446] _winapi.CreateProcess (used by subprocess) is not thread-safe

2017-09-13 Thread Evan Andrews
New submission from Evan Andrews: The method used for spawning subprocesses on Windows is not thread-safe under certain circumstances. The following example demonstrates how this manifests: >>> import threading >>> import subprocess >>> for i in range(100): ... threading.Thr

[issue31250] test_asyncio leaks dangling threads

2017-09-13 Thread STINNER Victor
Changes by STINNER Victor : -- versions: +Python 3.6 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue31323] test_ssl: reference cycle between ThreadedEchoServer and its ConnectionHandler

2017-09-13 Thread STINNER Victor
STINNER Victor added the comment: I don't think that Python 2.7 is affected since Exception has no __traceback__ attribute in Python 2.7. -- ___ Python tracker ___

[issue31323] test_ssl: reference cycle between ThreadedEchoServer and its ConnectionHandler

2017-09-13 Thread Roundup Robot
Changes by Roundup Robot : -- keywords: +patch pull_requests: +3533 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-li

[issue31445] Index out of range in get of message.EmailMessage.get()

2017-09-13 Thread Michala
New submission from Michala: This error occured when the email field "From" was demanded: File "/home/user/processing/Test/process_email.py", line 84, in __init__ self.field_from_full = msg.get("From") File "/usr/local/lib/python3.6/email/message.py", line 471, in get return self.pol

[issue31234] Make support.threading_cleanup() stricter

2017-09-13 Thread Roundup Robot
Changes by Roundup Robot : -- pull_requests: +3532 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue31234] Make support.threading_cleanup() stricter

2017-09-13 Thread Roundup Robot
Changes by Roundup Robot : -- pull_requests: +3531 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue31418] assertion failure in PyErr_WriteUnraisable() in case of an exception with a bad __module__

2017-09-13 Thread Oren Milman
Oren Milman added the comment: what do you mean by 'Implicit converting to str can raise a warning or exception if __module__ is a bytes object.'? should we treat __module__ differently in case it is a bytes object? -- ___ Python tracker

[issue31234] Make support.threading_cleanup() stricter

2017-09-13 Thread STINNER Victor
Changes by STINNER Victor : -- pull_requests: +3530 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue30830] test_logging leaks dangling threads on FreeBSD

2017-09-13 Thread STINNER Victor
STINNER Victor added the comment: Ok, the main bugs have been fixed by the following socketserver fix. commit b8f4163da30e16c7cd58fe04f4b17e38d53cd57e Author: Victor Stinner Date: Wed Sep 13 01:47:22 2017 -0700 bpo-31233: socketserver.ThreadingMixIn.server_close() (#3523) socket

[issue31444] ResourceWarning in Python/traceback.c in case of a bad io.TextIOWrapper

2017-09-13 Thread STINNER Victor
STINNER Victor added the comment: > this is because _Py_DisplaySourceLine() (in Python/traceback.c) assumes that > io.TextIOWrapper() returned a stream object, and tries to call its close() > method. in case calling close() fails, _Py_DisplaySourceLine() just calls > PyErr_Clear(). I conside

[issue31444] ResourceWarning in Python/traceback.c in case of a bad io.TextIOWrapper

2017-09-13 Thread Oren Milman
New submission from Oren Milman: the following code causes a ResourceWarning: import io def _bad_TextIOWrapper(*args): return None io.TextIOWrapper = _bad_TextIOWrapper 1/0 this is because _Py_DisplaySourceLine() (in Python/traceback.c) assumes that io.TextIOWrapper() returned a stream obj

[issue31443] Possibly out of date C extension documentation

2017-09-13 Thread Romuald Brunet
New submission from Romuald Brunet: In the "Defining New Types documentation" basics about tp_new -> PyType_GenericNew, the doc states: > We’d like to just assign this to the tp_new slot, but we can’t, for > portability sake, On some platforms or compilers, we can’t statically > initialize a st

[issue31233] socketserver.ThreadingMixIn leaks running threads after server_close()

2017-09-13 Thread STINNER Victor
STINNER Victor added the comment: New changeset b8f4163da30e16c7cd58fe04f4b17e38d53cd57e by Victor Stinner in branch 'master': bpo-31233: socketserver.ThreadingMixIn.server_close() (#3523) https://github.com/python/cpython/commit/b8f4163da30e16c7cd58fe04f4b17e38d53cd57e -- __

[issue31442] assertion failures on Windows in Python/traceback.c in case of a bad io.open

2017-09-13 Thread Oren Milman
New submission from Oren Milman: the following code causes an assertion failure on my Windows: import io def _bad_open(*args): return 42 io.open = _bad_open 1/0 this is because _Py_DisplaySourceLine() (in Python/traceback.c) assumes that the return value of io.open() is valid. IIUC, this

[issue30830] test_logging leaks dangling threads on FreeBSD

2017-09-13 Thread STINNER Victor
STINNER Victor added the comment: New changeset 97d7e65dfed1d42d40d9bc2f630af56240555f02 by Victor Stinner in branch 'master': bpo-30830: logging.config.listen() calls server_close() (#3524) https://github.com/python/cpython/commit/97d7e65dfed1d42d40d9bc2f630af56240555f02 --

[issue31233] socketserver.ThreadingMixIn leaks running threads after server_close()

2017-09-13 Thread STINNER Victor
STINNER Victor added the comment: New changeset 97d7e65dfed1d42d40d9bc2f630af56240555f02 by Victor Stinner in branch 'master': bpo-30830: logging.config.listen() calls server_close() (#3524) https://github.com/python/cpython/commit/97d7e65dfed1d42d40d9bc2f630af56240555f02 --

[issue31441] Descriptor example in documentation is confusing, possibly wrong

2017-09-13 Thread Benjamin Wohlwend
New submission from Benjamin Wohlwend: The first descriptor example in the descriptor docs (https://docs.python.org/3/howto/descriptor.html#descriptor-example) stores the value on the descriptor instance, which is shared among all MyClass instances. This leads to surprising (and arguably buggy

[issue31440] wrong default module search path in help message

2017-09-13 Thread Xiang Zhang
New submission from Xiang Zhang: In python --help: PYTHONHOME : alternate directory (or :). The default module search path uses /pythonX.X. I think the default module search path should be /lib/pythonX.X. -- keywords: easy messages: 302032 nosy: xiang.zhang priority:

<    1   2