[issue46506] [Windows] wrap CreateFile to support follow_symlinks

2022-01-24 Thread Eryk Sun
New submission from Eryk Sun : Issue 46490 proposes to support follow_symlinks in os.utime() on Windows. Instead of duplicating the os.stat() implementation of follow_symlinks, I suggest factoring out a common _Py_CreateFile() function with two additional parameters: traverse (input) and pFil

[issue46490] Add "follow_symlinks=False" support for "os.utime()" on Windows

2022-01-24 Thread Eryk Sun
Change by Eryk Sun : -- dependencies: +[Windows] wrap CreateFile to support follow_symlinks ___ Python tracker ___ ___ Python-bugs-l

[issue46507] enabling cProfile to profile code given as an argument "à la" timeit

2022-01-24 Thread julien tayon
New submission from julien tayon : well, you want to use python3 -mcProfile -othis.prof 'oneliner in python to test something' And weirdly enough this normally expected behaviour does not work. It's because last argument is expected to be the path of the script name to profile. But, it can be

[issue46483] `pathlib.PurePath.__class_getitem__` does not return `GenericAlias`

2022-01-24 Thread Popo Al
Change by Popo Al : -- components: +Parser, asyncio, email nosy: +barry, lys.nikolaou, pablogsal, r.david.murray, yselivanov type: behavior -> versions: +Python 3.10 ___ Python tracker __

[issue46507] enabling cProfile to profile code given as an argument "à la" timeit

2022-01-24 Thread julien tayon
Change by julien tayon : -- nosy: +matrixise ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue29890] Constructor of ipaddress.IPv*Interface does not follow documentation

2022-01-24 Thread Humbdrag
Change by Humbdrag : -- keywords: +patch nosy: +humbdrag nosy_count: 5.0 -> 6.0 pull_requests: +29043 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/30862 ___ Python tracker

[issue46483] `pathlib.PurePath.__class_getitem__` does not return `GenericAlias`

2022-01-24 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: This issue is not related to the parser, so I am unmarking it. -- components: -Parser ___ Python tracker ___

[issue46431] Trouble subclassing ExceptionGroup

2022-01-24 Thread Irit Katriel
Irit Katriel added the comment: New changeset 573b54515740ce51dcf2402038a9d953aa6c317f by Irit Katriel in branch 'main': bpo-46431: improve error message on invalid calls to BaseExceptionGroup.__new__ (GH-30854) https://github.com/python/cpython/commit/573b54515740ce51dcf2402038a9d953aa6c317

[issue46431] Trouble subclassing ExceptionGroup

2022-01-24 Thread Irit Katriel
Irit Katriel added the comment: New changeset b18fd54f8c27e4b2aac222e75ac58aa85e5a7988 by Irit Katriel in branch 'main': bpo-46431: Add example of subclassing ExceptionGroup. Document the message and exceptions attributes (GH-30852) https://github.com/python/cpython/commit/b18fd54f8c27e4b2aa

[issue46431] Trouble subclassing ExceptionGroup

2022-01-24 Thread Irit Katriel
Irit Katriel added the comment: Thank you Petr. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue46416] Direct invocation of `Lib/test/test_typing.py` fails

2022-01-24 Thread Nikita Sobolev
Nikita Sobolev added the comment: During this work some people have mentioned that they actually use `'__main__'` for local debugging of tests. I don't think that I am familiar enough with the existing workflow to make any educated decision :) пн, 24 янв. 2022 г. в 19:34, Christian Heimes : >

[issue39064] ValueError in zipfile.ZipFile

2022-01-24 Thread Irit Katriel
Change by Irit Katriel : -- keywords: +patch pull_requests: +29044 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30863 ___ Python tracker ___ ___

[issue39064] ValueError in zipfile.ZipFile

2022-01-24 Thread Irit Katriel
Irit Katriel added the comment: It's easy enough to convert the exception type (see patch), but I don't know how to write a unit test for this. -- ___ Python tracker ___

[issue42982] Update suggested number of iterations for pbkdf2_hmac()

2022-01-24 Thread April King
April King added the comment: Django uses 390,000 iterations as of late 2021, as does the Python Cryptography project. We should be aligned with their recommendations, or at least a good deal closer than we are now. 390,000 actually makes it a conservative recommendation for key derivation,

[issue31357] Expose `worker_target` and `workitem_cls` as arugments to customize `ThreadPoolExecutor` behaviour

