[issue32604] Expose the subinterpreters C-API in Python for testing use.

2020-04-28 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +19088 pull_request: https://github.com/python/cpython/pull/19768 ___ Python tracker ___

[issue37340] remove free_list for bound method objects

2020-04-28 Thread Raymond Hettinger
Raymond Hettinger added the comment: This caused a performance regression (70%) for a fundamental operation. See issue 37340. Sometimes, bound methods are used directly and not through LOAD_METHOD: sorted(data, key=str.upper) -- nosy: +rhettinger status: closed -> open

[issue39966] mock 3.9 bug: Wrapped objects without __bool__ raise exception

2020-04-28 Thread Chris Withers
Chris Withers added the comment: New changeset 521c8d6806adf0305c158d280ec00cca48e8ab22 by Karthikeyan Singaravelan in branch 'master': bpo-39966: Revert "bpo-25597: Ensure wraps' return value is used for magic methods in MagicMock" (GH-19734)

[issue25597] unittest.mock does not wrap dunder methods (__getitem__ etc)

2020-04-28 Thread Chris Withers
Chris Withers added the comment: New changeset 521c8d6806adf0305c158d280ec00cca48e8ab22 by Karthikeyan Singaravelan in branch 'master': bpo-39966: Revert "bpo-25597: Ensure wraps' return value is used for magic methods in MagicMock" (GH-19734)

[issue39117] Performance regression for making bound methods

2020-04-28 Thread Raymond Hettinger
Raymond Hettinger added the comment: This performance regression in still present in 3.9.0a6 Results from Tools/scripts/var_access_benchmark.py: Python 3.8.2 Python 3.9.0a6 -- read_boundmethod

[issue40427] importlib of module results in different id than when imported with import keyword

2020-04-28 Thread Brett Cannon
Brett Cannon added the comment: That's expected because you are constructing a completely new module object with importlib.util.module_from_spec(). You're also completely circumventing sys.modules with the code you wrote which is the only way you would get equivalent IDs compared to using

[issue40427] importlib of module results in different id than when imported with import keyword

2020-04-28 Thread John Andersen
New submission from John Andersen : When importing a file using importlib the id() of the object being imported is not the same as when imported using the `import` keyword. I feel like this is a bug. As if I have a package which is using relative imports, and then I import all of the files

[issue40269] Inconsistent complex behavior with (-1j)

2020-04-28 Thread Mark Dickinson
Mark Dickinson added the comment: Closing this. Please open a separate issue for changing the complex repr if that's the way that you want to go. -- resolution: -> not a bug stage: patch review -> resolved status: open -> closed ___ Python

[issue40426] Unable to use lowercase hexadecimal digits for percent encoding

2020-04-28 Thread E Kawashima
Change by E Kawashima : -- keywords: +patch nosy: +E Kawashima nosy_count: 1.0 -> 2.0 pull_requests: +19087 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19766 ___ Python tracker

[issue38787] PEP 573: Module State Access from C Extension Methods

2020-04-28 Thread Stefan Behnel
Stefan Behnel added the comment: What can we do to move this forward? I see that the original PR was closed in January. Is there or will there be a new one? Can I help with anything? -- ___ Python tracker

[issue40426] Unable to use lowercase hexadecimal digits for percent encoding

