[issue44689] ctypes.util.find_library() does not find macOS 11+ system libraries when built on older macOS systems

2021-08-30 Thread Ned Deily
Change by Ned Deily : -- assignee: -> ned.deily stage: patch review -> commit review title: MacOS: Python binaries not portable between Catalina and Big Sur -> ctypes.util.find_library() does not find macOS 11+ system libraries when built on older macOS systems versions: +Python 3.8

[issue45007] OpenSSL 1.1.1l is released

2021-08-30 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 9.0 -> 10.0 pull_requests: +26499 pull_request: https://github.com/python/cpython/pull/28055 ___ Python tracker

[issue45007] OpenSSL 1.1.1l is released

2021-08-30 Thread miss-islington
Change by miss-islington : -- pull_requests: +26500 pull_request: https://github.com/python/cpython/pull/28056 ___ Python tracker ___ __

[issue36521] Consider removing docstrings from co_consts in code objects

2021-08-30 Thread Irit Katriel
Irit Katriel added the comment: Are you suggesting that anyone who calls PyFunction_New needs to add a doc string assignment following the call? This is public api, so that would break people’s working code. -- ___ Python tracker

[issue45047] Update demo files

2021-08-30 Thread Irit Katriel
Irit Katriel added the comment: The demos directory is described as follows: “This directory contains a collection of demonstration scripts for various aspects of Python programming.“ Which aspect of python programming does the rat in a maze demo cover which is not already covered by the exis

[issue45025] Reliance on C bit fields in C API is undefined behavior

2021-08-30 Thread Georg Brandl
Change by Georg Brandl : -- nosy: +vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue22393] multiprocessing.Pool shouldn't hang forever if a worker process dies unexpectedly

2021-08-30 Thread Ruairidh MacLeod
Change by Ruairidh MacLeod : -- nosy: +rkm ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue45025] Reliance on C bit fields in C API is undefined behavior

2021-08-30 Thread Georg Brandl
Change by Georg Brandl : -- nosy: +georg.brandl ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue44919] TypedDict subtypes ignore any other metaclasses in 3.9+

2021-08-30 Thread Yurii Karabas
Change by Yurii Karabas <1998uri...@gmail.com>: -- keywords: +patch nosy: +uriyyo nosy_count: 1.0 -> 2.0 pull_requests: +26501 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28057 ___ Python tracker

[issue45049] added cbrt() in MATH_RADIANS_METHODDEF which is missing before

2021-08-30 Thread Ayush Parikh
Change by Ayush Parikh : -- nosy: Ayushparikh-code priority: normal pull_requests: 26502 severity: normal status: open title: added cbrt() in MATH_RADIANS_METHODDEF which is missing before type: enhancement ___ Python tracker

[issue45047] Update demo files

2021-08-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There are currently many resources in internet where you can find examples and demos on Python. The CPython distribution should not include every piece of code written by Python learner. You can publish it on GitHab, on StackOverflow, on more specialized r

[issue45049] added cbrt() in MATH_RADIANS_METHODDEF which is missing before

2021-08-30 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : We do not need a duplicate of function declaration. -- nosy: +serhiy.storchaka resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker __

[issue44689] ctypes.util.find_library() does not find macOS 11+ system libraries when built on older macOS systems

2021-08-30 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 7234e67642bc8e75f44a2e1f2ce06687b5ac72ec by Miss Islington (bot) in branch '3.8': bpo-44689: ctypes.util.find_library() now finds macOS 11+ system libraries when built on older macOS systems (GH-27251) (GH-28054) https://github.com/python/cpython/

[issue44689] ctypes.util.find_library() does not find macOS 11+ system libraries when built on older macOS systems

2021-08-30 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 4b55837e7c747e0f3bd2df1b5c8996ce86c6f60a by Miss Islington (bot) in branch '3.9': bpo-44689: ctypes.util.find_library() now finds macOS 11+ system libraries when built on older macOS systems (GH-27251) (GH-28053) https://github.com/python/cpython/

[issue44689] ctypes.util.find_library() does not find macOS 11+ system libraries when built on older macOS systems

