[issue45113] [subinterpreters][C API] Add a new function to create PyStructSequence from Heap.

2021-10-13 Thread Hai Shi
Hai Shi added the comment: > The only thing the proposed PR adds is a way to set ht_module, which actually > isn't very useful (it's used for module state access. Hm, there have some static types. so I create the PyStructSequence_FromModuleAndDes() could receive tp_flags and try convert

[issue45405] configure fails on macOS with non-Apple clang version 13 which implements --print-multiarch

2021-10-13 Thread Ned Deily
Ned Deily added the comment: > The point I was trying to make is that clang 13 generically implemented > --print-multiarch and the triple logic in configure related to MULTIARCH > applies to all platforms, not just macOS. If there are still issues on other supported platforms, PRs are

[issue45456] operator 'pass' in 'if-else' linear expression

2021-10-13 Thread Raymond Hettinger
Raymond Hettinger added the comment: Evgeniy, please leave this closed and take the proposal to the python-ideas mailing list. There is no further progress that can be made in this tracker issue. We can’t discern any part of your proposal that would make sense for improving the language.

[issue45447] IDLE: Support syntax highlighting for .pyi stub files

2021-10-13 Thread Terry J. Reedy
Terry J. Reedy added the comment: I am going to call the file util.py and will work on a PR. -- ___ Python tracker ___ ___

[issue45456] operator 'pass' in 'if-else' linear expression

2021-10-13 Thread Evgeniy Ivanov
Evgeniy Ivanov added the comment: What about this? if x > 2: my_func(x) ok this code at 1 line, this code work, but... PEP 8: E701 multiple statements on one line (colon) Well f//k it with a pass Why not add an empty action operator? What is the problem? Such an instruction has existed

[issue40413] Py_RunMain() crashes on subsequence call

2021-10-13 Thread Gregory Szorc
Gregory Szorc added the comment: I can't remember the circumstances of me reproducing this. The added test demonstrating that the interpreter can be initialized/finalized within a single process seems like a reasonable solution to ensure this is supported. --

[issue45405] configure fails on macOS with non-Apple clang version 13 which implements --print-multiarch

2021-10-13 Thread Gregory Szorc
Gregory Szorc added the comment: > Can you be more specific? This particular issue isn't about cross-compiling. The point I was trying to make is that clang 13 generically implemented --print-multiarch and the triple logic in configure related to MULTIARCH applies to all platforms, not just

[issue45444] test.test_concurrent_futures fail in x86_ 64 architecture

2021-10-13 Thread tongxiaoge
tongxiaoge added the comment: I reproduced the same problem in Python 3-3.11.0a1 and increased two failure test cases: test_ exceptions and test_ Tools, detailed log is as follows: [ 1937s] 0:27:53 load avg: 5.11 running: test_capi (27 min 51 sec) [ 1966s] 0:28:23 load avg: 5.03 [423/423/3]

[issue30782] Allow limiting the number of concurrent tasks in asyncio.as_completed

2021-10-13 Thread Jack Wong
Change by Jack Wong : -- nosy: +iforapsy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45465] logging messages are needlessly reformatted for every handler