2022-01-24 Thread Irit Katriel
Change by Irit Katriel : -- type: behavior -> enhancement ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue32203] [ctypes] test_struct_by_value fails on android-24-arm64

2022-01-24 Thread Irit Katriel
Irit Katriel added the comment: 3.7 is no longer being maintained. Please create a new issue if you are having this problem on a current version (>= 3.9) -- nosy: +iritkatriel resolution: -> out of date stage: needs patch -> resolved status: open -> closed __

[issue32202] [ctypes] all long double tests fail on android-24-x86_64

2022-01-24 Thread Irit Katriel
Irit Katriel added the comment: 3.7 is no longer being maintained. Please create a new issue if you are having this problem on a current version (>= 3.9) -- nosy: +iritkatriel resolution: -> out of date stage: needs patch -> resolved status: open -> closed __

[issue38886] permissions too restrictive in zipfile.writestr

2022-01-24 Thread Irit Katriel
Irit Katriel added the comment: Closed issue23976 as duplicate of this. -- nosy: +iritkatriel type: behavior -> enhancement versions: +Python 3.11 -Python 3.8 ___ Python tracker _

[issue41209] Scripts Folder is Empty

2022-01-24 Thread Irit Katriel
Irit Katriel added the comment: 3.8 is no longer maintained. Please create a new issue if you are having this problem with a current python version. -- nosy: +iritkatriel resolution: -> out of date stage: -> resolved status: open -> closed ___ Py

[issue40735] test_nntplib depends on unreliable external servers

2022-01-24 Thread Irit Katriel
Irit Katriel added the comment: Following discussion with Zach and Victor: This is probably an issue with the external servers these tests used. The fix would be to rewrite the tests so that they don't rely on external infrastructure. -- nosy: +iritkatriel, vstinner, zach.ware title:

[issue43545] Use LOAD_GLOBAL to set __module__ in class def

2022-01-24 Thread Irit Katriel
Irit Katriel added the comment: Can you explain what the bug is with code to reproduce it? -- nosy: +iritkatriel status: open -> pending ___ Python tracker ___ ___

[issue46503] assertion failure in Parser/string_parser.c

2022-01-24 Thread Eric V. Smith
Eric V. Smith added the comment: This triggers the same problem: f'\N ' ast.literal_eval() isn't needed. I think it's just the assert that's wrong, but I'm still checking. -- ___ Python tracker ___

[issue11322] encoding package's normalize_encoding() function is too slow

2022-01-24 Thread Gregory P. Smith
Change by Gregory P. Smith : -- nosy: +gregory.p.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:

[issue13011] Frozen programs require the original build directory in order to run.

2022-01-24 Thread Irit Katriel
Irit Katriel added the comment: This seems very outdated, can we close it? -- nosy: +iritkatriel resolution: -> out of date status: open -> pending ___ Python tracker ___ ___

[issue46491] typing: allow Annotated in outermost scope

2022-01-24 Thread Gregory Beauregard
Change by Gregory Beauregard : -- keywords: +patch pull_requests: +29045 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30864 ___ Python tracker _

[issue22045] Python make issue

2022-01-24 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python

[issue26276] Inconsistent behaviour of PEP 3101 formatting between versions

2022-01-24 Thread Irit Katriel
Irit Katriel added the comment: Reproduced on 3.11. -- nosy: +iritkatriel versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.4 ___ Python tracker ___ __

[issue33205] GROWTH_RATE prevents dict shrinking

2022-01-24 Thread Raymond Hettinger
Raymond Hettinger added the comment: Should this have been "filled*3" rather than "used*3"? The intent was to give a larger resize to dict that had a lot of dummy entries and a smaller resize to dicts without deletions. -- ___ Python tracker

[issue46508] codec name acceptance became way too lenient in 3.9

2022-01-24 Thread Gregory P. Smith
New submission from Gregory P. Smith : in 3.8 this was not a valid codec name: "เ_เ_เ_iDnA" in 3.9 it gets treated as idna and triggers the punycode decoder when passed to bytes.decode(codec). Discovered by oss-fuzz. _Likely_ a consequence of https://bugs.python.org/issue37751 The consequence

[issue37751] In codecs, function 'normalizestring' should convert both spaces and hyphens to underscores.

2022-01-24 Thread Gregory P. Smith
Gregory P. Smith added the comment: https://bugs.python.org/issue46508 filed to track fixing the acceptance and use of garbage codec values regression that this caused. -- nosy: +gregory.p.smith ___ Python tracker

