[issue46355] [C API] Document PyFrameObject and PyThreadState changes and explain how to port code to Python 3.11

2022-01-12 Thread STINNER Victor
New submission from STINNER Victor : Python 3.11 made many changes in PyFrameObject and PyThreadState structures. Code which accessed directly structure members doesn't build anymore. For example, "frame->f_code" is now fails because PyFrameObject.f_code member is done. I p

[issue46355] [C API] Document PyFrameObject and PyThreadState changes and explain how to port code to Python 3.11

2022-01-12 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +28759 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30558 ___ Python tracker <https://bugs.python.org/issu

[issue44133] Some C-API symbols (e.g. Py_FrozenMain) are not always exported

2022-01-12 Thread STINNER Victor
STINNER Victor added the comment: > On Solaris (and most likely several other platforms), > `PyThread_get_thread_native_id` is also not available. Oh, I added an explicit test for that in my PR 30556. > `Py_FrozenMain` should be added to stable ABI I suggest to first fix the issu

[issue46356] [C API] Enforce usage of PyFrame_GetBack()

2022-01-12 Thread STINNER Victor
New submission from STINNER Victor : C extensions written for Python 3.10 and older which access directly to the PyFrameObject.f_back member build successfully on Python 3.11, but they can fail because f_back must not be read directly. f_back can be NULL even if the frame has an outer frame

[issue46355] [C API] Document PyFrameObject and PyThreadState changes and explain how to port code to Python 3.11

2022-01-12 Thread STINNER Victor
STINNER Victor added the comment: > f_lineno: changed, use PyFrame_GetLineNumber() Oh I was wrong, PyFrame_GetLineNumber() code is the same in Python 3.10. It was already a bad idea to read directly the f_lineno member in Python 3.10: PyFrame_GetLineNumber() should always be cal

[issue46356] [C API] Enforce usage of PyFrame_GetBack()

2022-01-12 Thread STINNER Victor
STINNER Victor added the comment: It's unclear to me if the ability to read directly the PyFrameObject.f_lineno member is a deliberate use case, or if we should enforce the usage of PyFrame_GetLineNumber(). -- ___ Python tracker &

[issue46356] [C API] Enforce usage of PyFrame_GetBack()

2022-01-12 Thread STINNER Victor
STINNER Victor added the comment: > I don't know how we can stop people from using them though. The first option is to promote helper functions to abstract access to the PyFrameObject structure. The second option is to make the whole structure opaque and enforce the usage o

[issue46357] socket module fix warning build on FreeBSD

2022-01-12 Thread STINNER Victor
STINNER Victor added the comment: > Solves the "Make sure new member of socket address initialized." warning for > the bluetooth sockaddr_l2cap usage. You would to elaborate how you checked that all members of the socket address are initialized? Which socketmodule.c functio

[issue36854] GC operates out of global runtime state.

2022-01-12 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +28764 pull_request: https://github.com/python/cpython/pull/30564 ___ Python tracker <https://bugs.python.org/issue36

[issue36854] GC operates out of global runtime state.

2022-01-12 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +28765 pull_request: https://github.com/python/cpython/pull/30565 ___ Python tracker <https://bugs.python.org/issue36

[issue36854] GC operates out of global runtime state.

2022-01-12 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +28766 pull_request: https://github.com/python/cpython/pull/30566 ___ Python tracker <https://bugs.python.org/issue36

[issue46070] [subinterpreters] crash when importing _sre in subinterpreters in parallel (Python 3.9 regression)

2022-01-12 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +28767 pull_request: https://github.com/python/cpython/pull/30564 ___ Python tracker <https://bugs.python.org/issue46

[issue46070] [subinterpreters] crash when importing _sre in subinterpreters in parallel (Python 3.9 regression)

2022-01-12 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +28768 pull_request: https://github.com/python/cpython/pull/30565 ___ Python tracker <https://bugs.python.org/issue46

[issue46070] [subinterpreters] crash when importing _sre in subinterpreters in parallel (Python 3.9 regression)

2022-01-12 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +28769 pull_request: https://github.com/python/cpython/pull/30566 ___ Python tracker <https://bugs.python.org/issue46

[issue46070] [subinterpreters] crash when importing _sre in subinterpreters in parallel (Python 3.9 regression)

