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
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
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
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
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
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
&
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
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
Change by STINNER Victor :
--
pull_requests: +28764
pull_request: https://github.com/python/cpython/pull/30564
___
Python tracker
<https://bugs.python.org/issue36
Change by STINNER Victor :
--
pull_requests: +28765
pull_request: https://github.com/python/cpython/pull/30565
___
Python tracker
<https://bugs.python.org/issue36
Change by STINNER Victor :
--
pull_requests: +28766
pull_request: https://github.com/python/cpython/pull/30566
___
Python tracker
<https://bugs.python.org/issue36
Change by STINNER Victor :
--
pull_requests: +28767
pull_request: https://github.com/python/cpython/pull/30564
___
Python tracker
<https://bugs.python.org/issue46
Change by STINNER Victor :
--
pull_requests: +28768
pull_request: https://github.com/python/cpython/pull/30565
___
Python tracker
<https://bugs.python.org/issue46
Change by STINNER Victor :
--
pull_requests: +28769
pull_request: https://github.com/python/cpython/pull/30566
___
Python tracker
<https://bugs.python.org/issue46
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
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
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
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
Change by STINNER Victor :
--
pull_requests: +28776
pull_request: https://github.com/python/cpython/pull/30577
___
Python tracker
<https://bugs.python.org/issue46
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
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
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
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
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
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
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/
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
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
Change by STINNER Victor :
--
pull_requests: +28779
pull_request: https://github.com/python/cpython/pull/30580
___
Python tracker
<https://bugs.python.org/issue46
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
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
STINNER Victor added the comment:
It would be nice to add some tests.
--
___
Python tracker
<https://bugs.python.org/issue46070>
___
___
Python-bugs-list mailin
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.
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
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
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
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
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
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
Change by STINNER Victor :
--
nosy: +vstinner
___
Python tracker
<https://bugs.python.org/issue45953>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
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
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
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
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
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
Change by STINNER Victor :
--
nosy: -vstinner
___
Python tracker
<https://bugs.python.org/issue46372>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
Change by STINNER Victor :
--
nosy: -vstinner
___
Python tracker
<https://bugs.python.org/issue24194>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
Change by STINNER Victor :
--
pull_requests: +28834
pull_request: https://github.com/python/cpython/pull/30631
___
Python tracker
<https://bugs.python.org/issue13
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
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
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
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
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
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.
--
__
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
Change by STINNER Victor :
--
nosy: -vstinner
___
Python tracker
<https://bugs.python.org/issue20271>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
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
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
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
Change by STINNER Victor :
--
nosy: -vstinner
___
Python tracker
<https://bugs.python.org/issue45444>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
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
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
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
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
Change by STINNER Victor :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
STINNER Victor added the comment:
Do you want to propose a PR?
--
nosy: +vstinner
___
Python tracker
<https://bugs.python.org/issue46381>
___
___
Python-bug
STINNER Victor added the comment:
>self.assertEqual(repr(type), '')
For this one, I suggest to replace the value with "..." doctest pattern.
--
___
Python tracker
<https://
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
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
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
STINNER Victor added the comment:
See also bpo-46417 "[subinterpreters] Clear static types in Py_Finalize()".
--
___
Python tracker
<https://bugs.python.o
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
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
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
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
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
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
Change by STINNER Victor :
--
components: +Interpreter Core -Subinterpreters
___
Python tracker
<https://bugs.python.org/issue46417>
___
___
Python-bugs-list m
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
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
Change by STINNER Victor :
--
pull_requests: +28865
pull_request: https://github.com/python/cpython/pull/30664
___
Python tracker
<https://bugs.python.org/issue43
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
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
Change by STINNER Victor :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
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
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
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
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
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
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
Change by STINNER Victor :
--
Removed message: https://bugs.python.org/msg411050
___
Python tracker
<https://bugs.python.org/issue46070>
___
___
Python-bug
101 - 200 of 35284 matches
Mail list logo