[issue37751] In codecs, function 'normalizestring' should convert both spaces and hyphens to underscores.

2022-01-24 Thread Gregory P. Smith
Gregory P. Smith added the comment: (note: this might not be the true cause of that issue; though it sounds potentially related - I haven't investigated far enough yet) -- ___ Python tracker ___

[issue37751] In codecs, function 'normalizestring' should convert both spaces and hyphens to underscores.

2022-01-24 Thread Gregory P. Smith
Gregory P. Smith added the comment: note that Bodo's own followup issue about the breaking change for python-iconv was filed as https://bugs.python.org/issue44723 -- ___ Python tracker _

[issue44723] Codec name normalization breaks custom codecs

2022-01-24 Thread Gregory P. Smith
Change by Gregory P. Smith : -- nosy: +gregory.p.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:

[issue32958] socket module calls with long host names can fail with idna codec error

2022-01-24 Thread Gregory P. Smith
Gregory P. Smith added the comment: ablack: the basic auth username:password@ part of the string is not part of a hostname. What code are you seeing that is trying to send that to a name resolver rather than stripping the obviously private info up through the @ sign? -- nosy: +grego

[issue46508] codec name acceptance became way too lenient in 3.9

2022-01-24 Thread Gregory P. Smith
Gregory P. Smith added the comment: while figuring this issue out, it may also make sense to address https://bugs.python.org/issue44723 as well. -- ___ Python tracker ___ ___

[issue46406] optimize int division

2022-01-24 Thread Tim Peters
Tim Peters added the comment: New changeset 7c26472d09548905d8c158b26b6a2b12de6cdc32 by Tim Peters in branch 'main': bpo-46504: faster code for trial quotient in x_divrem() (GH-30856) https://github.com/python/cpython/commit/7c26472d09548905d8c158b26b6a2b12de6cdc32 -- _

[issue46504] Faster code for trial quotient in x_divrem

2022-01-24 Thread Tim Peters
Tim Peters added the comment: New changeset 7c26472d09548905d8c158b26b6a2b12de6cdc32 by Tim Peters in branch 'main': bpo-46504: faster code for trial quotient in x_divrem() (GH-30856) https://github.com/python/cpython/commit/7c26472d09548905d8c158b26b6a2b12de6cdc32 -- _

[issue46504] Faster code for trial quotient in x_divrem

2022-01-24 Thread Tim Peters
Change by Tim Peters : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ Py

[issue46464] concurrent.futures.ProcessPoolExecutor can deadlock when tcmalloc is used

2022-01-24 Thread Inada Naoki
Inada Naoki added the comment: > The only way to safely launch worker processes on demand is to spawn a worker > launcher process spawned prior to any thread creation that remains idle, with > a sole job of spawn new worker processes for us. That sounds complicated. > That'd be a feature. Le

[issue44723] Codec name normalization breaks custom codecs

2022-01-24 Thread Inada Naoki
Change by Inada Naoki : -- nosy: +methane ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue46464] concurrent.futures.ProcessPoolExecutor can deadlock when tcmalloc is used