2022-01-12 Thread STINNER Victor
STINNER Victor added the comment: I prepared 3 pull requests to revert the commit 7247407c35330f3f6292f1d40606b7ba6afd5700: * PR 30564: main branch * PR 30565: 3.10 branch * PR 30566: 3.9 branch The problem is that the "Check if the ABI has changed" CI job fails in 3.9 and 3.1

[issue46070] [subinterpreters] crash when importing _sre in subinterpreters in parallel (Python 3.9 regression)

2022-01-12 Thread STINNER Victor
STINNER Victor added the comment: I modified PR 30565 (3.10) and PR 30566 (3.9) to fix the ABI. I added _PyGC_GetState() which always use PyInterpreterState.gc of the main interpreter. -- ___ Python tracker <https://bugs.python.org/issue46

[issue46070] [subinterpreters] crash when importing _sre in subinterpreters in parallel (Python 3.9 regression)

2022-01-12 Thread STINNER Victor
STINNER Victor added the comment: I wrote 3 scripts to reproduce the bug in a more reliable way. So I just have to type "bisect" and it runs the test 12 times. (1) bisect.bat: --- @"C:\vstinner\python\3.9\PCbuild\amd64\python_d.exe" bisect.py --- (2) bisect.py: --- impo

[issue46070] [subinterpreters] crash when importing _sre in subinterpreters in parallel (Python 3.9 regression)

2022-01-13 Thread STINNER Victor
STINNER Victor added the comment: When the crash occurs, the _sre.compile function is not destroyed in the interpreter which created the function. The crash is related to _sre.compile method. This method is created in PyInit__sre() called by "import _sre". On Windows, the _sre

[issue46070] [subinterpreters] crash when importing _sre in subinterpreters in parallel (Python 3.9 regression)

2022-01-13 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +28776 pull_request: https://github.com/python/cpython/pull/30577 ___ Python tracker <https://bugs.python.org/issue46

[issue46070] [subinterpreters] crash when importing _sre in subinterpreters in parallel (Python 3.9 regression)

2022-01-13 Thread STINNER Victor
STINNER Victor added the comment: Oh. I managed to write a simple fix which doesn't require to revert the whole "per-interpreter GC" change: GH-30577. -- ___ Python tracker <https://bugs.pyt

[issue46070] [subinterpreters] crash when importing _sre in subinterpreters in parallel (Python 3.9 regression)

2022-01-13 Thread STINNER Victor
STINNER Victor added the comment: This issue has a complex history. (*) I made the GC state per-interpreter: commit 7247407c35330f3f6292f1d40606b7ba6afd5700 (Nov 20, 2019) (*) This change triggered a _PyImport_FixupExtensionObject() bug in sub-interpreter, I fixed it with commit

[issue40533] [subinterpreters] Don't share Python objects between interpreters

2022-01-13 Thread STINNER Victor
STINNER Victor added the comment: Sharing objects between multiple interpreters can cause complex bugs leading to crashes: https://bugs.python.org/issue46070#msg410493 For this specific bug, I wrote a workaround (GH-30577). -- ___ Python tracker

[issue46355] [C API] Document PyFrameObject and PyThreadState changes and explain how to port code to Python 3.11

2022-01-13 Thread STINNER Victor
STINNER Victor added the comment: New changeset 0885999a8e5ffad3fae0302675ad0030e33a15af by Victor Stinner in branch 'main': bpo-46355: Document PyFrameObject and PyThreadState changes (GH-30558) https://github.com/python/cpython/commit/0885999a8e5ffad3fae0302675ad00

[issue46355] [C API] Document PyFrameObject and PyThreadState changes and explain how to port code to Python 3.11

2022-01-13 Thread STINNER Victor
STINNER Victor added the comment: I merged my PR so the doc can be reviewed online at https://docs.python.org/dev/whatsnew/3.11.html once it will be rendered ;-) -- resolution: -> fixed stage: patch review -> resolved status: open -&g

[issue44133] Some C-API symbols (e.g. Py_FrozenMain) are not always exported

2022-01-13 Thread STINNER Victor
STINNER Victor added the comment: New changeset 6be848922bc0f4c632c255c39de82a45b6480286 by Victor Stinner in branch 'main': bpo-44133: Link Python executable with object files (GH-30556) https://github.com/python/cpython/commit/6be848922bc0f4c632c255c39de82a

[issue44133] Some C-API symbols (e.g. Py_FrozenMain) are not always exported

