[issue37424] subprocess.run timeout does not function if shell=True and capture_output=True

2019-06-27 Thread haizaar
haizaar added the comment: Thanks for looking at it. My original code had "tar" running, which is a child of the shell as well... I assume running exec in the shell may help somewhat, but not a cure obviously. I'm all for killing the process group. "Run something and get it's about" should

[issue37429] Python hangs on fork when a logger is in use in a background thread

2019-06-27 Thread Ryan Petrello
Ryan Petrello added the comment: Here's the stack of one the hung child processes under py2.7: (gdb) py-bt #4 Waiting for a lock (e.g. GIL) #5 Waiting for a lock (e.g. GIL) #7 Frame 0x7f346a925430, for file /usr/lib64/python2.7/Queue.py, line 118, in put (self=, maxsize=0,

[issue30345] test_gdb fails on Python 3.6 when built with LTO+PGO

2019-06-27 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +14239 pull_request: https://github.com/python/cpython/pull/14423 ___ Python tracker ___

[issue37429] Python hangs on fork when a logger is in use in a background thread

2019-06-27 Thread Ryan Petrello
Ryan Petrello added the comment: This issue seems _very_ similar to https://bugs.python.org/issue6721, but I wasn't able to encounter the exact stack I've been seeing on my end. Specifically, when I run the reproducer script in this issue (hang.py) for a few minutes, hung child processes

[issue37429] Python hangs on fork when a logger is in use in a background thread

2019-06-27 Thread Ryan Petrello
New submission from Ryan Petrello : It's possible to cause Python child processes to encountered a deadlock and hang on fork by: 1) Spawning one or more threads in a parent process 2) Have one of those threads emit log lines 3) Have the main thread use os.fork() 4) In the child, log

[issue37427] sorted() and list.sort() don't accept non-boolean objects with __bool__() as `reverse` parameter

2019-06-27 Thread Mark Dickinson
Mark Dickinson added the comment: > I'm finding it rather hard to guess what the rules are for what works and > what doesn't So now that I've looked at the source: anything with an `__int__` method works, except that `float` instances are explicitly excluded. So this explains for example:

[issue37427] sorted() and list.sort() don't accept non-boolean objects with __bool__() as `reverse` parameter

2019-06-27 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: +tim.peters ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37427] sorted() and list.sort() don't accept non-boolean objects with __bool__() as `reverse` parameter

2019-06-27 Thread Mark Dickinson
Mark Dickinson added the comment: I haven't looked at the source yet, but from experimentation I'm finding it rather hard to guess what the rules are for what works and what doesn't: Python 3.7.3 (default, Mar 30 2019, 03:37:43) [Clang 10.0.0 (clang-1000.11.45.5)] on darwin Type "help",

[issue33926] test_gdb is skipped in builds since gdb is not installed as part of build script

2019-06-27 Thread miss-islington
miss-islington added the comment: New changeset 7e9d706fd6e2f49d2bd829890c46868105767769 by Miss Islington (bot) in branch '3.8': bpo-33926: enable GDB tests on Travis CI (GH-14395) https://github.com/python/cpython/commit/7e9d706fd6e2f49d2bd829890c46868105767769 -- nosy:

[issue36889] Merge StreamWriter and StreamReader into just asyncio.Stream

2019-06-27 Thread miss-islington
Change by miss-islington : -- pull_requests: +14238 pull_request: https://github.com/python/cpython/pull/14422 ___ Python tracker ___

[issue37428] SSLContext.post_handshake_auth implicitly enables cert validation

2019-06-27 Thread Christian Heimes
Change by Christian Heimes : -- keywords: +patch pull_requests: +14237 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14421 ___ Python tracker

[issue33926] test_gdb is skipped in builds since gdb is not installed as part of build script

2019-06-27 Thread miss-islington
Change by miss-islington : -- pull_requests: +14236 pull_request: https://github.com/python/cpython/pull/14420 ___ Python tracker ___

[issue33926] test_gdb is skipped in builds since gdb is not installed as part of build script