2020-04-28 Thread Eisuke Kawashima
New submission from Eisuke Kawashima : RFC 3986 (https://tools.ietf.org/html/rfc3986#section-2.1) allows lower hexadecimal digits for percent encoding, but urllib.parse.quote and its variants convert into only UPPERCASE digits [A-F]. I will create a PR for fix. -- components:

[issue40421] [C API] Add getter functions for PyFrameObject and maybe move PyFrameObject to the internal C API

2020-04-28 Thread STINNER Victor
STINNER Victor added the comment: I looked how Cython uses PyFrameObject: * read f_lasti * read/write f_back * write f_lineno * read f_localsplus * read/write f_trace Details: * Cython/Debugger/libpython.py: code using the Python API of gdb to read PyFrameObject.f_lasti. It it used to

[issue40395] Scripts folder is Empty in python 3.8.2 for Windows 7.

2020-04-28 Thread Steve Dower
Steve Dower added the comment: Yes, the only thing that should be in your Scripts folder after install is pip. Python itself never puts anything there - it's for other things that you may install. Could you try running these environment commands and then try installing pip again? set

[issue40425] Refleak in CDataObject

2020-04-28 Thread Cubi
New submission from Cubi : String buffers are not freed when pointers to them (created via ctypes.cast) are deleted, even though those pointers hold references to the string buffer (in tagCDataObject.b_objects, I think). Code examples can be found on StackOverflow.com [1]. Thanks to Mark

[issue40421] [C API] Add getter functions for PyFrameObject and maybe move PyFrameObject to the internal C API

2020-04-28 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +19086 pull_request: https://github.com/python/cpython/pull/19765 ___ Python tracker ___

[issue40421] [C API] Add getter functions for PyFrameObject and maybe move PyFrameObject to the internal C API

2020-04-28 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +19085 pull_request: https://github.com/python/cpython/pull/19764 ___ Python tracker ___

[issue40025] enum: _generate_next_value_ is not called if its definition occurs after calls to auto()

2020-04-28 Thread miss-islington
Change by miss-islington : -- pull_requests: +19084 pull_request: https://github.com/python/cpython/pull/19763 ___ Python tracker ___

[issue40025] enum: _generate_next_value_ is not called if its definition occurs after calls to auto()

2020-04-28 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 8.0 -> 9.0 pull_requests: +19083 pull_request: https://github.com/python/cpython/pull/19762 ___ Python tracker

[issue40025] enum: _generate_next_value_ is not called if its definition occurs after calls to auto()

2020-04-28 Thread Ethan Furman
Ethan Furman added the comment: New changeset d9a43e20facdf4ad10186f820601c6580e1baa80 by Ethan Onstott in branch 'master': bpo-40025: Require _generate_next_value_ to be defined before members (GH-19098) https://github.com/python/cpython/commit/d9a43e20facdf4ad10186f820601c6580e1baa80

[issue36207] robotsparser deny all with some rules

2020-04-28 Thread Fred AYERS
Fred AYERS added the comment: I tried this one http://gtxgamer.fr/robots.txt/;>http://gtxgamer.fr/robots.txt and it seems to work. -- nosy: +Fred AYERS ___ Python tracker

[issue40421] [C API] Add getter functions for PyFrameObject and maybe move PyFrameObject to the internal C API

2020-04-28 Thread STINNER Victor
STINNER Victor added the comment: New changeset a42ca74fa30227e2f89a619332557cf093a937d5 by Victor Stinner in branch 'master': bpo-40421: Add PyFrame_GetCode() function (GH-19757) https://github.com/python/cpython/commit/a42ca74fa30227e2f89a619332557cf093a937d5 --

[issue39995] test_concurrent_futures: ProcessPoolSpawnExecutorDeadlockTest.test_crash() fails with OSError: [Errno 9] Bad file descriptor

2020-04-28 Thread STINNER Victor
STINNER Victor added the comment: > With my msg367463 patch (add sleep), test_cancel_futures() fails. The test uses sleep() as a synchronization primitive: executor.submit(time.sleep, .1). That's bad, but it doesn't *have to* be fixed now. My msg367463 patch adds an artifical sleep: the

[issue39995] test_concurrent_futures: ProcessPoolSpawnExecutorDeadlockTest.test_crash() fails with OSError: [Errno 9] Bad file descriptor

2020-04-28 Thread STINNER Victor
STINNER Victor added the comment: Thomas Moreau: "One solution would be to use the `self._shutdown_lock` from the executor to protect the call to `close` in `terminate_broken` and the call to `self._thread_wakeup.wakeup` in `shutdown`. That way, the lock is only acquired at critical points

[issue39995] test_concurrent_futures: ProcessPoolSpawnExecutorDeadlockTest.test_crash() fails with OSError: [Errno 9] Bad file descriptor

2020-04-28 Thread STINNER Victor
STINNER Victor added the comment: With my msg367463 patch (add sleep), test_cancel_futures() fails. Example: == FAIL: test_cancel_futures (test.test_concurrent_futures.ProcessPoolForkProcessPoolShutdownTest)

[issue39995] test_concurrent_futures: ProcessPoolSpawnExecutorDeadlockTest.test_crash() fails with OSError: [Errno 9] Bad file descriptor

2020-04-28 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +19082 pull_request: https://github.com/python/cpython/pull/19760 ___ Python tracker ___

[issue40424] AIX: parallel build and ld WARNINGS

2020-04-28 Thread Michael Felt
Change by Michael Felt : -- keywords: +patch pull_requests: +19081 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19759 ___ Python tracker ___

[issue40424] AIX: parallel build and ld WARNINGS

2020-04-28 Thread Michael Felt
New submission from Michael Felt : Currently, on AIX, whenever the -j option is passed to make there are many WARNINGS from the loader (ld) re: duplicate symbols. While it is not possible to eliminate these warnings completely - as some are not related to the Python build, but external (3rd

[issue39995] test_concurrent_futures: ProcessPoolSpawnExecutorDeadlockTest.test_crash() fails with OSError: [Errno 9] Bad file descriptor

2020-04-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: With the same traceback and error message? -- ___ Python tracker ___ ___ Python-bugs-list

[issue39995] test_concurrent_futures: ProcessPoolSpawnExecutorDeadlockTest.test_crash() fails with OSError: [Errno 9] Bad file descriptor

2020-04-28 Thread STINNER Victor
STINNER Victor added the comment: Antoine Pitrou: "How about the following (untested): (...)" Using Antoine's patch, test_killed_child() still fails (I used my msg367463 patch to make the failure more likely). -- ___ Python tracker

[issue39995] test_concurrent_futures: ProcessPoolSpawnExecutorDeadlockTest.test_crash() fails with OSError: [Errno 9] Bad file descriptor

2020-04-28 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +19080 pull_request: https://github.com/python/cpython/pull/19758 ___ Python tracker ___

[issue40025] enum: _generate_next_value_ is not called if its definition occurs after calls to auto()

2020-04-28 Thread Ethan Onstott
Ethan Onstott added the comment: Ankesh, that is the expected behavior as no patch has been merged yet. -- ___ Python tracker ___

[issue40420] argparse choices formatter

2020-04-28 Thread paul j3
paul j3 added the comment: The display of the choices has been discussed in previous issues. When the choices is long there isn't a clean way of handling the display. I'd suggest using a 'metavar' to show a short value, and then enumerate the choices in the help text. Use the 'Raw' help

[issue40421] [C API] Add getter functions for PyFrameObject and maybe move PyFrameObject to the internal C API

2020-04-28 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +19079 pull_request: https://github.com/python/cpython/pull/19757 ___ Python tracker ___

[issue40421] [C API] Add getter functions for PyFrameObject and maybe move PyFrameObject to the internal C API

2020-04-28 Thread STINNER Victor
STINNER Victor added the comment: New changeset b8f704d2190125a7750b50cd9b67267b9c20fd43 by Victor Stinner in branch 'master': bpo-40421: Add Include/cpython/code.h header file (GH-19756) https://github.com/python/cpython/commit/b8f704d2190125a7750b50cd9b67267b9c20fd43 --

[issue35134] Add a new Include/cpython/ subdirectory for the "CPython API" with implementation details

2020-04-28 Thread STINNER Victor
STINNER Victor added the comment: New changeset b8f704d2190125a7750b50cd9b67267b9c20fd43 by Victor Stinner in branch 'master': bpo-40421: Add Include/cpython/code.h header file (GH-19756) https://github.com/python/cpython/commit/b8f704d2190125a7750b50cd9b67267b9c20fd43 --

[issue35134] Add a new Include/cpython/ subdirectory for the "CPython API" with implementation details

2020-04-28 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +19078 pull_request: https://github.com/python/cpython/pull/19756 ___ Python tracker ___

[issue40421] [C API] Add getter functions for PyFrameObject and maybe move PyFrameObject to the internal C API

2020-04-28 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +19077 pull_request: https://github.com/python/cpython/pull/19756 ___ Python tracker ___

[issue40422] Light refactor: create a common _Py_closerange API

2020-04-28 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40291] socket library support for CAN_J1939

2020-04-28 Thread Guido van Rossum
Guido van Rossum added the comment: Looks reasonable. -- nosy: +gvanrossum ___ Python tracker ___ ___ Python-bugs-list mailing

[issue35829] datetime: parse "Z" timezone suffix in fromisoformat()

2020-04-28 Thread Alex Grönholm
Alex Grönholm added the comment: Has this effort gone forwards lately, or has there been any discussion elsewhere? I implemented support for "Z" in .fromisoformat() before finding this issue. Even after reading the discussion I still don't quite understand why it's such a big problem.

[issue40421] [C API] Add getter functions for PyFrameObject and maybe move PyFrameObject to the internal C API

2020-04-28 Thread STINNER Victor
STINNER Victor added the comment: New changeset 7c59d7c9860cdbaf4a9c26c9142aebd3259d046e by Victor Stinner in branch 'master': bpo-40421: Add pyframe.h header file (GH-19755) https://github.com/python/cpython/commit/7c59d7c9860cdbaf4a9c26c9142aebd3259d046e --

[issue40423] Optimization: use close_range(2) if available

2020-04-28 Thread Kyle Evans
New submission from Kyle Evans : This is dependent on issue40422; the diff on top of that (PR19075) looks like the attached. Effectively, close_range(2) should be preferred at all times if it's available, otherwise we'll use closefrom(2) if available with a fallback to fdwalk(3) or plain old

[issue40421] [C API] Add getter functions for PyFrameObject and maybe move PyFrameObject to the internal C API

2020-04-28 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +19076 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19755 ___ Python tracker ___

[issue40422] Light refactor: create a common _Py_closerange API

2020-04-28 Thread Kyle Evans
Change by Kyle Evans : -- keywords: +patch nosy: +kevans nosy_count: 1.0 -> 2.0 pull_requests: +19075 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19754 ___ Python tracker

[issue40422] Light refactor: create a common _Py_closerange API

2020-04-28 Thread Kyle Evans
New submission from Kyle Evans : Such an API can be used for both os.closerange and subprocess, re-using much of os_closerange_impl. Pull request enroute. -- components: C API messages: 367530 nosy: kevans91 priority: normal severity: normal status: open title: Light refactor: create

[issue40419] timeit CLI docs still mention old power sequence

2020-04-28 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Thanks for the report. This was changed as part of issue28469 where autorange docstring was updated. I guess this was missed out. -- nosy: +serhiy.storchaka, xtreak ___ Python tracker

[issue40418] Small Refactoring: Use bytes.hex() in secrets.token_hex()

2020-04-28 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +steven.daprano ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue6721] Locks in the standard library should be sanitized on fork