2022-01-13 Thread STINNER Victor
STINNER Victor added the comment: > New changeset 6be848922bc0f4c632c255c39de82a45b6480286 by Victor Stinner in > branch 'main': > bpo-44133: Link Python executable with object files (GH-30556) Sadly, Py_FrozenMain() is still missing on Windows. See: https://github.com/

[issue44133] Some C-API symbols (e.g. Py_FrozenMain) are not always exported on Unix

2022-01-13 Thread STINNER Victor
Change by STINNER Victor : -- title: Some C-API symbols (e.g. Py_FrozenMain) are not always exported -> Some C-API symbols (e.g. Py_FrozenMain) are not always exported on Unix ___ Python tracker <https://bugs.python.org/issu

[issue46070] [subinterpreters] crash when importing _sre in subinterpreters in parallel (Python 3.9 regression)

2022-01-13 Thread STINNER Victor
STINNER Victor added the comment: New changeset 1a4d1c1c9b08e75e88aeac90901920938f649832 by Victor Stinner in branch 'main': bpo-46070: _PyGC_Fini() untracks objects (GH-30577) https://github.com/python/cpython/commit/1a4d1c1c9b08e75e88aeac90901920

[issue46070] [subinterpreters] crash when importing _sre in subinterpreters in parallel (Python 3.9 regression)

2022-01-13 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +28779 pull_request: https://github.com/python/cpython/pull/30580 ___ Python tracker <https://bugs.python.org/issue46

[issue46070] [subinterpreters] crash when importing _sre in subinterpreters in parallel (Python 3.9 regression)

2022-01-13 Thread STINNER Victor
STINNER Victor added the comment: I tested manually my fix GH-30580 using: * (1) attached win_py399_crash_reproducer.py * (2) https://bugs.python.org/issue46070#msg410447 mthod Without my fix, I can easily reproduce the crash with (1) and (2). With my fix, I can no longer reproduce the

[issue46070] [subinterpreters] crash when importing _sre in subinterpreters in parallel (Python 3.9 regression)

2022-01-13 Thread STINNER Victor
STINNER Victor added the comment: New changeset 52937c26adc35350ca0402070160cf6dc838f359 by Victor Stinner in branch '3.9': bpo-46070: _PyGC_Fini() untracks objects (GH-30577) (GH-30580) https://github.com/python/cpython/commit/52937c26adc35350ca0402070160cf

[issue46070] [subinterpreters] crash when importing _sre in subinterpreters in parallel (Python 3.9 regression)

2022-01-13 Thread STINNER Victor
STINNER Victor added the comment: It would be nice to add some tests. -- ___ Python tracker <https://bugs.python.org/issue46070> ___ ___ Python-bugs-list mailin

[issue46070] [subinterpreters] crash when importing _sre in subinterpreters in parallel (Python 3.9 regression)

2022-01-13 Thread STINNER Victor
STINNER Victor added the comment: Victor: > (*) I made the GC state per-interpreter: commit > 7247407c35330f3f6292f1d40606b7ba6afd5700 (Nov 20, 2019) Eric Snow: > FYI, this was done by me in an earlier comment which we ended up reverting. Later you basically un.reverted that.

[issue46070] [subinterpreters] crash when importing _sre in subinterpreters in parallel (Python 3.9 regression)

2022-01-13 Thread STINNER Victor
STINNER Victor added the comment: pyobject_ob_interp.patch: Quick & dirty patch that I wrote to add PyObject.ob_interp, store in which interpreter an object has been created. -- Added file: https://bugs.python.org/file50560/pyobject_ob_interp.p

[issue46368] faulthandler: add the ability to dump all interpreters, not only the current interpreter

2022-01-13 Thread STINNER Victor
New submission from STINNER Victor : While debugging the sub-interpreter crash bpo-46070, I noticed that faulthandler only logs the Python thread state of a single interpreter. When a bug involves multiple interpreters, it is useful to log all interpreters. -- components: Library

[issue46070] [subinterpreters] crash when importing _sre in subinterpreters in parallel (Python 3.9 regression)

2022-01-13 Thread STINNER Victor
STINNER Victor added the comment: I created bpo-46368: "faulthandler: add the ability to dump all interpreters, not only the current interpreter". -- ___ Python tracker <https://bugs.python.o

[issue46368] faulthandler: add the ability to dump all interpreters, not only the current interpreter