2021-08-30 Thread miss-islington
miss-islington added the comment: New changeset 41c87c41761739e90867a43de26e0f6755c80ff7 by Miss Islington (bot) in branch '3.10': bpo-44689: ctypes.util.find_library() now finds macOS 11+ system libraries when built on older macOS systems (GH-27251) https://github.com/python/cpython/commit/

[issue39320] Handle unpacking of */** arguments and rvalues in the compiler

2021-08-30 Thread Mark Shannon
Change by Mark Shannon : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue45048] subprocess.run(capture_output=Bool) does the opposite of expected

2021-08-30 Thread DragonEggBedrockBreaking
DragonEggBedrockBreaking added the comment: Ok, thanks, I understand now. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ __

[issue45007] OpenSSL 1.1.1l is released

2021-08-30 Thread miss-islington
Change by miss-islington : -- pull_requests: +26503 pull_request: https://github.com/python/cpython/pull/28059 ___ Python tracker ___ __

[issue45007] OpenSSL 1.1.1l is released

2021-08-30 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 1f89e51fef8f4c15a719fbb3d1cec8ca7e2bc46f by Miss Islington (bot) in branch '3.8': bpo-45007: Update macOS installer builds to use OpenSSL 1.1.1l (GH-28051) (GH-28059) https://github.com/python/cpython/commit/1f89e51fef8f4c15a719fbb3d1cec8ca7e2bc46

[issue45045] Optimize mapping patterns of structural pattern matching

2021-08-30 Thread Dong-hee Na
Dong-hee Na added the comment: New changeset e6497fe698f6e87344501a68ffdea106eafcb257 by Dong-hee Na in branch 'main': bpo-45045: Optimize mapping patterns of structural pattern matching (GH-28043) https://github.com/python/cpython/commit/e6497fe698f6e87344501a68ffdea106eafcb257 --

[issue45045] Optimize mapping patterns of structural pattern matching

2021-08-30 Thread Dong-hee Na
Change by Dong-hee Na : -- stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailin

[issue45045] Optimize mapping patterns of structural pattern matching

2021-08-30 Thread Dong-hee Na
Dong-hee Na added the comment: For the record, Final benchmark with optimization build + thin LTO option. +---+---+--+ | Benchmark | thin_lto_base | thin_lto_opt | +===+===+==+ | bench pattern

[issue45042] Many multiprocessing tests are silently skipped since 3.9

2021-08-30 Thread Nikita Sobolev
Nikita Sobolev added the comment: Looks like that this happens because tests classes are decorated with `@hashlib_helper.requires_hashdigest('md5')`: https://github.com/python/cpython/blob/2a8127cafe1d196f858a3ecabf5f1df3eebf9a12/Lib/test/_test_multiprocessing.py#L4482-L4485 Tests above run

[issue45042] Many multiprocessing tests are silently skipped since 3.9

2021-08-30 Thread Nikita Sobolev
Change by Nikita Sobolev : -- keywords: +patch pull_requests: +26504 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28060 ___ Python tracker ___ _

[issue45042] Many multiprocessing tests are silently skipped since 3.9

2021-08-30 Thread Antoine Pitrou
Antoine Pitrou added the comment: Wow. I hope this didn't hide any regression :-( -- ___ Python tracker ___ ___ Python-bugs-list ma

[issue45007] OpenSSL 1.1.1l is released

2021-08-30 Thread miss-islington
Change by miss-islington : -- pull_requests: +26505 pull_request: https://github.com/python/cpython/pull/28061 ___ Python tracker ___ __

[issue45007] OpenSSL 1.1.1l is released

2021-08-30 Thread miss-islington
miss-islington added the comment: New changeset d6cb5dd9e19210f5963ff8beadde7ca2fda71574 by Łukasz Langa in branch 'main': bpo-45007: Update multissl to openssl 1.1.1l as well (GH-28044) https://github.com/python/cpython/commit/d6cb5dd9e19210f5963ff8beadde7ca2fda71574 -- ___

[issue45007] OpenSSL 1.1.1l is released

2021-08-30 Thread Christian Heimes
Change by Christian Heimes : -- pull_requests: +26506 pull_request: https://github.com/python/cpython/pull/28062 ___ Python tracker ___

[issue45007] OpenSSL 1.1.1l is released

2021-08-30 Thread Christian Heimes
Change by Christian Heimes : -- pull_requests: +26507 pull_request: https://github.com/python/cpython/pull/28063 ___ Python tracker ___

[issue45042] Many multiprocessing tests are silently skipped since 3.9

2021-08-30 Thread Nikita Sobolev
Nikita Sobolev added the comment: Looks like it did, two newly-unignored tests are failing: https://github.com/python/cpython/pull/28060#issuecomment-908295411 пн, 30 авг. 2021 г. в 15:16, Antoine Pitrou : > > Antoine Pitrou added the comment: > > Wow. I hope this didn't hide any regression :

[issue45007] OpenSSL 1.1.1l is released

2021-08-30 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 8371290753bed7fbb939a51ea7ff0991ea32a89c by Christian Heimes in branch '3.8': [3.8] bpo-45007: Update multissl to openssl 1.1.1l as well (GH-28044) (GH-28063) https://github.com/python/cpython/commit/8371290753bed7fbb939a51ea7ff0991ea32a89c -

[issue45007] OpenSSL 1.1.1l is released

2021-08-30 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 576803d7a8083cb25c58be08d3cb31e05d5d2f8a by Christian Heimes in branch '3.9': [3.9] bpo-45007: Update multissl to openssl 1.1.1l as well (GH-28044) (GH-28062) https://github.com/python/cpython/commit/576803d7a8083cb25c58be08d3cb31e05d5d2f8a -

[issue45007] OpenSSL 1.1.1l is released

2021-08-30 Thread miss-islington
miss-islington added the comment: New changeset dc46f4c9846ad16567ab293b405efc3ed10ab9d5 by Miss Islington (bot) in branch '3.10': bpo-45007: Update multissl to openssl 1.1.1l as well (GH-28044) https://github.com/python/cpython/commit/dc46f4c9846ad16567ab293b405efc3ed10ab9d5 -- __

[issue45042] Many multiprocessing tests are silently skipped since 3.9

2021-08-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Nikita. The difference between the original and the proposed in PR 28060 code is that in the original code the conditional was tested at the testing time, while in the proposed code it is tested at the loading time. I do not know what effect it

[issue41620] Python Unittest does not return results object when the test is skipped

2021-08-30 Thread miss-islington
Change by miss-islington : -- pull_requests: +26509 pull_request: https://github.com/python/cpython/pull/28065 ___ Python tracker ___ __

[issue41620] Python Unittest does not return results object when the test is skipped

2021-08-30 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 7e246a3a7b43762480ee4fe0cfb859e8e997a8c8 by Serhiy Storchaka in branch 'main': bpo-41620: TestCase.run() now always return a TestResult instance (GH-28030) https://github.com/python/cpython/commit/7e246a3a7b43762480ee4fe0cfb859e8e997a8c8

[issue41620] Python Unittest does not return results object when the test is skipped

2021-08-30 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 8.0 -> 9.0 pull_requests: +26508 pull_request: https://github.com/python/cpython/pull/28064 ___ Python tracker _

[issue45007] OpenSSL 1.1.1l is released

2021-08-30 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 52bdda50d7b79e1ad7e57967850beff64c3ede92 by Łukasz Langa in branch '3.10': [3.10] bpo-45007: Update to OpenSSL 1.1.1l in Windows build and CI (GH-28009) (GH-28039) https://github.com/python/cpython/commit/52bdda50d7b79e1ad7e57967850beff64c3ede92

[issue45042] Many multiprocessing tests are silently skipped since 3.9

2021-08-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is the implementation of the second option: def requires_hashdigest(digestname, openssl=None, usedforsecurity=True): def decorator(func): if isinstance(func, type): setUpClass = func.__dict__.get('setUpClass') if setU

[issue45007] OpenSSL 1.1.1l is released

2021-08-30 Thread Łukasz Langa
Łukasz Langa added the comment: CI as well as Windows and macOS installers upgraded to use 1.1.1l all the way to 3.8 inclusive. Closing. Thanks all! ✨ 🍰 ✨ -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8 ___

[issue44449] Segfault in _PyTrash_begin when faulthandler tries to dump thread stacks

2021-08-30 Thread STINNER Victor
STINNER Victor added the comment: New changeset fe997e1a67835a929705c8c305d41c4d7dd326e3 by Victor Stinner in branch '3.10': bpo-9: faulthandler don't modify frame refcnt (GH-27850) https://github.com/python/cpython/commit/fe997e1a67835a929705c8c305d41c4d7dd326e3 -- ___

[issue44449] Segfault in _PyTrash_begin when faulthandler tries to dump thread stacks

2021-08-30 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +26510 pull_request: https://github.com/python/cpython/pull/28066 ___ Python tracker _

[issue44874] Deprecate Py_TRASHCAN_SAFE_BEGIN/END

2021-08-30 Thread STINNER Victor
STINNER Victor added the comment: Thanks Irit for making progress on this annoying old C API! -- nosy: +vstinner ___ Python tracker ___ ___

[issue44394] [security] CVE-2013-0340 "Billion Laughs" fixed in Expat >=2.4.0: Update vendored copy to expat 2.4.1

2021-08-30 Thread STINNER Victor
STINNER Victor added the comment: I created https://python-security.readthedocs.io/vuln/expat-billion-laughs.html to track this vulnerability. -- ___ Python tracker ___ _

[issue41620] Python Unittest does not return results object when the test is skipped

2021-08-30 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 0c5e0aa73f6f70d16d21ad9e1eb2d0fe3a334f0a by Miss Islington (bot) in branch '3.9': bpo-41620: TestCase.run() now always return a TestResult instance (GH-28030) (GH-28065) https://github.com/python/cpython/commit/0c5e0aa73f6f70d16d21ad9e1eb2d0fe3a33

[issue41620] Python Unittest does not return results object when the test is skipped

2021-08-30 Thread miss-islington
miss-islington added the comment: New changeset 243b8de0b15061704581974c0a27db1232a43b93 by Miss Islington (bot) in branch '3.10': bpo-41620: TestCase.run() now always return a TestResult instance (GH-28030) https://github.com/python/cpython/commit/243b8de0b15061704581974c0a27db1232a43b93 -

[issue41620] Python Unittest does not return results object when the test is skipped

2021-08-30 Thread Łukasz Langa
Łukasz Langa added the comment: Thanks for the report and initial patch, Iman! ✨ 🍰 ✨ And thanks Serhiy for pushing this across the finish line. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue45042] Many multiprocessing tests are silently skipped since 3.9

2021-08-30 Thread Nikita Sobolev
Nikita Sobolev added the comment: Serhiy, yes, you are right. I guess, it is safe to assume that load-time/test-time might make a difference, especially with `_hashlib`. I've commited your suggestion, thanks a lot for your help! -- ___ Python trac

[issue31299] Add "ignore_modules" option to TracebackException.format()

2021-08-30 Thread Irit Katriel
Change by Irit Katriel : -- pull_requests: +26511 pull_request: https://github.com/python/cpython/pull/28067 ___ Python tracker ___

[issue34561] Replace list sorting merge_collapse()?

2021-08-30 Thread Brandt Bucher
Change by Brandt Bucher : -- nosy: +brandtbucher ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue44449] Segfault in _PyTrash_begin when faulthandler tries to dump thread stacks

2021-08-30 Thread miss-islington
miss-islington added the comment: New changeset 720aef48b558e68c07937f0cc8d62a60f23dcb3d by Miss Islington (bot) in branch '3.9': bpo-9: faulthandler don't modify frame refcnt (GH-27850) https://github.com/python/cpython/commit/720aef48b558e68c07937f0cc8d62a60f23dcb3d -- __

[issue44449] Segfault in _PyTrash_begin when faulthandler tries to dump thread stacks

2021-08-30 Thread STINNER Victor
STINNER Victor added the comment: The bug should now be fixed in 3.9 and 3.10 branches. The main branch should not be impacted, it has a different implementation. Thanks for the bug report Duncan Grisby. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed

[issue45021] Race condition in thread.py

2021-08-30 Thread STINNER Victor
STINNER Victor added the comment: I don't understand anything about multiprocessing, nor its API, but some people seem to find it useful :-D I remove myself from the nosy list ;-) -- ___ Python tracker

[issue45021] Race condition in thread.py

2021-08-30 Thread STINNER Victor
Change by STINNER Victor : -- nosy: -vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue20658] os.environ.clear() fails with empty keys (posix.unsetenv)

2021-08-30 Thread Irit Katriel
Change by Irit Katriel : -- stage: test needed -> resolved status: pending -> closed ___ Python tracker ___ ___ Python-bugs-list mai

[issue20658] os.environ.clear() fails with empty keys (posix.unsetenv)

2021-08-30 Thread STINNER Victor
STINNER Victor added the comment: The following command still fails on the Python main branch on Linux: --- $ env -i =value ./python -c 'import pprint, os; pprint.pprint(os.environ); del os.environ[""]' environ({'': 'value', 'LC_CTYPE': 'C.UTF-8'}) Traceback (most recent call last): File "",

[issue20658] os.environ.clear() fails with empty keys (posix.unsetenv)

2021-08-30 Thread STINNER Victor
STINNER Victor added the comment: By the way: --- The env command from GNU coreutils supports setting the environment variable with an empty name but not unsetting it. That's a bug. $ env '=wibble' env |grep wibble =wibble $ env '=wibble' env -u '' env env: ca

[issue20658] os.environ.clear() fails with empty keys (posix.unsetenv)

2021-08-30 Thread Irit Katriel
Irit Katriel added the comment: I see, so intercepting the assignment is not enough. Reopening. -- resolution: out of date -> status: closed -> open ___ Python tracker ___ __

[issue45042] Many multiprocessing tests are silently skipped since 3.9

2021-08-30 Thread Łukasz Langa
Łukasz Langa added the comment: FYI, there seem to be two Windows-specific regressions since the tests were unintentionally disabled, namely test_shared_memory_basics and test_checksum_fodder. Following Serhiy's advice, I elect to have those tests skipped for now on Windows and fix them thro

[issue20658] os.environ.clear() fails with empty keys (posix.unsetenv)

2021-08-30 Thread STINNER Victor
STINNER Victor added the comment: Attached set_unset_env.c program calls putenv("=hello world") and then unsetenv(""). On my Fedora 34 with glibc-2.33-20.fc34.x86_64, putenv() succeed, but unsetenv() fails. --- $ gcc set_unset_env.c -g -o set_unset_env && ./set_unset_env putenv("=hello world

[issue17120] Mishandled _POSIX_C_SOURCE and _XOPEN_SOURCE in pyconfig.h

2021-08-30 Thread STINNER Victor
STINNER Victor added the comment: On my Fedora 34, running ./configure creates pyconfig.h with these values: $ grep -E '_POSIX_C_SOURCE|_XOPEN_SOURCE' -B1 pyconfig.h /* Define to activate features from IEEE Stds 1003.1-2008 */ #define _POSIX_C_SOURCE 200809L -- /* Define to the level of X/Open