2020-04-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: Related issue: https://bugs.python.org/issue40399 """ IO streams locking can be broken after fork() with threads """ -- ___ Python tracker

[issue40421] [C API] Add getter functions for PyFrameObject and maybe move PyFrameObject to the internal C API

2020-04-28 Thread STINNER Victor
New submission from STINNER Victor : Similarly to bpo-39573 (make PyObject opaque) and bpo-39947 (make PyThreadState opaque), I propose to add getter functions to access PyFrameObject members without exposing the PyFrameObject structure in the C API. The first step is to identify common

[issue21081] missing vietnamese codec TCVN 5712:1993 in Python

2020-04-28 Thread STINNER Victor
Change by STINNER Victor : -- nosy: -vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40334] PEP 617: new PEG-based parser

2020-04-28 Thread STINNER Victor
Change by STINNER Victor : -- nosy: -vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40416] Calling TextIOWrapper.tell() in the middle of reading a gb2312-encoded file causes UnicodeDecodeError

2020-04-28 Thread STINNER Victor
Change by STINNER Victor : -- nosy: -vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40420] argparse choices formatter

2020-04-28 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +paul.j3, rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue40413] Py_RunMain() crashes on subsequence call

2020-04-28 Thread STINNER Victor
STINNER Victor added the comment: I never tried, but I expect that the following pattern is fine: for (i=0; i<5; i++) { Py_Initialize(); Py_RunMain() } Maybe Py_RunMain() must fail with a fatal error if it's called when Python is not initialized. Since Py_RunMain() finalizes Python,