2022-01-13 Thread STINNER Victor
STINNER Victor added the comment: Attached patch is an incomplete quick & dirty implementation to log all interpreters in _Py_DumpTracebackThreads(). A better implementation should leave the current behavior unmodified, add a new C function, and add all_interpreters=False parameter to

[issue46357] socket module fix warning build on FreeBSD

2022-01-13 Thread STINNER Victor
STINNER Victor added the comment: > I took as initialized to avoid undefined behavior rather than anything. I don't get what you mean. Can you please show me which functions initialize sockaddr_l2cap structures and explain how the current code fills all members? I don't know

[issue45797] AMD64 Arch Linux Asan Debug buildbot sometimes hangs before tests complete

2022-01-13 Thread STINNER Victor
STINNER Victor added the comment: I didn't notice this issue recently, but I didn't pay attention this buildbot worker neither. I close the issue. -- resolution: -> out of date stage: -> resolved status: open -> closed ___ Pyt

[issue45953] Statically allocate interpreter states as much as possible.

2022-01-13 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +vstinner ___ Python tracker <https://bugs.python.org/issue45953> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46308] Unportable test(1) operator in configure script

2022-01-13 Thread STINNER Victor
STINNER Victor added the comment: commit b962544594c6a7c695330dd20fedffb3a1916ba6 Author: Miss Islington (bot) <31488909+miss-isling...@users.noreply.github.com> Date: Sat Jan 8 17:08:20 2022 -0800 bpo-34602: Fix unportable test(1) operator in configure script (GH-30490) (GH

[issue46280] About vulnerabilities in Cpython native code

2022-01-13 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +vstinner nosy_count: 6.0 -> 7.0 pull_requests: +28789 pull_request: https://github.com/python/cpython/pull/30591 ___ Python tracker <https://bugs.python.org/issu

[issue46280] About vulnerabilities in Cpython native code

2022-01-13 Thread STINNER Victor
STINNER Victor added the comment: #389 Modules/_tracemalloc.c:1245: error: Null Dereference pointer `traces2` last assigned on line 1243 could be null and is dereferenced by call to `_Py_hashtable_destroy()` at line 1245, column 9. 1243. _Py_hashtable_t *traces2

[issue46280] About vulnerabilities in Cpython native code

2022-01-13 Thread STINNER Victor
STINNER Victor added the comment: New changeset 7c770d3350813a82a639fcb3babae0de2b87aaae by Victor Stinner in branch 'main': bpo-46280: Fix tracemalloc_copy_domain() (GH-30591) https://github.com/python/cpython/commit/7c770d3350813a82a639fcb3babae0

[issue46367] multiprocessing's "spawn" doesn't actually use spawn

2022-01-14 Thread STINNER Victor
STINNER Victor added the comment: > It appears the `multiprocessing`'s "spawn" mode doesn't actually use POSIX > spawn, but instead uses fork+exec[1]. The documentation doesn't pretend to use posix_spawn(). It only says: "starts a fresh python interpret

[issue40255] Fixing Copy on Writes from reference counting

2022-01-14 Thread STINNER Victor
STINNER Victor added the comment: I just want to say that GOOGLE_ETERNAL_REFCOUNT_SUPPORT is a cool name :-D I love "eternal refcount"! -- ___ Python tracker <https://bugs.python.o

[issue45522] Allow to build Python without freelists

2022-01-14 Thread STINNER Victor
STINNER Victor added the comment: > Freelists for object structs can now be disabled. A new configure option > --without-freelists can be used to disable all freelists except empty tuple > singleton. (Contributed by Christian Heimes in bpo-45522) Can you please documen

[issue46372] int/float specializations should mutate the LHS in-place when possible

2022-01-16 Thread STINNER Victor
Change by STINNER Victor : -- nosy: -vstinner ___ Python tracker <https://bugs.python.org/issue46372> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44133] Some C-API symbols (e.g. Py_FrozenMain) are not always exported on Unix

2022-01-17 Thread STINNER Victor
STINNER Victor added the comment: Oh no, I expected that the new way to build Python would also export PyThread_get_thread_native_id() on Solaris. I reopen the issue. Can you please specify your configure command? Can you check without Python if the symbol is exported or not? If you use

[issue24194] Make tokenize recognize Other_ID_Start and Other_ID_Continue chars

2022-01-17 Thread STINNER Victor
Change by STINNER Victor : -- nosy: -vstinner ___ Python tracker <https://bugs.python.org/issue24194> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue13886] readline-related test_builtin failure

2022-01-17 Thread STINNER Victor
STINNER Victor added the comment: On Fedora 35, I still reproduce the initial issue on the main branch of Python: $ ./python -E -m test -v test_readline test_builtin (...) == FAIL: test_input_tty_non_ascii

[issue13886] readline-related test_builtin failure

2022-01-17 Thread STINNER Victor
STINNER Victor added the comment: Oh, the test_builtin.test_input_tty_non_ascii() fails just if test_readline is loaded previously: $ ./python -E -m test -m test.test_builtin.PtyTests.test_input_tty_non_ascii -v test_readline test_builtin == CPython 3.11.0a4+ (heads/main:7f4b69b9076, Jan 17

[issue13886] readline-related test_builtin failure

2022-01-17 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +28834 pull_request: https://github.com/python/cpython/pull/30631 ___ Python tracker <https://bugs.python.org/issue13

[issue13886] readline-related test_builtin failure

2022-01-17 Thread STINNER Victor
STINNER Victor added the comment: Since nobody managed to fix this issue in 10 years and the test still fails if the readline module is loaded, I wrote GH-30631 to skip the test if the readline module is loaded. -- ___ Python tracker <ht

[issue13886] test_builtin.PtyTests fail on non-ASCII characters if the readline module is loaded

2022-01-17 Thread STINNER Victor
Change by STINNER Victor : -- title: readline-related test_builtin failure -> test_builtin.PtyTests fail on non-ASCII characters if the readline module is loaded ___ Python tracker <https://bugs.python.org/issu

[issue13886] test_builtin.PtyTests fail on non-ASCII characters if the readline module is loaded

2022-01-17 Thread STINNER Victor
STINNER Victor added the comment: rl-locale.diff changes the readline implementation of the PyOS_Readline() to set LC_CTYPE locale to "C": setlocale(LC_CTYPE, "C"), rather to the user preferred locale: setlocale(LC_CTYPE, ""). IMO it's a bad idea. Pyt

[issue13888] test_builtin failure when run after test_tk

2022-01-17 Thread STINNER Victor
STINNER Victor added the comment: I cannot reproduce this issue on the Python main branch on Fedora 35 with Tk 8.6.10 and libX11 1.7.3.1. I close the issue, please reopen it if you can still reproduce it. One year ago, Serhiy wrote that the issue was still reproducible on Linux but he

[issue41034] test_builtin: PtyTests fail when run twice

2022-01-17 Thread STINNER Victor
STINNER Victor added the comment: The "./python -m test -R 3:3 test_builtin" command loads the readline module somehow: --- $ ./python -i -m test -R 3:3 test_builtin (...) SystemExit: 0 >>> import sys >>> 'readline' in sys.modules True --- This bug is

[issue13886] test_builtin.PtyTests fail on non-ASCII characters if the readline module is loaded

2022-01-17 Thread STINNER Victor
STINNER Victor added the comment: I marked bpo-41034 "test_builtin: PtyTests fail when run twice" as a duplicate of this issue. Moreover, I tested manually: my change GH-30631 fix the "./python -m test -R 3:3 test_builtin" command. -- __

[issue40066] Enum: modify __repr__, __str__; update docs

2022-01-17 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +vstinner nosy_count: 14.0 -> 15.0 pull_requests: +28835 pull_request: https://github.com/python/cpython/pull/30632 ___ Python tracker <https://bugs.python.org/issu

[issue20271] urllib.parse.urlparse() accepts wrong URLs

2022-01-17 Thread STINNER Victor
Change by STINNER Victor : -- nosy: -vstinner ___ Python tracker <https://bugs.python.org/issue20271> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40066] Enum: modify __repr__, __str__; update docs

2022-01-17 Thread STINNER Victor
STINNER Victor added the comment: New changeset 42a64c03ec5c443f2a5c2ee4284622f5d1f5326c by Victor Stinner in branch 'main': Revert "bpo-40066: [Enum] update str() and format() output (GH-30582)" (GH-30632) https://github.com/python/cpython/commit/42a64c03ec5c443f2a5c

[issue13886] test_builtin.PtyTests fail on non-ASCII characters if the readline module is loaded

2022-01-17 Thread STINNER Victor
STINNER Victor added the comment: New changeset ad6e640f910787e73fd00f59117fbd22cdf88c78 by Victor Stinner in branch 'main': bpo-13886: Skip PTY non-ASCII tests if readline is loaded (GH-30631) https://github.com/python/cpython/commit/ad6e640f910787e73fd00f59117fbd

[issue40066] Enum: modify __repr__, __str__; update docs

2022-01-17 Thread STINNER Victor
STINNER Victor added the comment: Sorry, I had to revert the change since it broke the CI and it prevented to merge new PRs. Tell me if I can help to get this test fixed and to get this change merged again. By the way, the PR 30582 was merged even if the Docs CI failed

[issue44133] Some C-API symbols (e.g. Py_FrozenMain) are not always exported on Unix

2022-01-17 Thread STINNER Victor
STINNER Victor added the comment: > Ah, sorry, I could have described the issue better. It's not a problem with > exporting, PyThread_get_thread_native_id() isn't available on Solaris (and > possibly other platforms) at all. Oh ok, it's a simple bug in my test. I

[issue44133] Some C-API symbols (e.g. Py_FrozenMain) are not always exported on Unix

2022-01-17 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +28839 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/30636 ___ Python tracker <https://bugs.python.org/issu

[issue45444] test.test_concurrent_futures fail in x86_ 64 architecture

2022-01-17 Thread STINNER Victor
Change by STINNER Victor : -- nosy: -vstinner ___ Python tracker <https://bugs.python.org/issue45444> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue13886] test_builtin.PtyTests fail on non-ASCII characters if the readline module is loaded

2022-01-17 Thread STINNER Victor
STINNER Victor added the comment: With my change, the two following commands now pass successfully: * ./python -m test test_readline test_builtin * ./python -m test -R 3:3 test_builtin -- ___ Python tracker <https://bugs.python.org/issue13

[issue45522] Allow to build Python without freelists

2022-01-17 Thread STINNER Victor
STINNER Victor added the comment: I reopen the issue to not forget to complete the doc. -- resolution: fixed -> status: closed -> open ___ Python tracker <https://bugs.python.org/i

[issue13886] test_builtin.PtyTests fail on non-ASCII characters if the readline module is loaded

2022-01-17 Thread STINNER Victor
STINNER Victor added the comment: New changeset 0fbb9afbddb93408e34bdb7625002374cb2ad68c by Miss Islington (bot) in branch '3.9': bpo-13886: Skip PTY non-ASCII tests if readline is loaded (GH-30631) (GH-30635) https://github.com/python/cpython/commit/0fbb9afbddb93408e34bdb76250023

[issue46383] _zoneinfo module_free has invalid function signature

2022-01-17 Thread STINNER Victor
STINNER Victor added the comment: New changeset 7a822c92782ffda8fa32a4b30a95b9de7cc1b8e6 by Miss Islington (bot) in branch '3.10': bpo-46383: Fix signature of zoneinfo module_free function (GH-30607) (GH-30610) https://github.com/python/cpython/commit/7a822c92782ffda8fa32a4b30a95b9

[issue13886] test_builtin.PtyTests fail on non-ASCII characters if the readline module is loaded

2022-01-17 Thread STINNER Victor
STINNER Victor added the comment: Ok, the initial issue is now fixed: the test pass. If someone wants to write test input() with non-ASCII input and readline, I suggest to open a new issue and add the test in the test_readline module instead. -- resolution: -> fixed stage: pa

[issue44133] Some C-API symbols (e.g. Py_FrozenMain) are not always exported on Unix

2022-01-17 Thread STINNER Victor
STINNER Victor added the comment: New changeset 16901c0482734dbd389b09ca3edfcf3e22faeed7 by Victor Stinner in branch 'main': bpo-44133: Skip PyThread_get_thread_native_id() if not available (GH-30636) https://github.com/python/cpython/commit/16901c0482734dbd389b09ca3edfcf

[issue44133] Some C-API symbols (e.g. Py_FrozenMain) are not always exported on Unix

2022-01-17 Thread STINNER Victor
Change by STINNER Victor : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue46381] Improve documentation of CFLAGS_NODIST, LDFLAGS_NODIST

2022-01-17 Thread STINNER Victor
STINNER Victor added the comment: Do you want to propose a PR? -- nosy: +vstinner ___ Python tracker <https://bugs.python.org/issue46381> ___ ___ Python-bug

[issue40066] Enum: modify __repr__, __str__; update docs

2022-01-17 Thread STINNER Victor
STINNER Victor added the comment: >self.assertEqual(repr(type), '') For this one, I suggest to replace the value with "..." doctest pattern. -- ___ Python tracker <https://

[issue40066] Enum: modify __repr__, __str__; update docs

2022-01-17 Thread STINNER Victor
STINNER Victor added the comment: I created https://github.com/python/core-workflow/issues/424 "Should we make the Docs CI mandatory on the Python main branch?". -- ___ Python tracker <https://bugs.python.o

[issue46417] [subinterpreters] Clear static types in Py_Finalize()

2022-01-17 Thread STINNER Victor
New submission from STINNER Victor : Converting static types to heap types is a work-in-progress: * bpo-40077: "Convert static types to heap types: use PyType_FromSpec()" * At December 29, 2020, 43% (89/206) of types are declared as heap types on a total of 206 types. For comp

[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2022-01-17 Thread STINNER Victor
STINNER Victor added the comment: > I wrote PR 20763 to "finalize" static types in Py_Finalize(). It mostly > works, but "./Programs/_testembed test_forced_io_encoding" crash. (...) I created bpo-46417 follow-up issue: "[subinterpreters] Cle

[issue40077] Convert static types to heap types: use PyType_FromSpec()

2022-01-17 Thread STINNER Victor
STINNER Victor added the comment: See also bpo-46417 "[subinterpreters] Clear static types in Py_Finalize()". -- ___ Python tracker <https://bugs.python.o

[issue45691] Partial moving of core objects to interpreter state is incorrect at best, unsafe at worse.

2022-01-17 Thread STINNER Victor
STINNER Victor added the comment: Mark: > `sys.float_info.n_unnamed_fields` causes a memory violation if the > per-interpreter allocated 0 held by sys.float_info.n_unnamed_fields is freed. I created bpo-46417 follow-up issue: "[subinterpreters] Clear static types in

[issue45691] Partial moving of core objects to interpreter state is incorrect at best, unsafe at worse.

2022-01-17 Thread STINNER Victor
STINNER Victor added the comment: > `sys.float_info.n_unnamed_fields` causes a memory violation if the > per-interpreter allocated 0 held by sys.float_info.n_unnamed_fields is freed. > If it is not freed, then `sys.float_info.n_unnamed_fields is 0` is False, > meaning that t

[issue46417] [subinterpreters] Clear static types in Py_Finalize()

2022-01-17 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +28847 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30645 ___ Python tracker <https://bugs.python.org/issu

[issue46028] 3.11.0a3: under tox, sys._base_executable is wrong

2022-01-18 Thread STINNER Victor
STINNER Victor added the comment: See also: https://discuss.python.org/t/virtual-environments-vs-nix-python-upgrades/12588 "Virtual environments vs. *nix Python upgrades". -- nosy: +vstinner ___ Python tracker <https://bugs.python.o

[issue40255] Fixing Copy on Writes from reference counting and immortal objects

2022-01-18 Thread STINNER Victor
Change by STINNER Victor : -- title: Fixing Copy on Writes from reference counting -> Fixing Copy on Writes from reference counting and immortal objects ___ Python tracker <https://bugs.python.org/issu

[issue46417] [subinterpreters] Clear static types in Py_Finalize()

2022-01-18 Thread STINNER Victor
STINNER Victor added the comment: > If we have static types, that means there is a mechanism to share some > objects across interpreters. Sharing objects between interpreters is bad and is causing complex bugs. See a recent example of an object traveling from one interpreter to anoth

[issue46417] Clear static types in Py_Finalize() for embedded Python

2022-01-18 Thread STINNER Victor
Change by STINNER Victor : -- components: +Interpreter Core -Subinterpreters ___ Python tracker <https://bugs.python.org/issue46417> ___ ___ Python-bugs-list m

[issue46417] Clear static types in Py_Finalize() for embedded Python

2022-01-18 Thread STINNER Victor
Change by STINNER Victor : -- title: [subinterpreters] Clear static types in Py_Finalize() -> Clear static types in Py_Finalize() for embedded Python ___ Python tracker <https://bugs.python.org/issu

[issue43869] Fix documentation of epoch/time.time

2022-01-18 Thread STINNER Victor
STINNER Victor added the comment: New changeset ff7703c4b609a697ada8165fd1c52a73404b6d07 by Miguel Brito in branch 'main': bpo-43869: Improve epoch docs (GH-25777) https://github.com/python/cpython/commit/ff7703c4b609a697ada8165fd1c52a

[issue43869] Fix documentation of epoch/time.time

2022-01-18 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +28865 pull_request: https://github.com/python/cpython/pull/30664 ___ Python tracker <https://bugs.python.org/issue43

[issue43869] Fix documentation of epoch/time.time

2022-01-18 Thread STINNER Victor
STINNER Victor added the comment: I was going to close the change, but I had a last look and... oh... I found that the Python test suite checks that the Epoch is 1970-01-01 at 00:00 since 2008! I wrote GH-30664 to add an explicit test and I updated the doc

[issue43869] Fix documentation of epoch/time.time

2022-01-19 Thread STINNER Victor
STINNER Victor added the comment: New changeset a847785b40ed8819bde2dac5849dc31d15e99a74 by Victor Stinner in branch 'main': bpo-43869: Time Epoch is the same on all platforms (GH-30664) https://github.com/python/cpython/commit/a847785b40ed8819bde2dac5849dc3

[issue43869] Fix documentation of epoch/time.time

2022-01-19 Thread STINNER Victor
Change by STINNER Victor : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue46432] AMD64 FreeBSD Shared 3.x buildbot fails to build: error: error reading 'LASTCFLAGS'

2022-01-19 Thread STINNER Victor
New submission from STINNER Victor : The AMD64 FreeBSD Shared 3.x buildbot worker fails to build Python with the following error message: error reading 'LASTCFLAGS' The first failure was today (January 19, 2022) at build 1513: https://buildbot.python.org/all/#/builders/483/b

[issue39573] [C API] Avoid accessing PyObject and PyVarObject members directly: add Py_SET_TYPE() and Py_IS_TYPE(), disallow Py_TYPE(obj)=type

2022-01-19 Thread STINNER Victor
STINNER Victor added the comment: > @victor, git bisect tells me the change > f3fa63ec75fdbb4a08a10957a5c631bf0c4a5970 caused > test_exceptions.ExceptionTests.test_recursion_in_except_handler to stack > overflow only on windows debug builds. FYI this regression was handled last

[issue46417] Clear static types in Py_Finalize() for embedded Python

2022-01-20 Thread STINNER Victor
STINNER Victor added the comment: If tomorrow static types are shared between sub-interpreters, it doesn't solve this problem: we still need to release memory allocated by Py_Initialize() in Py_Finalize() when Python is embedded. This issue is a sub-set of the big bpo-1635741 which exp

[issue46417] Clear static types in Py_Finalize() for embedded Python

2022-01-20 Thread STINNER Victor
STINNER Victor added the comment: I checked with Valgrind the affect of PR 30645. main branch: ==330902== LEAK SUMMARY: ==330902== possibly lost: 29,128 bytes in 494 blocks ==330902==still reachable: 353,615 bytes in 3,577 blocks With the PR: ==332161== LEAK SUMMARY: ==332161

[issue46070] [subinterpreters] crash when importing _sre in subinterpreters in parallel (Python 3.9 regression)

2022-01-20 Thread STINNER Victor
STINNER Victor added the comment: Another measure using the command: PYTHONHASHSEED=0 ./python -X showrefcount -c pass I had to run the command 20 times to get a stable value, I don't know why. main branch: [21981 refs, 5716 blocks] PR: [21887 refs, 5667 blocks] => the PR re

[issue46417] Clear static types in Py_Finalize() for embedded Python

2022-01-20 Thread STINNER Victor
STINNER Victor added the comment: Another measure using the command: PYTHONHASHSEED=0 ./python -X showrefcount -c pass I had to run the command 20 times to get a stable value, I don't know why. main branch: [21981 refs, 5716 blocks] PR: [21887 refs, 5667 blocks] => the PR re

[issue46070] [subinterpreters] crash when importing _sre in subinterpreters in parallel (Python 3.9 regression)

2022-01-20 Thread STINNER Victor
Change by STINNER Victor : -- Removed message: https://bugs.python.org/msg411050 ___ Python tracker <https://bugs.python.org/issue46070> ___ ___ Python-bug

<    1   2   3   4   5   6   7   8   9   10   >