[issue45025] Reliance on C bit fields in C API is undefined behavior

2021-08-30 Thread STINNER Victor
STINNER Victor added the comment: > At least the PyASCIIObject struct in Include/cpython/unicodeobject.h uses bit > fields. Various preprocessor macros like PyUnicode_IS_ASCII() and > PyUnicode_KIND() access this struct's bit field. What is your use case? Which functions do you need? You sh

[issue20658] os.environ.clear() fails with empty keys (posix.unsetenv)

2021-08-30 Thread STINNER Victor
STINNER Victor added the comment: For the very specific case of os.environ.clear(), the C function clearenv() could be used if available. While clearenv() is available in the glibc, it's not a POSIX function. -- ___ Python tracker

[issue45025] Reliance on C bit fields in C API is undefined behavior

2021-08-30 Thread Petr Viktorin
Petr Viktorin added the comment: The macro PyUnicode_KIND is part of the documented public C API. It accesses the bit field "state.kind" directly. -- ___ Python tracker ___ _

[issue14088] sys.executable generating canonical path

2021-08-30 Thread STINNER Victor
STINNER Victor added the comment: test_sys: def test_executable(self): # sys.executable should be absolute self.assertEqual(os.path.abspath(sys.executable), sys.executable) IMO the test is wrong. It must test: test.assertTrue(os.path.isabs(sys.executable)). The path is n