[issue40405] asyncio.as_completed documentation misleading

2020-04-28 Thread Bar Harel
Change by Bar Harel : -- keywords: +patch pull_requests: +19074 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/19753 ___ Python tracker

[issue40415] _asyncio extensions crashes if initialized multiple times in same process

2020-04-28 Thread STINNER Victor
Change by STINNER Victor : -- superseder: -> Use-after-free crash if multiple interpreters import asyncio module ___ Python tracker ___

[issue40399] IO streams locking can be broken after fork() with threads

2020-04-28 Thread STINNER Victor
Change by STINNER Victor : -- nosy: -vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40399] IO streams locking can be broken after fork() with threads

2020-04-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: Well, as the documentation states, `QueueListener.start` """starts up a background thread to monitor the queue for LogRecords to process""" :-) -- ___ Python tracker

[issue40420] argparse choices formatter

2020-04-28 Thread Leonid Ilyevsky
New submission from Leonid Ilyevsky : In my script I have a positional argument with list of choices, and that list is pretty long. The help formatter shows it as one long line, list in curly brackets, comma-separated. This is very difficult to look at and find the choice I need. It would

[issue40359] email.parse part.get_filename() fails to unwrap long attachment file names (legacy API)

2020-04-28 Thread R. David Murray
R. David Murray added the comment: As far as I know you currently still have to specify the policy. It was, yes, intended that 'default' become the actual default. I could have sworn there was an open issue for doing this, but I can't find it. I remember having a conversation with

