Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork41
Conversation
vstinner left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Please document the new function in docs/changelog.rst and docs/api.rst.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Co-authored-by: Victor Stinner <vstinner@python.org>
Uh oh!
There was an error while loading.Please reload this page.
vstinner left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I agree to not add Python 3.12 support.
It's tempting to add Python 3.12 support, but Python 3.12 semantics is different:
staticinlinevoid_Py_SetImmortal(PyObject*op){if (op) {op->ob_refcnt=_Py_IMMORTAL_REFCNT; }}
- Different API: it has no return value (
void)! - It doesn't reject Unicode objects.
- It doesn't untrack objects in the GC.
// Immortal objects were implemented in Python 3.12, however there is no easy API// to make objects immortal until 3.14 which has _Py_SetImmortal(). Since// immortal objects are primarily needed for free-threading, this API is implemented// for 3.14 using _Py_SetImmortal() and uses private macros on 3.13.I agree thatPyUnstable_SetImmortal() is mostly useful on free-threaded builds, so it's ok to skip Python 3.12.
vstinner left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
LGTM.
vstinner commentedFeb 12, 2026
Good, the tests passed successfully on Python 3.13 on regular build and free-threaded build:
|
8636bcc intopython:mainUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
No description provided.