[issue14088] sys.executable generating canonical path

2021-08-30 Thread STINNER Victor
STINNER Victor added the comment: > The path is not required to be normalized. I'm talking about the current implementation. I'm not against making Python even better: attempt to normalize the path ;-) -- ___ Python tracker

[issue45025] Reliance on C bit fields in C API is undefined behavior

2021-08-30 Thread STINNER Victor
STINNER Victor added the comment: > The macro PyUnicode_KIND is part of the documented public C API. IMO it was a mistake to expose it as part of the public C API. This is an implementation detail which should not be exposed. The C API should not expose *directly* how characters are stored i

[issue37596] Reproducible pyc: frozenset is not serialized in a deterministic order

2021-08-30 Thread Brandt Bucher
Change by Brandt Bucher : -- pull_requests: +26512 pull_request: https://github.com/python/cpython/pull/28068 ___ Python tracker ___ ___

[issue45025] Reliance on C bit fields in C API is undefined behavior

2021-08-30 Thread STINNER Victor
STINNER Victor added the comment: > In order to avoid undefined behavior, Python's C API should avoid all use of > bit fields. See also the PEP 620. IMO more generally, the C API should not expose structures, but provide ways to access it through getter and setter functions. See bpo-40120 "

[issue45025] Reliance on C bit fields in C API is undefined behavior