[issue40399] IO streams locking can be broken after fork() with threads

2020-04-28 Thread Delgan
Delgan added the comment: Thank you for having looked into the problem. To be more specific, I don't generally mix threads with multiprocessing, but it's a situation where there is one global and hidden consumer thread listening to a queue for non-blocking logging. Actually, I think the

[issue40334] PEP 617: new PEG-based parser

2020-04-28 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 5b9f4988c94f47fa35e84f154a7b5aa17bc04722 by Pablo Galindo in branch 'master': bpo-40334: Refactor peg_generator to receive a Tokens file when building c code (GH-19745)

[issue21081] missing vietnamese codec TCVN 5712:1993 in Python

2020-04-28 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Found an "Unlink" bottom at the bottom of the message view. This appears to remove the messages from the issue. -- ___ Python tracker

[issue21081] missing vietnamese codec TCVN 5712:1993 in Python

2020-04-28 Thread Marc-Andre Lemburg
Change by Marc-Andre Lemburg : -- Removed message: https://bugs.python.org/msg367514 ___ Python tracker ___ ___ Python-bugs-list

[issue21081] missing vietnamese codec TCVN 5712:1993 in Python

2020-04-28 Thread Marc-Andre Lemburg
Change by Marc-Andre Lemburg : -- Removed message: https://bugs.python.org/msg367515 ___ Python tracker ___ ___ Python-bugs-list

[issue21081] missing vietnamese codec TCVN 5712:1993 in Python

2020-04-28 Thread Marc-Andre Lemburg
Change by Marc-Andre Lemburg : -- Removed message: https://bugs.python.org/msg320603 ___ Python tracker ___ ___ Python-bugs-list