2022-01-24 Thread Gregory P. Smith
Gregory P. Smith added the comment: It sounds like we need to introspect the mp_context= passed to ProcessPoolExecutor (and it's default when None) to raise an error when max_tasks_per_child is incompatible with it. -- ___ Python tracker

[issue46503] assertion failure in Parser/string_parser.c

2022-01-24 Thread Eric V. Smith
Change by Eric V. Smith : -- keywords: +patch pull_requests: +29046 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/30865 ___ Python tracker ___

[issue46464] concurrent.futures.ProcessPoolExecutor can deadlock when tcmalloc is used

2022-01-24 Thread Gregory P. Smith
Gregory P. Smith added the comment: and similarly, the dynamic spawning could be kept when the mp_context is spawn (and possibly forkserver). -- ___ Python tracker ___ __

[issue44733] Feature request: maxtasksperchild for ProcessPoolExecutor

2022-01-24 Thread Gregory P. Smith
Gregory P. Smith added the comment: from discussion on the other bug it looks like we should have a way to keep this; we just need to not allow it when the mp_context to be used is the 'fork' one. -- ___ Python tracker

[issue44733] Feature request: maxtasksperchild for ProcessPoolExecutor

2022-01-24 Thread Gregory P. Smith
Gregory P. Smith added the comment: As this is a new feature, it would also be reasonable to have specifying max_tasks_per_child without explicitly specifying a mp_context default to a safe mp_context. -- ___ Python tracker

[issue46503] assertion failure in Parser/string_parser.c

2022-01-24 Thread Eric V. Smith
Eric V. Smith added the comment: Note that f'\N ' (with a single space) isn't enough to trigger this behavior. It requires at least two characters after the '\N'. The first is when the invalid string is recognized, and it's the presence of the second character that triggers the failed assert

[issue46503] assertion failure in Parser/string_parser.c

2022-01-24 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +29047 pull_request: https://github.com/python/cpython/pull/30866 ___ Python tracker _

[issue46503] assertion failure in Parser/string_parser.c

2022-01-24 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset 0daf72194bd4e31de7f12020685bb39a14d6f45e by Eric V. Smith in branch 'main': bpo-46503: Prevent an assert from firing when parsing some invalid \N sequences in f-strings. (GH-30865) https://github.com/python/cpython/commit/0daf72194bd4e31de7f1202

[issue46503] assertion failure in Parser/string_parser.c

2022-01-24 Thread miss-islington
Change by miss-islington : -- pull_requests: +29048 pull_request: https://github.com/python/cpython/pull/30867 ___ Python tracker ___ __

[issue46503] assertion failure in Parser/string_parser.c

2022-01-24 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset c314e3e829943b186e1c894071f00c613433cfe5 by Miss Islington (bot) in branch '3.9': bpo-46503: Prevent an assert from firing when parsing some invalid \N sequences in f-strings. (GH-30865) (30867) https://github.com/python/cpython/commit/c314e3e82

[issue46503] assertion failure in Parser/string_parser.c

2022-01-24 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset 894e8c13484822458d53cc77c9265b7a88450a4b by Miss Islington (bot) in branch '3.10': bpo-46503: Prevent an assert from firing when parsing some invalid \N sequences in f-strings. (GH-30865) (GH-30866) https://github.com/python/cpython/commit/894e8

[issue46503] assertion failure in Parser/string_parser.c

2022-01-24 Thread Eric V. Smith
Change by Eric V. Smith : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue41841] idlelib/NEWS.txt for 3.10.0 and backports

2022-01-24 Thread Terry J. Reedy
Change by Terry J. Reedy : -- pull_requests: +29049 pull_request: https://github.com/python/cpython/pull/30868 ___ Python tracker ___ __

[issue41841] idlelib/NEWS.txt for 3.10.0 and backports

2022-01-24 Thread Terry J. Reedy
Change by Terry J. Reedy : -- superseder: IDLE subsection of What's New 3.11 -> idlelib/NEWS.txt for 3.11.0 and backports ___ Python tracker ___ __

[issue41841] idlelib/NEWS.txt for 3.10.0 and backports

2022-01-24 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 9d3c9788a6ccd4f2f53a147dd0026a316c396976 by Terry Jan Reedy in branch 'main': bpo-41841: update idlelib News up to 3.10.0. (GH-30868) https://github.com/python/cpython/commit/9d3c9788a6ccd4f2f53a147dd0026a316c396976 -- ___

[issue41841] idlelib/NEWS.txt for 3.10.0 and backports

2022-01-24 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 1.0 -> 2.0 pull_requests: +29050 pull_request: https://github.com/python/cpython/pull/30870 ___ Python tracker _

[issue41841] idlelib/NEWS.txt for 3.10.0 and backports

2022-01-24 Thread Terry J. Reedy
Change by Terry J. Reedy : -- pull_requests: +29051 pull_request: https://github.com/python/cpython/pull/30871 ___ Python tracker ___ __

[issue46509] Type-specialized Py_DECREF

2022-01-24 Thread Dennis Sweeney
New submission from Dennis Sweeney : GCC --enable-optimizations --with-lto on WSL: Slower (7): - json_dumps: 12.8 ms +- 0.2 ms -> 13.1 ms +- 0.3 ms: 1.02x slower - meteor_contest: 106 ms +- 2 ms -> 109 ms +- 3 ms: 1.02x slower - telco: 6.50 ms +- 0.17 ms -> 6.58 ms +- 0.18 ms: 1.01x slower - fa

[issue46509] Type-specialized Py_DECREF

2022-01-24 Thread Dennis Sweeney
Change by Dennis Sweeney : -- keywords: +patch pull_requests: +29052 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30872 ___ Python tracker ___ _

[issue46509] Type-specialized Py_DECREF