2019-06-27 Thread Inada Naoki
Inada Naoki added the comment: New changeset 667eaffb4e5d03bf8129773f79649c3befaa5b1a by Inada Naoki (Jeroen Demeyer) in branch 'master': bpo-33926: enable GDB tests on Travis CI (GH-14395) https://github.com/python/cpython/commit/667eaffb4e5d03bf8129773f79649c3befaa5b1a -- nosy:

[issue37426] getpass.getpass not working with on windows when ctrl+v is used to enter the string

2019-06-27 Thread Eryk Sun
Eryk Sun added the comment: getpass() reads from the console via msvcrt.getwch(). This is a raw console read, so Ctrl+V is read as the SYN (0x16) control character. Only the following keys are handled specially by getpass: * Ctrl+C - raise KeyboardInterrupt * Ctrl+H (backspace) - delete

[issue37416] If threading is not imported from the main thread it sees the wrong thread as the main thread.

2019-06-27 Thread Aldwin Pollefeyt
Aldwin Pollefeyt added the comment: Understood. Thank you for the extra info. I'll read up on all the suggestions. -- ___ Python tracker ___

[issue37428] SSLContext.post_handshake_auth implicitly enables cert validation

2019-06-27 Thread Christian Heimes
New submission from Christian Heimes : Enabling TLS 1.3 post handshake auth also enables cert chain validation. OpenSSL documents SSL_VERIFY_POST_HANDSHAKE as ignored for client side. However tls_process_server_certificate in the client state machine code does not ignore the flag and checks

[issue37426] getpass.getpass not working with on windows when ctrl+v is used to enter the string

2019-06-27 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware ___ Python tracker ___

[issue37416] If threading is not imported from the main thread it sees the wrong thread as the main thread.

2019-06-27 Thread Pavel Minaev
Pavel Minaev added the comment: It's also possible to hit if using some native code that starts a background thread without going via threading, and runs Python code on that background thread. In that case, if that Python code then does "import threading", and threading hasn't been imported

[issue37427] sorted() and list.sort() don't accept non-boolean objects with __bool__() as `reverse` parameter

2019-06-27 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37416] If threading is not imported from the main thread it sees the wrong thread as the main thread.

2019-06-27 Thread Pavel Minaev
Pavel Minaev added the comment: This is a bit tricky to explain... There's no easy way to achieve this effect "normally". It manifests due to the way some Python debuggers (specifically, pydevd and ptvsd - as used by PyCharm, PyDev, and VSCode) implement non-cooperative attaching to a

[issue37427] sorted() and list.sort() don't accept non-boolean objects with __bool__() as `reverse` parameter

2019-06-27 Thread NODA, Kai
New submission from NODA, Kai : class X: def __bool__(self): return True x = [1, 2, 3] x.sort(reverse=X()) print(x) print(sorted([1, 2, 3], reverse=X())) TypeError: an integer is required (got type X) We can always still do x.sort(reverse=bool(X())) print(sorted([1, 2, 3],

[issue37426] getpass.getpass not working with on windows when ctrl+v is used to enter the string

2019-06-27 Thread Atul Bagga
New submission from Atul Bagga : Detailed issue filed here - https://github.com/microsoft/knack/issues/160 -- components: Library (Lib) messages: 346721 nosy: Atul Bagga priority: normal severity: normal status: open title: getpass.getpass not working with on windows when ctrl+v is

[issue37416] If threading is not imported from the main thread it sees the wrong thread as the main thread.

2019-06-27 Thread Aldwin Pollefeyt
Aldwin Pollefeyt added the comment: The second import actually doesn't happen. You need to reload it. This can be tested by putting print('loading threading') in threading.py. Your first method-thread will still think it's main thread. So no idea if this is a bug or wrong use. 'import

[issue32926] Add public TestCase method/property to get result of current test

2019-06-27 Thread Jeroen Demeyer
Change by Jeroen Demeyer : -- pull_requests: -14235 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue32926] Add public TestCase method/property to get result of current test

2019-06-27 Thread Jeroen Demeyer
Change by Jeroen Demeyer : -- pull_requests: +14235 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14395 ___ Python tracker ___

[issue37366] Add an "onitem" callback parameter to shutil.rmtree()

2019-06-27 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: I am not sure I understand the use case. Other than "unmounting a mount point" the other scenarios look unrealistic to me and also require a fd instead of a path. Also, if you want to unmount a path you can do so via *onerror* instead (unmount + delete).

[issue37424] subprocess.run timeout does not function if shell=True and capture_output=True

2019-06-27 Thread Martin Panter
Martin Panter added the comment: Same thing going on as in Issue 30154. The shell is probably spawning the “sleep” command as a child process (grandchild of Python), and waiting for it to exit. When Python times out, it will kill the shell process, leaving the grandchild as an orphan. The

[issue36656] Please add race-free os.link and os.symlink wrapper / helper

2019-06-27 Thread Tal Einat
Tal Einat added the comment: I think there is a general flaw with the suggested implementation approach. An infinite loop as currently suggested seems dangerous to me. For example, it could cause a program to stall indefinitely in some unforeseen edge-case. I don't think this would be

[issue32926] Add public TestCase method/property to get result of current test

2019-06-27 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +ezio.melotti, michael.foord, rbcollins stage: patch review -> versions: +Python 3.9 -Python 3.8 ___ Python tracker ___

[issue32926] Add public TestCase method/property to get result of current test

2019-06-27 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- pull_requests: -14234 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue36656] Please add race-free os.link and os.symlink wrapper / helper