[issue21081] missing vietnamese codec TCVN 5712:1993 in Python

2020-04-28 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: I have marked the messages as spam. Can't seem to remove them, though. -- ___ Python tracker ___

[issue21081] missing vietnamese codec TCVN 5712:1993 in Python

2020-04-28 Thread Antti Haapala
Antti Haapala added the comment: The messages above seem to be a (quite likely a machine) translation of André's comment with a spam link to a paint ad site, so no need to bother to translate it. Also, I invited Hiếu to the nosy list in case this patch needs some info that requires a native

[issue21081] missing vietnamese codec TCVN 5712:1993 in Python

2020-04-28 Thread Hieu Nguyen
Change by Hieu Nguyen : -- nosy: +hieu.nguyen ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40419] timeit CLI docs still mention old power sequence

2020-04-28 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch nosy: +python-dev nosy_count: 2.0 -> 3.0 pull_requests: +19073 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19752 ___ Python tracker

[issue40419] timeit CLI docs still mention old power sequence

2020-04-28 Thread Sander van Rijn
New submission from Sander van Rijn : The docs for the `timeit` CLI (https://docs.python.org/3/library/timeit.html#cmdoption-timeit-h) still mention that successive powers of 10 are tried. However, as this also uses the `timeit.Timer.autorange()` function, it uses the new sequence 1, 2, 5,

[issue40381] plistlib doesn't handle poorly-formatted plists

2020-04-28 Thread Ronald Oussoren
Change by Ronald Oussoren : -- stage: -> needs patch type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue40399] IO streams locking can be broken after fork() with threads

2020-04-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: I can reproduce on Ubuntu 18.04 with git master. Here is a better example which clearly shows the issue: https://gist.github.com/pitrou/d9784d5ec679059cd02fce4b38ea2fa6 After a few runs, you'll see that the child Process hangs when trying to flush the

[issue39995] test_concurrent_futures: ProcessPoolSpawnExecutorDeadlockTest.test_crash() fails with OSError: [Errno 9] Bad file descriptor

2020-04-28 Thread Kyle Stanley
Kyle Stanley added the comment: I decided to close PR-19751. Both because it does not correctly address the race condition (due to an oversight on my part) and it would add substantial overhead to _ThreadWakeup. Instead, I agree that we should explore a non-locking solution. --

[issue39995] test_concurrent_futures: ProcessPoolSpawnExecutorDeadlockTest.test_crash() fails with OSError: [Errno 9] Bad file descriptor

2020-04-28 Thread Kyle Stanley
Kyle Stanley added the comment: Oops, it seems that I opened PR-19751 a bit preemptively. When I get the chance, I'll see if Antoine's implementation can address the failures and do some comparisons. -- ___ Python tracker

[issue40061] Possible refleak in _asynciomodule.c future_add_done_callback()

2020-04-28 Thread Kyle Stanley
Kyle Stanley added the comment: Antoine Pitrou wrote: > You're right that a Py_DECREF is missing there. However, it seems unlikely > that this is triggering the test failure, because `PyList_New(1)` will > practically never fail in normal conditions (and even making it deliberately > fail

[issue40399] Program hangs if process created right after adding object to a Queue

2020-04-28 Thread Delgan
Delgan added the comment: Another curiosity: if 'print("Consumed:", queue.get())' is replaced by either 'print("Consumed")' or 'queue.get()', then the program keeps running without stopping. Only a combination of both makes the program to hang. Also reproducible on 3.5.2. --

[issue39995] test_concurrent_futures: ProcessPoolSpawnExecutorDeadlockTest.test_crash() fails with OSError: [Errno 9] Bad file descriptor

2020-04-28 Thread Kyle Stanley
Change by Kyle Stanley : -- pull_requests: +19072 pull_request: https://github.com/python/cpython/pull/19751 ___ Python tracker ___