2021-08-30 Thread Petr Viktorin
Petr Viktorin added the comment: PyUnicode_KIND does *not* expose the implementation details to the programmer. If the internal representation os strings is switched to use masks and shifts instead of bitfields, PyUnicode_KIND (and others) can be adapted to the new details without breaking A

[issue25867] os.stat raises exception when using unicode and no locale is set

2021-08-30 Thread STINNER Victor
STINNER Victor added the comment: > It's doing this now, so seems like it has been fixed: % env -i ./python.exe > (...) Right. It's correct to close the issue. The PEP 540 added a UTF-8 Mode. This mode is enabled if Python is started with the "C" or "POSIX" locale (LC_CTYPE category). If th

[issue45025] Reliance on C bit fields in C API is undefined behavior

2021-08-30 Thread STINNER Victor
STINNER Victor added the comment: > PyUnicode_KIND does *not* expose the implementation details to the programmer. PyUnicode_KIND() is very specific to the exact PEP 393 implementation. Documentation of this field: --- /* Character size: - PyUnicode_WCHAR_KIND (0): * character type

[issue45045] Optimize mapping patterns of structural pattern matching

2021-08-30 Thread Brandt Bucher
Brandt Bucher added the comment: Thanks, this is awesome. FYI, there's probably more low-hanging fruit like this scattered about the pattern matching implementation. It's all very new code, mostly written by one person ;). (I wouldn't worry too much about the pattern compiler, though... I'm

[issue45045] Optimize mapping patterns of structural pattern matching

2021-08-30 Thread Brandt Bucher
Brandt Bucher added the comment: I'm also in the process of creating some pattern matching benchmarks. You might find them useful for benching optimizations like this in the future: https://github.com/brandtbucher/patmaperformance In particular, I'm curious to see the impact of this change o

[issue44019] operator.call/operator.__call__

2021-08-30 Thread STINNER Victor
STINNER Victor added the comment: Python 2.7 had apply(func, args, kwargs) which called func(*args, **kwargs). https://docs.python.org/2.7/library/functions.html#apply There is also functools.partial(func, *args, **kwargs)(*args2, **kwargs2) which calls func(*args, *args2, **kwargs, **kwargs2

[issue44019] operator.call/operator.__call__

2021-08-30 Thread STINNER Victor
STINNER Victor added the comment: > An actual use case I had for such an operator was collecting a bunch of > callables in a list and wanting to dispatch them to > concurrent.futures.Executor.map, i.e. something like > `executor.map(operator.call, funcs)` (to get the parallelized version of

[issue45020] Freeze all modules imported during startup.

2021-08-30 Thread Eric Snow
Eric Snow added the comment: On Fri, Aug 27, 2021 at 6:29 PM Guido van Rossum wrote: > The plot thickens. By searching my extensive GMail archives for Jeethu Rao I > found > an email from Sept. 14 to python-dev by Larry Hastings titled "Store startup > modules > as C structures for 20%+ star

[issue45045] Optimize mapping patterns of structural pattern matching

2021-08-30 Thread Dong-hee Na
Dong-hee Na added the comment: > https://github.com/brandtbucher/patmaperformance Nice benchmark suite, I will take a look :) -- ___ Python tracker ___ __

[issue44887] test_input_tty hangs when run multiple times in the same process on macOS 10.15

2021-08-30 Thread STINNER Victor
STINNER Victor added the comment: Is it related to https://bugs.python.org/issue41034 ? -- nosy: +vstinner ___ Python tracker ___ _

[issue45050] created unittest file analyze_text.py

2021-08-30 Thread Ayush Parikh
Change by Ayush Parikh : -- nosy: Ayushparikh-code priority: normal pull_requests: 26513 severity: normal status: open title: created unittest file analyze_text.py type: enhancement ___ Python tracker ___

[issue45050] created unittest file analyze_text.py

2021-08-30 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : It is unneeded. -- nosy: +serhiy.storchaka resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue43913] unittest module cleanup functions not run unless tearDownModule() is defined

2021-08-30 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 08d9e597c8ef5a2b26375ac954fdf224f5d82c3c by Serhiy Storchaka in branch 'main': bpo-43913: Fix bugs in cleaning up classes and modules in unittest. (GH-28006) https://github.com/python/cpython/commit/08d9e597c8ef5a2b26375ac954fdf224f5d82c3c --

[issue43913] unittest module cleanup functions not run unless tearDownModule() is defined

2021-08-30 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 9.0 -> 10.0 pull_requests: +26514 pull_request: https://github.com/python/cpython/pull/28070 ___ Python tracker

[issue43913] unittest module cleanup functions not run unless tearDownModule() is defined

2021-08-30 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +26515 pull_request: https://github.com/python/cpython/pull/28071 ___ Python tracker ___

[issue45025] Reliance on C bit fields in C API is undefined behavior

2021-08-30 Thread Gregory Szorc
Gregory Szorc added the comment: My use case for these low-level APIs is to write tests for low-level string/encoding handling in my custom use of the PyPreConfig and PyConfig structs. I wanted to verify that exact byte sequences were turned into specific representations inside of Python str

[issue45051] wrote optimised async_test.py for async lib

2021-08-30 Thread Ayush Parikh
Change by Ayush Parikh : -- nosy: Ayushparikh-code priority: normal pull_requests: 26516 severity: normal status: open title: wrote optimised async_test.py for async lib type: enhancement ___ Python tracker _

[issue45051] wrote optimised async_test.py for async lib

2021-08-30 Thread Zachary Ware
New submission from Zachary Ware : Ayush, your PRs are starting to look like spam. Please slow down and ask for advice on what contributions would be welcome. We have several resources available for this, such as the core-mentors...@python.org mailing list, the discuss.python.org discussion

[issue45020] Freeze all modules imported during startup.

2021-08-30 Thread Eric Snow
Eric Snow added the comment: On Fri, Aug 27, 2021 at 11:14 PM Larry Hastings wrote: > [snip] On the other hand: if we made a viable tool that could consume some > arbitrary > set of .py files and produce a C file, and said C file could then be compiled > into a > shared library, end users co

[issue43913] unittest module cleanup functions not run unless tearDownModule() is defined

2021-08-30 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 9827710a400848c9430ed364ed5d2d54f0926701 by Serhiy Storchaka in branch '3.9': [3.9] bpo-43913: Fix bugs in cleaning up classes and modules in unittest. (GH-28006) (GH-28071) https://github.com/python/cpython/commit/9827710a400848c9430ed364ed5d2d54

[issue45020] Freeze all modules imported during startup.

2021-08-30 Thread Eric Snow
Eric Snow added the comment: At this point, here are the open questions I'm seeing: + The editing-stdlib-.py-files problem: * use a command-line flag to opt-out of frozen modules? * use a build flag to opt out (e.g. a configure flag or a new Py_NO_FROZEN or even Py_DEBUG)? * ignore f

[issue45020] Freeze all modules imported during startup.

2021-08-30 Thread Eric Snow
Eric Snow added the comment: > * tricks to inject hooks ASAP (e.g. coverage.py swaps the encodings module) > may lose their entry point FWIW, I asked Ned Batchelder about this and he said this approach ("fullcoverage" [1]) was added to support running coverage on the stdlib. It doesn't aff

[issue44019] operator.call/operator.__call__

2021-08-30 Thread Antony Lee
Antony Lee added the comment: > I'm not convinced that operator.caller() would be useful to me. To be clear, as noted above, I have realized that the semantics I initially proposed (now known as "caller") are not particularly useful; the semantics I am proposing (and implementing in the link

[issue43913] unittest module cleanup functions not run unless tearDownModule() is defined

2021-08-30 Thread miss-islington
miss-islington added the comment: New changeset d65fad04fad1a73b6bb17bcb08ca6f0a24376952 by Miss Islington (bot) in branch '3.10': bpo-43913: Fix bugs in cleaning up classes and modules in unittest. (GH-28006) https://github.com/python/cpython/commit/d65fad04fad1a73b6bb17bcb08ca6f0a24376952

[issue43398] [sqlite3] sqlite3.connect() segfaults if given a faulty Connection factory

2021-08-30 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset f62763d26755260c31c717fb396550e00eb6b2a0 by Erlend Egeberg Aasland in branch 'main': bpo-43398: Add test for defect connection factories (GH-27966) https://github.com/python/cpython/commit/f62763d26755260c31c717fb396550e00eb6b2a0 --

[issue43398] [sqlite3] sqlite3.connect() segfaults if given a faulty Connection factory

2021-08-30 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Is something missing here? -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___

[issue43913] unittest module cleanup functions not run unless tearDownModule() is defined

2021-08-30 Thread Łukasz Langa
Łukasz Langa added the comment: Thanks for the fix, Serhiy, and Ryan for reporting the problem! ✨ 🍰 ✨ -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue44895] refleak test failure in test_exceptions

2021-08-30 Thread Irit Katriel
Irit Katriel added the comment: I think the leak happens when we invoke GC while the recursion limit is exceeded. It goes way if make this change: def recurse_in_body_and_except(): try: recurse_in_body_and_except() except RecursionError as e: gc.di

[issue45052] WithProcessesTestSharedMemory.test_shared_memory_basics fails on Windows

2021-08-30 Thread Nikita Sobolev
New submission from Nikita Sobolev : While working on https://github.com/python/cpython/pull/28060 we've noticed that `test.test_multiprocessing_spawn.WithProcessesTestSharedMemory.test_shared_memory_basics` fails on Windows: ``` ==

[issue45052] WithProcessesTestSharedMemory.test_shared_memory_basics fails on Windows

2021-08-30 Thread Nikita Sobolev
Nikita Sobolev added the comment: I would like to work on this issue. -- ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue45053] MD5SumTests.test_checksum_fodder fails on Windows

2021-08-30 Thread Nikita Sobolev
New submission from Nikita Sobolev : While working on https://github.com/python/cpython/pull/28060 we've noticed that `test.test_tools.test_md5sum.MD5SumTests.test_checksum_fodder` fails on Windows: ``` == FAIL: test_checksum

  1   2   >