2021-10-13 Thread Роман Донченко
New submission from Роман Донченко : Consider this code: ``` import logging class MyLogRecord(logging.LogRecord): def getMessage(self): print("Help! I am being formatted!") return super().getMessage() logging.setLogRecordFactory(MyLogRecord) logger =

[issue45439] [C API] Move usage of tp_vectorcall_offset from public headers to the internal C API

2021-10-13 Thread STINNER Victor
STINNER Victor added the comment: Using LTO, the PR 28893 *increases* the stack memory usage. It's the opposite :-) PyObject_CallOneArg(): 672 bytes/call => 688 bytes/call (+16 bytes) PyObject_CallNoArg(): 640 bytes/call => 672 bytes/call (+32 bytes) _PyObject_CallNoArg(): 640 bytes/call =>

[issue45020] Freeze all modules imported during startup.

2021-10-13 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +27229 pull_request: https://github.com/python/cpython/pull/28940 ___ Python tracker ___

[issue45439] [C API] Move usage of tp_vectorcall_offset from public headers to the internal C API

2021-10-13 Thread STINNER Victor
STINNER Victor added the comment: I measured the stack consumption using attached sys_call.patch and stack_overflow-4.py. Using gcc -O3, the stack consumption with PR 28893 is *way better* on the 6 benchmarks (6 ways to call functions), especially: PyObject_CallOneArg(): 624 bytes/call =>

[issue45439] [C API] Move usage of tp_vectorcall_offset from public headers to the internal C API

2021-10-13 Thread STINNER Victor
Change by STINNER Victor : Added file: https://bugs.python.org/file50355/sys_call.patch ___ Python tracker ___ ___ Python-bugs-list mailing

[issue30528] ipaddress.IPv{4,6}Network.reverse_pointer is broken

2021-10-13 Thread Foster Snowhill
Change by Foster Snowhill : -- nosy: +forst ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44559] Enum: revert to 3.9

2021-10-13 Thread Ethan Furman
Ethan Furman added the comment: Going back through the various bug fixes that got cut from 3.10 to re-add to 3.10.1. -- ___ Python tracker ___

[issue42248] Raised exception in Enum keeping user objects alive unnecessarily

2021-10-13 Thread Ethan Furman
Ethan Furman added the comment: Going back through the various bug fixes that got cut from 3.10 to re-add to 3.10.1. -- ___ Python tracker ___

[issue45461] UnicodeDecodeError: 'unicodeescape' codec can't decode byte 0x5c in position 8191: \ at end of string

2021-10-13 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +27228 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28939 ___ Python tracker

[issue45440] [C API] Py_IS_INFINITY() macro doesn't work in the limited C API if isinf() is not defined

2021-10-13 Thread STINNER Victor
STINNER Victor added the comment: > [C API] Py_IS_INFINITY() macro doesn't work in the limited C API if isinf() > is not defined Well, the final fix is to remove the code path when isinf() is not available and require it to build Python ;-) -- resolution: -> fixed stage: patch

[issue45440] [C API] Py_IS_INFINITY() macro doesn't work in the limited C API if isinf() is not defined

2021-10-13 Thread STINNER Victor
STINNER Victor added the comment: New changeset 194a9526d8ee6abbbe58ef48520ec87a7e83f327 by Victor Stinner in branch 'main': bpo-45440: Require math.h isinf() to build (GH-28894) https://github.com/python/cpython/commit/194a9526d8ee6abbbe58ef48520ec87a7e83f327 --

[issue24444] In argparse empty choices cannot be printed in the help

2021-10-13 Thread Łukasz Langa
Łukasz Langa added the comment: Thanks, Andrei! ✨  ✨ -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.6 ___ Python tracker

[issue24444] In argparse empty choices cannot be printed in the help

2021-10-13 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset fb7203453855a43907048ff2b8f9b890305b3d15 by Miss Islington (bot) in branch '3.9': [3.9] bpo-2: fix an error in argparse help when help for an option is blank (GH-28050) (GH-28932)

[issue45464] TypeError when inheriting from both OSError and AttributeError

2021-10-13 Thread Marek Marczykowski-Górecki
New submission from Marek Marczykowski-Górecki : In Python 3.10 it is no longer possible to create an exception type that inherits from both OSError and AttributeError. This has worked in Python 3.9. I don't see anything in changelog/release notes that would suggest it being intentional.

[issue45448] PIP package installation failure for multiple packages

2021-10-13 Thread Zayden Micheal James
Zayden Micheal James added the comment: I am using Python 3.10 and PIP 21.2.4. All installations worked fine with Python 3.9. I tried combinations such as: ["pip", "pip3", "python3 -m pip", "python -m pip3", "python -m pip","python3 -m pip3"] So far documented modules with problems are:

[issue45126] [sqlite3] cleanup and harden Connection and Cursor __init__

2021-10-13 Thread Diego Ramirez
Change by Diego Ramirez : -- nosy: +DiddiLeija ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45448] PIP package installation failure for multiple packages

2021-10-13 Thread Zayden Micheal James
Zayden Micheal James added the comment: This issue is still persisting with other libraries aswell such as matplotlib and the above mentioned. -- nosy: -eric.smith resolution: third party -> status: closed -> open type: compile error -> behavior

[issue45461] UnicodeDecodeError: 'unicodeescape' codec can't decode byte 0x5c in position 8191: \ at end of string

2021-10-13 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- assignee: -> serhiy.storchaka versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.8 ___ Python tracker ___

[issue35228] Index search in CHM help crashes viewer

2021-10-13 Thread Stephen Paul Chappell
Change by Stephen Paul Chappell : -- nosy: +Zero ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45386] xmlrpc.client unimportable due to strfmt ValueError

2021-10-13 Thread Łukasz Langa
Łukasz Langa added the comment: Thanks, R! ✨  ✨ -- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> behavior versions: +Python 3.11, Python 3.9 ___ Python tracker

[issue45386] xmlrpc.client unimportable due to strfmt ValueError

2021-10-13 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 9210eff61b75edabbe9263df0c4a303fc2149a22 by Miss Islington (bot) in branch '3.9': bpo-45386: Handle strftime's ValueError graciously in xmlrpc.client (GH-28765) (GH-28935)

[issue45386] xmlrpc.client unimportable due to strfmt ValueError

2021-10-13 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset f40b230df91f29fa4a84c1d127b4eab56a6eda27 by Miss Islington (bot) in branch '3.10': bpo-45386: Handle strftime's ValueError graciously in xmlrpc.client (GH-28765) (GH-28934)

[issue45463] Documentation inconsistency on the number of identifiers allowed in global stmt

2021-10-13 Thread Luca
New submission from Luca : The global statement allows specifying a list of identifiers, as correctly reported in the "Simple statements" chapter: https://docs.python.org/3/reference/simple_stmts.html#the-global-statement. Inconsistently, however, the "Execution model" chapter describes the

[issue44559] Enum: revert to 3.9

2021-10-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: It seems the revert was not done properly: it removed from 3.10 some bugfixes that had been applied to 3.9 (see issue42248 for an example). -- nosy: +pitrou stage: resolved -> status: closed -> open ___ Python

[issue42248] Raised exception in Enum keeping user objects alive unnecessarily

2021-10-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: It seems the problem is that bpo-44559 reset the enum module to a previous state without the bugfix. -- ___ Python tracker ___

[issue42248] Raised exception in Enum keeping user objects alive unnecessarily

2021-10-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: Indeed, changeset 8c14f5a787b21d5a1eae5d5ee981431d1c0e055f is part of git main, but is not on the 3.10 branch AFAICT. -- ___ Python tracker

[issue42248] Raised exception in Enum keeping user objects alive unnecessarily

2021-10-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: It appears this is *not* fixed in 3.10.0: Python 3.10.0 (default, Oct 13 2021, 08:45:17) [GCC 10.2.1 20210110] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import signal, gc >>> class App: pass ... >>> def create_app():

[issue45434] [C API] Clean-up the Python.h header file

2021-10-13 Thread STINNER Victor
STINNER Victor added the comment: New changeset aac29af6785712019d34f1a7f15b3c408a4f68ae by Victor Stinner in branch 'main': bpo-45434: pyport.h no longer includes (GH-28914) https://github.com/python/cpython/commit/aac29af6785712019d34f1a7f15b3c408a4f68ae --

[issue24444] In argparse empty choices cannot be printed in the help

2021-10-13 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset fd2be6da2ffec2301a58aefa92f17f0c567fbc55 by Miss Islington (bot) in branch '3.10': bpo-2: fix an error in argparse help when help for an option is blank (GH-28050) (GH-28931)

[issue45239] email.utils.parsedate_tz raises UnboundLocalError if time has more than 2 dots in it

2021-10-13 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset f8473f6f7603f8cc3307d4cb853587be41b3 by Łukasz Langa in branch '3.10': [3.10] bpo-45239: Fix parsedate_tz when time has more than 2 dots in it (GH-28452) (GH-28930)

[issue45229] Always use unittest for collecting tests in regrtests

2021-10-13 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 5d747130933a25a3984f78ae32d2e74a0d2dc5d1 by Łukasz Langa in branch '3.9': [3.9] bpo-45229: Make tkinter tests discoverable (GH-28637) (GH-28929) https://github.com/python/cpython/commit/5d747130933a25a3984f78ae32d2e74a0d2dc5d1 --

[issue45239] email.utils.parsedate_tz raises UnboundLocalError if time has more than 2 dots in it

2021-10-13 Thread Łukasz Langa
Łukasz Langa added the comment: Thanks, Ben! ✨  ✨ -- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> behavior versions: +Python 3.11 ___ Python tracker

[issue45445] Fail if an invalid -X option is provided

2021-10-13 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset db2b6a20cd35781b2f5e798e880e57e6cf9b97aa by Pablo Galindo Salgado in branch 'main': bpo-45445: Fail if an invalid X-option is provided in the command line (GH-28823)

[issue45461] UnicodeDecodeError: 'unicodeescape' codec can't decode byte 0x5c in position 8191: \ at end of string

2021-10-13 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45229] Always use unittest for collecting tests in regrtests

2021-10-13 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 151234f5da4b1922e3d91233a6eddda92d7269b0 by Miss Islington (bot) in branch '3.10': bpo-45229: Make tkinter tests discoverable (GH-28637) (GH-28927) https://github.com/python/cpython/commit/151234f5da4b1922e3d91233a6eddda92d7269b0 --

[issue45239] email.utils.parsedate_tz raises UnboundLocalError if time has more than 2 dots in it

2021-10-13 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 5638618845752f713c00d69dbe705fed16761948 by Miss Islington (bot) in branch '3.9': bpo-45239: Fix parsedate_tz when time has more than 2 dots in it (GH-28452) (GH-28928)

[issue45256] Remove the usage of the C stack in Python to Python calls

2021-10-13 Thread Mark Shannon
Change by Mark Shannon : -- pull_requests: +27226 pull_request: https://github.com/python/cpython/pull/28937 ___ Python tracker ___

[issue45462] Speed up re.match with pre-compiled patterns

2021-10-13 Thread Jonas H.
Change by Jonas H. : -- keywords: +patch pull_requests: +27224 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28936 ___ Python tracker ___

[issue45462] Speed up re.match with pre-compiled patterns

2021-10-13 Thread Jonas H.
New submission from Jonas H. : re.match(p, ...) with a pre-compiled pattern p = re.compile(...) can be much slower than calling p.match(...). Probably mostly in cases with "easy" patterns and/or short strings. The culprit is that re.match -> re._compile can spend a lot of time looking up p

[issue45386] xmlrpc.client unimportable due to strfmt ValueError

2021-10-13 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +27222 pull_request: https://github.com/python/cpython/pull/28934 ___ Python tracker

[issue45386] xmlrpc.client unimportable due to strfmt ValueError

2021-10-13 Thread miss-islington
Change by miss-islington : -- pull_requests: +27223 pull_request: https://github.com/python/cpython/pull/28935 ___ Python tracker ___

[issue45386] xmlrpc.client unimportable due to strfmt ValueError

2021-10-13 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 1c831353816ff699b54e804047a7242a09e98f5b by rtobar in branch 'main': bpo-45386: Handle strftime's ValueError graciously in xmlrpc.client (GH-28765) https://github.com/python/cpython/commit/1c831353816ff699b54e804047a7242a09e98f5b --

[issue24444] In argparse empty choices cannot be printed in the help

2021-10-13 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +27220 pull_request: https://github.com/python/cpython/pull/28931 ___ Python tracker

[issue24444] In argparse empty choices cannot be printed in the help

2021-10-13 Thread miss-islington
Change by miss-islington : -- pull_requests: +27221 pull_request: https://github.com/python/cpython/pull/28932 ___ Python tracker ___

[issue24444] In argparse empty choices cannot be printed in the help

2021-10-13 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 6fafc25aea8689048314b5bf7a9bb986bb1ce238 by andrei kulakov in branch 'main': bpo-2: fix an error in argparse help when help for an option is blank (GH-28050) https://github.com/python/cpython/commit/6fafc25aea8689048314b5bf7a9bb986bb1ce238

[issue45239] email.utils.parsedate_tz raises UnboundLocalError if time has more than 2 dots in it

2021-10-13 Thread Łukasz Langa
Change by Łukasz Langa : -- pull_requests: +27219 pull_request: https://github.com/python/cpython/pull/28930 ___ Python tracker ___

[issue45229] Always use unittest for collecting tests in regrtests

2021-10-13 Thread Łukasz Langa
Change by Łukasz Langa : -- pull_requests: +27218 pull_request: https://github.com/python/cpython/pull/28929 ___ Python tracker ___

[issue45461] UnicodeDecodeError: 'unicodeescape' codec can't decode byte 0x5c in position 8191: \ at end of string

2021-10-13 Thread Matthew Barnett
Matthew Barnett added the comment: It can be shortened to this: buffer = b"a" * 8191 + b"\\r\\n" with open("bug_csv.csv", "wb") as f: f.write(buffer) with open("bug_csv.csv", encoding="unicode_escape", newline="") as f: f.readline() To me it looks like it's reading in blocks of 8K

[issue45239] email.utils.parsedate_tz raises UnboundLocalError if time has more than 2 dots in it

2021-10-13 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +27217 pull_request: https://github.com/python/cpython/pull/28928 ___ Python tracker

[issue45239] email.utils.parsedate_tz raises UnboundLocalError if time has more than 2 dots in it

2021-10-13 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset b9e687618d3489944f29adbd2be50b46940c9e70 by Ben Hoyt in branch 'main': bpo-45239: Fix parsedate_tz when time has more than 2 dots in it (GH-28452) https://github.com/python/cpython/commit/b9e687618d3489944f29adbd2be50b46940c9e70 -- nosy:

[issue45229] Always use unittest for collecting tests in regrtests

2021-10-13 Thread miss-islington
Change by miss-islington : -- pull_requests: +27216 pull_request: https://github.com/python/cpython/pull/28927 ___ Python tracker ___

[issue45229] Always use unittest for collecting tests in regrtests

2021-10-13 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset f59ed3c310a7ceebf2a56a84ea969a7f75d95b64 by Serhiy Storchaka in branch 'main': bpo-45229: Make tkinter tests discoverable (GH-28637) https://github.com/python/cpython/commit/f59ed3c310a7ceebf2a56a84ea969a7f75d95b64 --

[issue45446] Add a way to hide fields in dataclasses

2021-10-13 Thread Eric V. Smith
Eric V. Smith added the comment: "hide" is not a good name for this. Does attrs have anything equivalent? This seems like a pretty niche usage, so I'm not inclined to include it without evidence of a wide-spread need for it. -- assignee: -> eric.smith

[issue45410] python -m test -jN: write stderr in stdout to get messages in order

2021-10-13 Thread STINNER Victor
STINNER Victor added the comment: New changeset 676201a59f90caace606d11d4172aa74c1cd4992 by Victor Stinner in branch 'main': bpo-45410: regrtest replaces print_warning.orig_stderr (GH-28926) https://github.com/python/cpython/commit/676201a59f90caace606d11d4172aa74c1cd4992 --

[issue45434] [C API] Clean-up the Python.h header file

2021-10-13 Thread STINNER Victor
STINNER Victor added the comment: PyRun_InteractiveOneObjectEx() returns a single error code of errcode.h: E_EOF (11): if (mod == NULL) { _PyArena_Free(arena); if (errcode == E_EOF) { PyErr_Clear(); return E_EOF; } return -1; }

[issue45434] [C API] Clean-up the Python.h header file

2021-10-13 Thread STINNER Victor
STINNER Victor added the comment: New changeset 713bb19356bce9b8f2b95461834fe1dae505f889 by Victor Stinner in branch 'main': bpo-45434: Mark the PyTokenizer C API as private (GH-28924) https://github.com/python/cpython/commit/713bb19356bce9b8f2b95461834fe1dae505f889 --

[issue45434] [C API] Clean-up the Python.h header file

2021-10-13 Thread STINNER Victor
STINNER Victor added the comment: Oh, Include/errcode.h *is* used by PyRun_InteractiveOneFlags() and its variants. It's mentioned in its documentation: Returns ``0`` when the input was executed successfully, ``-1`` if there was an exception, or an error code from the

[issue45410] python -m test -jN: write stderr in stdout to get messages in order

2021-10-13 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +27215 pull_request: https://github.com/python/cpython/pull/28926 ___ Python tracker ___

[issue45461] UnicodeDecodeError: 'unicodeescape' codec can't decode byte 0x5c in position 8191: \ at end of string

2021-10-13 Thread Anatoly Myachev
Anatoly Myachev added the comment: Hello! I can reduce it a little. The buffer shoudln't be decreased, as it seems there is a some kind relation with the buffer size for IO operations. buffer =

[issue45405] configure fails on macOS with non-Apple clang version 13 which implements --print-multiarch

2021-10-13 Thread David Bohman
David Bohman added the comment: Thank you for your help, Ned. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue45461] UnicodeDecodeError: 'unicodeescape' codec can't decode byte 0x5c in position 8191: \ at end of string

2021-10-13 Thread STINNER Victor
STINNER Victor added the comment: Can you please try write a simpler (shorter) reproducer? -- ___ Python tracker ___ ___

[issue45461] UnicodeDecodeError: 'unicodeescape' codec can't decode byte 0x5c in position 8191: \ at end of string

2021-10-13 Thread Anatoly Myachev
New submission from Anatoly Myachev : Expected behavior - if `read()` function works correctly, then `readline()` should also works. Reproducer in file - just run: `python test.py`. Traceback (most recent call last): File "test.py", line 11, in f.readline() File

[issue45460] distutils.sysconfig.get_python_lib() does not respect sysconfig/distutils install schemes

2021-10-13 Thread Miro Hrončok
Miro Hrončok added the comment: > so distributors could patch the install schemes in there and distutils > (whether the one in the standard library or a third party fork). Somehow, this sentence is not finished properly. ...so distributors could patch the install schemes in there and

[issue41282] Deprecate and remove distutils

2021-10-13 Thread Miro Hrončok
Miro Hrončok added the comment: Related: https://bugs.python.org/issue45460 -- nosy: +hroncok ___ Python tracker ___ ___

[issue45460] distutils.sysconfig.get_python_lib() does not respect sysconfig/distutils install schemes

2021-10-13 Thread Miro Hrončok
New submission from Miro Hrončok : In https://github.com/python/cpython/pull/24549 (Load install schemes from sysconfig) we have assumed that distutils will simply read all information from sysconfig, so distributors could patch the install schemes in there and distutils (whether the one in

[issue45434] [C API] Clean-up the Python.h header file

2021-10-13 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +27214 pull_request: https://github.com/python/cpython/pull/28924 ___ Python tracker ___

[issue36424] Pickle fails on frozen dataclass that has slots

2021-10-13 Thread David Hagen
David Hagen added the comment: Because the implementation in GH-25786 relies on the new `dataclass(slots=True)` feature (i.e. it does not work if the slots are specified with `__slots__`), I don't think this can be trivially backported to versions before 3.10. --

[issue45256] Remove the usage of the C stack in Python to Python calls

2021-10-13 Thread Mark Shannon
Mark Shannon added the comment: New changeset 3901c081143ef29624f9c1cb49cc70a70321d139 by Pablo Galindo Salgado in branch 'main': bpo-45256: Fix cleanup of stolen locals for Python-to-Python calls (GH-28905) https://github.com/python/cpython/commit/3901c081143ef29624f9c1cb49cc70a70321d139

[issue45434] [C API] Clean-up the Python.h header file

2021-10-13 Thread STINNER Victor
STINNER Victor added the comment: New changeset bbe7497c5a44c2b4ec726605cf5a9086ba02daf1 by Victor Stinner in branch 'main': bpo-45434: Remove pystrhex.h header file (GH-28923) https://github.com/python/cpython/commit/bbe7497c5a44c2b4ec726605cf5a9086ba02daf1 --

[issue45340] Lazily create dictionaries for plain Python objects

2021-10-13 Thread Mark Shannon
Mark Shannon added the comment: New changeset a8b9350964f43cb648c98c179c8037fbf3ff8a7d by Mark Shannon in branch 'main': bpo-45340: Don't create object dictionaries unless actually needed (GH-28802) https://github.com/python/cpython/commit/a8b9350964f43cb648c98c179c8037fbf3ff8a7d

[issue45434] [C API] Clean-up the Python.h header file

2021-10-13 Thread STINNER Victor
STINNER Victor added the comment: New changeset 97308dfcdc0696e0b116c37386e2ff4d72e6c3f4 by Victor Stinner in branch 'main': bpo-45434: Move _Py_BEGIN_SUPPRESS_IPH to pycore_fileutils.h (GH-28922) https://github.com/python/cpython/commit/97308dfcdc0696e0b116c37386e2ff4d72e6c3f4 --

[issue45434] [C API] Clean-up the Python.h header file

2021-10-13 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +27213 pull_request: https://github.com/python/cpython/pull/28923 ___ Python tracker ___

[issue45434] [C API] Clean-up the Python.h header file

2021-10-13 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +27212 pull_request: https://github.com/python/cpython/pull/28922 ___ Python tracker ___

[issue45459] Limited API support for Py_buffer

2021-10-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: ndim is not known before calling PyObject_GetBuffer(), so we will need a new API which combines PyObject_GetBuffer() and PyBuffer_New(). -- ___ Python tracker

[issue45410] python -m test -jN: write stderr in stdout to get messages in order

2021-10-13 Thread STINNER Victor
STINNER Victor added the comment: New changeset 773330773968f211c77abc7b5b525faa7b3c35a2 by Victor Stinner in branch 'main': bpo-45410: regrtest -W leaves stdout/err FD unchanged (GH-28915) https://github.com/python/cpython/commit/773330773968f211c77abc7b5b525faa7b3c35a2 --

[issue45438] inspect not capturing type annotations created by __class_getitem__

2021-10-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The cause is that isinstance(list[int], type) returns True. It can cause bugs in other parts of the code which test for instance of type. For example: >>> types.resolve_bases((typing.List[int],)) (, ) >>> types.resolve_bases((list[int],)) (list[int],) >>>

[issue45459] Limited API support for Py_buffer

2021-10-13 Thread Christian Heimes
Christian Heimes added the comment: IIRC shape, strides, and suboffsets are all arrays of ndims length. We could optimize allocation if we would require users to specify the value of ndims and don't allow them to change the value afterwards. PyBuffer_New(int ndims) then would allocate view

[issue45443] 'ThreadPoolExecutor' object has no attribute 'map'

2021-10-13 Thread Zohim Chandani
Zohim Chandani added the comment: Please see attached. I have printed out the python version. Running this on VS code. -- Added file: https://bugs.python.org/file50353/Screenshot 2021-10-13 at 12.45.04.png ___ Python tracker

[issue45247] [C API] Add explicit support for Cython to the C API

2021-10-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I agree with Mark. Instead of exposing internal details in low-level API we should add more high-level API to satisfy concrete needs. It will give us more freedom of changing internals in future. -- nosy: +serhiy.storchaka

[issue45459] Limited API support for Py_buffer

2021-10-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: shape is a pointer to array of Py_ssize_t of size ndim. array and memoryview do a trick to avoid memory allocation, but _testbuffer.ndarray allocates it dynamically in the heap. We can add a small static buffer in Py_buffer to avoid additional memory

[issue45247] [C API] Add explicit support for Cython to the C API

2021-10-13 Thread STINNER Victor
STINNER Victor added the comment: > Rather than have Cython laboriously create a Python frame with fake code > object, etc., it would make much more sense for us to offer an API to insert > a "native" frame into the stack and update the line number. I agree with that. --

[issue45459] Limited API support for Py_buffer

2021-10-13 Thread STINNER Victor
STINNER Victor added the comment: Py_buffer.shape requires a Py_ssize_t* pointer. It's not convenient. For example, the array module uses: static int array_buffer_getbuf(arrayobject *self, Py_buffer *view, int flags) { ... if ((flags & PyBUF_ND)==PyBUF_ND) { view->shape =

[issue45247] [C API] Add explicit support for Cython to the C API

2021-10-13 Thread Mark Shannon
Mark Shannon added the comment: I disagree. All that is doing is locking in the current poor interface. We do need to extend the C API for these uses, yes. But we need an API that addresses Cython's needs directly and at a higher level. For example, Cython often wants to insert a frame into

[issue42345] Equality of typing.Literal depends on the order of arguments

2021-10-13 Thread Ken Jin
Ken Jin added the comment: @Alick yes. To be specific, 3.9.1 and above. 3.9.0 still has the old behavior. -- ___ Python tracker ___

[issue45453] test_embed.StdPrinterTests() crash if stdout FD is not 1 or 2

2021-10-13 Thread STINNER Victor
Change by STINNER Victor : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed title: test_embed: random crash on AMD64 Fedora Rawhide Clang 3.x -> test_embed.StdPrinterTests() crash if stdout FD is not 1 or 2 versions: +Python 3.10

[issue45453] test_embed: random crash on AMD64 Fedora Rawhide Clang 3.x

2021-10-13 Thread STINNER Victor
STINNER Victor added the comment: New changeset 7e74d99c532f3eb55a86d10d30c068b03f2ad025 by Miss Islington (bot) in branch '3.10': bpo-45453: Fix test_embed.StdPrinterTests (GH-28916) (GH-28917) https://github.com/python/cpython/commit/7e74d99c532f3eb55a86d10d30c068b03f2ad025 --

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

2021-10-13 Thread STINNER Victor
STINNER Victor added the comment: See also bpo-45247: [C API] Add explicit support for Cython to the C API. -- ___ Python tracker ___

[issue39947] [C API] Make the PyThreadState structure opaque (move it to the internal C API)

2021-10-13 Thread STINNER Victor
STINNER Victor added the comment: See also bpo-45247: [C API] Add explicit support for Cython to the C API. -- ___ Python tracker ___

[issue45247] [C API] Add explicit support for Cython to the C API

2021-10-13 Thread STINNER Victor
Change by STINNER Victor : -- title: Add explicit support for Cython to the C API. -> [C API] Add explicit support for Cython to the C API ___ Python tracker ___

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

2021-10-13 Thread STINNER Victor
STINNER Victor added the comment: The coverage project has a ctrace C extension which access PyFrameObject.f_lasti which is gone in Python 3.11. It uses MyFrame_lasti() helper to handle Python 3.10 lasti change: --- // The f_lasti field changed meaning in 3.10.0a7. It had been bytes, but //

[issue45459] Limited API support for Py_buffer

2021-10-13 Thread Christian Heimes
New submission from Christian Heimes : Currently all APIs related to Py_buffer are excluded from the limited API. It's neither possible to use Py_buffer from a C extension with limited API nor is it possible to define heap types with buffer support using the stable ABI. The lack of Py_buffer

  1   2   >