2019-06-27 Thread Tal Einat
Change by Tal Einat : -- components: +Library (Lib) versions: +Python 3.9 -Python 3.7 ___ Python tracker ___ ___ Python-bugs-list

[issue32926] Add public TestCase method/property to get result of current test

2019-06-27 Thread Jeroen Demeyer
Change by Jeroen Demeyer : -- keywords: +patch pull_requests: +14234 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14395 ___ Python tracker ___

[issue33926] test_gdb is skipped in builds since gdb is not installed as part of build script

2019-06-27 Thread Jeroen Demeyer
Change by Jeroen Demeyer : -- keywords: +patch pull_requests: +14233 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14395 ___ Python tracker ___

[issue37415] Error build Python with Intel compiler

2019-06-27 Thread Borja
Borja added the comment: In pyconfig.h the variable HAVE_STD_ATOMIC appears like this: /* Has stdatomic.h with atomic_int */ #define HAVE_STD_ATOMIC 1 I searched at atomic_uintptr_t and found nothing. -- ___ Python tracker

[issue37416] If threading is not imported from the main thread it sees the wrong thread as the main thread.

2019-06-27 Thread Pavel Minaev
Change by Pavel Minaev : -- nosy: +int19h ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37425] Using Pyinstaller with (Anaconda) Python 3.7.3 needs PyQt5 even if not imported in code

2019-06-27 Thread Sameer Bobade
New submission from Sameer Bobade : I am writing a test code with Python and tested that it works on both Python 3.7 and 3.7.3 The code uses tkinter, and does not use PyQT5 I use pyinstaller 3.4 I convert the python to exe. With the same code and and same dependencies (including version

[issue37424] subprocess.run timeout does not function if shell=True and capture_output=True

2019-06-27 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: On mac this exits immediately with 0.1 seconds as timeout but reproducible on Ubuntu with master. -- nosy: +gregory.p.smith, xtreak ___ Python tracker

[issue35389] Use gnu_get_libc_version() in platform.libc_ver()?

2019-06-27 Thread STINNER Victor
STINNER Victor added the comment: New changeset a719c8f4bd3cc5b1d98700c15c4a818f4d5617a4 by Victor Stinner in branch 'master': bpo-35389: platform.platform() calls libc_ver() without executable (GH-14418) https://github.com/python/cpython/commit/a719c8f4bd3cc5b1d98700c15c4a818f4d5617a4

[issue37424] subprocess.run timeout does not function if shell=True and capture_output=True

2019-06-27 Thread haizaar
New submission from haizaar : Consider the following: subprocess.run('sleep 10', shell=True, timeout=.1, capture_output=True) It should raise after 0.1 seconds, but it does not - it waits 10 seconds till sleep finishes and only then raises "subprocess.TimeoutExpired: Command 'sleep 10'

<    1   2