2022-01-24 Thread Dennis Sweeney
Dennis Sweeney added the comment: This attempts to avoid the dispatch dance of Py_DECREF(op) :: Py_TYPE(op)->tp_dealloc(op) :: Py_TYPE(op)->tp_free((PyObject *)op); I suspect this earns the most speedup from floats, where freelist manipulation can be inlined. This might make a single-digit-

[issue44796] Add __parameters__ and __getitem__ in TypeVar and ParamSpec

2022-01-24 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: The linked PR makes `T = TypeVar("T"); T[int]` work. That's not currently meaningful syntax to the type checker, but we may want it in the future for higher-kinded types. I would rather not make this change without a clear static typing use case in mind. --

[issue46476] Not all memory allocated by _Py_Quicken() is released at Python exit

2022-01-24 Thread Kumar Aditya
Kumar Aditya added the comment: In the end I was able to restore the codeobjects before they were quickened so it works for both embedded and python command now. See the latest commits and it is also ready for review now. -- ___ Python tracker

[issue46491] typing: allow Annotated in outermost scope

2022-01-24 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +29053 pull_request: https://github.com/python/cpython/pull/30873 ___ Python tracker _

[issue46491] typing: allow Annotated in outermost scope

2022-01-24 Thread miss-islington
Change by miss-islington : -- pull_requests: +29054 pull_request: https://github.com/python/cpython/pull/30874 ___ Python tracker ___ __

[issue46491] typing: allow Annotated in outermost scope

2022-01-24 Thread miss-islington
miss-islington added the comment: New changeset e1abffca45b60729c460e3e2ad50c8c1946cfd4e by Gregory Beauregard in branch 'main': bpo-46491: Allow Annotated on outside of Final/ClassVar (GH-30864) https://github.com/python/cpython/commit/e1abffca45b60729c460e3e2ad50c8c1946cfd4e -- _

[issue41841] idlelib/NEWS.txt for 3.10.0 and backports

2022-01-24 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 98cabce59958914b59914abbffbfde7129d4c47f by Terry Jan Reedy in branch '3.9': bpo-41841: update idlelib News up to 3.10.0 (GH-30871) https://github.com/python/cpython/commit/98cabce59958914b59914abbffbfde7129d4c47f -- _

[issue41841] idlelib/NEWS.txt for 3.10.0 and backports

2022-01-24 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset ce79b504a790d02c080449d31356d33a5aaf19dd by Miss Islington (bot) in branch '3.10': bpo-41841: update idlelib News up to 3.10.0. (GH-30868) (GH-30870) https://github.com/python/cpython/commit/ce79b504a790d02c080449d31356d33a5aaf19dd --

[issue40280] Consider supporting emscripten/webassembly as a build target

2022-01-24 Thread Christian Heimes
Christian Heimes added the comment: New changeset 8464fbc42ecc9ce504faac499711dcdc6eedef16 by Christian Heimes in branch 'main': bpo-40280: Skip subprocess-based tests on wasm32-emscripten (GH-30615) https://github.com/python/cpython/commit/8464fbc42ecc9ce504faac499711dcdc6eedef16 -

[issue46496] idlelib/NEWS.txt for 3.11.0 and backports

2022-01-24 Thread Terry J. Reedy
Change by Terry J. Reedy : -- keywords: +patch pull_requests: +29055 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30875 ___ Python tracker ___ _

[issue46496] idlelib/NEWS.txt for 3.11.0 and backports

2022-01-24 Thread Terry J. Reedy
Change by Terry J. Reedy : -- pull_requests: +29056 pull_request: https://github.com/python/cpython/pull/30876 ___ Python tracker ___ __

[issue46496] idlelib/NEWS.txt for 3.11.0 and backports

2022-01-24 Thread Terry J. Reedy
Change by Terry J. Reedy : -- pull_requests: +29057 pull_request: https://github.com/python/cpython/pull/30877 ___ Python tracker ___ __

[issue46510] Update Python2-style exception handling

2022-01-24 Thread Irit Katriel
New submission from Irit Katriel : Following issue45711 the redundancy in exc_info is now explicit. This means that we can now safely update places that still use python2-style exception handling code, like: exc_type, exc_value = sys.exc_info()[:2] try:

[issue46510] Update Python2-style exception handling

2022-01-24 Thread Irit Katriel
Change by Irit Katriel : -- keywords: +patch pull_requests: +29058 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30878 ___ Python tracker ___ ___

<    1   2