[issue40399] Program hangs if process created right after adding object to a Queue

2020-04-28 Thread Delgan
Delgan added the comment: I noticed the bug is reproducible even if the child process does not put object in the queue: import multiprocessing import threading import time if __name__ == "__main__": queue = multiprocessing.SimpleQueue() def

[issue39995] test_concurrent_futures: ProcessPoolSpawnExecutorDeadlockTest.test_crash() fails with OSError: [Errno 9] Bad file descriptor

2020-04-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: How about the following (untested): diff --git a/Lib/concurrent/futures/process.py b/Lib/concurrent/futures/process.py index 8e9b69a8f0..c0c2eb3032 100644 --- a/Lib/concurrent/futures/process.py +++ b/Lib/concurrent/futures/process.py @@ -66,23 +66,29 @@

[issue40061] Possible refleak in _asynciomodule.c future_add_done_callback()

2020-04-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: You're right that a Py_DECREF is missing there. However, it seems unlikely that this is triggering the test failure, because `PyList_New(1)` will practically never fail in normal conditions (and even making it deliberately fail would be quite difficult).

[issue40417] PyImport_ReloadModule emits deprecation warning

2020-04-28 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch nosy: +python-dev nosy_count: 1.0 -> 2.0 pull_requests: +19071 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19750 ___ Python tracker

[issue40408] GenericAlias does not support nested type variables

2020-04-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Not yet. If you don't prefer to fix it yourself, I'll do it as soon as I have time. -- ___ Python tracker ___

[issue40411] frozen collection.Counter

2020-04-28 Thread Kyle Stanley
Kyle Stanley added the comment: paul rubin wrote: > Yeah I think the basic answer to this ticket is "Python doesn't really have > multisets and a proposal to add them should go somewhere else". Fair > enough-- consider the request withdrawn from here. Not necessarily, python-ideas is just

[issue40414] Incorrect mouse and keyboard mapping

2020-04-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: On which platform and Python version they were mapped to keyboard number buttons? -- nosy: +serhiy.storchaka ___ Python tracker ___

[issue39995] test_concurrent_futures: ProcessPoolSpawnExecutorDeadlockTest.test_crash() fails with OSError: [Errno 9] Bad file descriptor

2020-04-28 Thread Thomas Moreau
Thomas Moreau added the comment: Sorry I just saw this. It seems that I introduced this regression. One of the goal of having a `ThreadWakeup` and not a `SimpleQueue` is to avoid using locks that can hinder the performance of the executor. I don't remember the exact details but I think I

[issue40418] Small Refactoring: Use bytes.hex() in secrets.token_hex()

2020-04-28 Thread Dennis Sweeney
Change by Dennis Sweeney : -- title: Small Refactoring: Use the bytes.hex() in secrets.token_hex() -> Small Refactoring: Use bytes.hex() in secrets.token_hex() ___ Python tracker

[issue40418] Small Refactoring: Use the bytes.hex() in secrets.token_hex()

2020-04-28 Thread Dennis Sweeney
Change by Dennis Sweeney : -- keywords: +patch pull_requests: +19070 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19749 ___ Python tracker ___

[issue40418] Small Refactoring: Use the bytes.hex() in secrets.token_hex()

2020-04-28 Thread Dennis Sweeney
New submission from Dennis Sweeney : Since bytes.hex() was added in 3.5, we should be able to make the following change: diff --git a/Lib/secrets.py b/Lib/secrets.py index a546efbdd4..1dd8629f52 100644 --- a/Lib/secrets.py +++ b/Lib/secrets.py @@ -13,7 +13,6 @@ __all__ =

[issue40417] PyImport_ReloadModule emits deprecation warning

2020-04-28 Thread Robert Rouhani
New submission from Robert Rouhani : It appears as though PyImport_ReloadModule is importing the deprecated "imp" module. I integrated a newer version of Python into Unreal Engine 4, which internally calls this function for some of it's own modules. Normally a stray warning wouldn't be of

<    1   2