<feed xmlns='http://www.w3.org/2005/Atom'>
<title>python.git/Python/bltinmodule.c, branch master</title>
<subtitle>Python interpreter</subtitle>
<id>http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Python/bltinmodule.c?h=master</id>
<link rel='self' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Python/bltinmodule.c?h=master'/>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/'/>
<updated>2023-06-11T11:13:45Z</updated>
<entry>
<title>[3.11] gh-105375: Improve error handling in the builtins extension module (GH-105585) (#105650)</title>
<updated>2023-06-11T11:13:45Z</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2023-06-11T11:13:45Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=b3d95d4e612ffa841d83332c0bc3e82e9f456c25'/>
<id>urn:sha1:b3d95d4e612ffa841d83332c0bc3e82e9f456c25</id>
<content type='text'>
(cherry picked from commit d4fa52934a282df51cff800eee5caeb94a229547)

Co-authored-by: Erlend E. Aasland &lt;erlend.aasland@protonmail.com&gt;</content>
</entry>
<entry>
<title>[3.11] gh-103886: Improve `builtins.__doc__` (GH-104179) (#104257)</title>
<updated>2023-05-07T02:28:04Z</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2023-05-07T02:28:04Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=8f23cadc4ca0c56e18c32985ae0c087e79633c0f'/>
<id>urn:sha1:8f23cadc4ca0c56e18c32985ae0c087e79633c0f</id>
<content type='text'>
gh-103886: Improve `builtins.__doc__` (GH-104179)
(cherry picked from commit b35711d17a90251bdd57d255090e07daafe89f6c)

Co-authored-by: Tomas R &lt;tomas.roun8@gmail.com&gt;
Co-authored-by: Jelle Zijlstra &lt;jelle.zijlstra@gmail.com&gt;</content>
</entry>
<entry>
<title>gh-102356: Add thrashcan macros to filter object dealloc (GH-102426)</title>
<updated>2023-03-05T11:25:48Z</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2023-03-05T11:25:48Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=63fd95410038d1333da8b514adffdd0f4736aa27'/>
<id>urn:sha1:63fd95410038d1333da8b514adffdd0f4736aa27</id>
<content type='text'>
Add thrashcan macros to the deallocator of the filter objects to protect against deeply nested destruction of chains of nested filters.
(cherry picked from commit 66aa78cbe604a7c5731f074b869f92174a8e3b64)

Co-authored-by: Marta Gómez Macías &lt;mgmacias@google.com&gt;</content>
</entry>
<entry>
<title>[3.11] gh-100776: Fix misleading default value in help(input) (GH-100788) (#100841)</title>
<updated>2023-01-08T09:23:12Z</updated>
<author>
<name>Shantanu</name>
<email>12621235+hauntsaninja@users.noreply.github.com</email>
</author>
<published>2023-01-08T09:23:12Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=be7c19723fa3fea3a4efe5c9c795c1e4a2fc05f5'/>
<id>urn:sha1:be7c19723fa3fea3a4efe5c9c795c1e4a2fc05f5</id>
<content type='text'>
(cherry picked from commit a2141882f259e21bb09fa0b7cba8142147b9e3d7)

Co-authored-by: Shantanu &lt;12621235+hauntsaninja@users.noreply.github.com&gt;</content>
</entry>
<entry>
<title>[3.11] Fix typos in `bltinmodule.c`. (GH-97789)</title>
<updated>2022-10-03T20:10:14Z</updated>
<author>
<name>Benjamin Peterson</name>
<email>benjamin@python.org</email>
</author>
<published>2022-10-03T20:10:14Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=4d4b1e6c0b4b71cdf0438279ee11f1f49104e422'/>
<id>urn:sha1:4d4b1e6c0b4b71cdf0438279ee11f1f49104e422</id>
<content type='text'>
(cherry picked from commit 873a2f25272ca9fb027866a9730c44ba627b30cc)

Co-authored-by: Nikita Sobolev &lt;mail@sobolevn.me&gt;</content>
</entry>
<entry>
<title>gh-92203: Add closure support to exec(). (#92204)</title>
<updated>2022-05-06T17:09:35Z</updated>
<author>
<name>larryhastings</name>
<email>larry@hastings.org</email>
</author>
<published>2022-05-06T17:09:35Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=50210643902d28405a57a9672347f43215dbdb3b'/>
<id>urn:sha1:50210643902d28405a57a9672347f43215dbdb3b</id>
<content type='text'>
Add a closure keyword-only parameter to exec(). It can only be specified when exec-ing a code object that uses free variables. When specified, it must be a tuple, with exactly the number of cell variables referenced by the code object. closure has a default value of None, and it must be None if the code object doesn't refer to any free variables.</content>
</entry>
<entry>
<title>gh-90667: Add specializations of Py_DECREF when types are known (GH-30872)</title>
<updated>2022-04-19T18:02:19Z</updated>
<author>
<name>Dennis Sweeney</name>
<email>36520290+sweeneyde@users.noreply.github.com</email>
</author>
<published>2022-04-19T18:02:19Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=da6c78584b1f45ce3766bf7f27fb033169715292'/>
<id>urn:sha1:da6c78584b1f45ce3766bf7f27fb033169715292</id>
<content type='text'>
</content>
</entry>
<entry>
<title>bpo-47164: Add _PyCFunction_CAST() macro (GH-32192)</title>
<updated>2022-03-31T08:02:34Z</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2022-03-31T08:02:34Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=f0bc69485677ae8973685866ada0982976d3878f'/>
<id>urn:sha1:f0bc69485677ae8973685866ada0982976d3878f</id>
<content type='text'>
Use the macro in C files of the Python/ directory.</content>
</entry>
<entry>
<title>Use FASTCALL for __import__ (GH-31752)</title>
<updated>2022-03-11T16:46:55Z</updated>
<author>
<name>Kumar Aditya</name>
<email>59607654+kumaraditya303@users.noreply.github.com</email>
</author>
<published>2022-03-11T16:46:55Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=6f3b9e2243d8c5b6cf1be988eb5d2bd3da65a422'/>
<id>urn:sha1:6f3b9e2243d8c5b6cf1be988eb5d2bd3da65a422</id>
<content type='text'>
</content>
</entry>
<entry>
<title>bpo-46541: Replace core use of _Py_IDENTIFIER() with statically initialized global objects. (gh-30928)</title>
<updated>2022-02-08T20:39:07Z</updated>
<author>
<name>Eric Snow</name>
<email>ericsnowcurrently@gmail.com</email>
</author>
<published>2022-02-08T20:39:07Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=81c72044a181dbbfbf689d7a977d0d99090f26a8'/>
<id>urn:sha1:81c72044a181dbbfbf689d7a977d0d99090f26a8</id>
<content type='text'>
We're no longer using _Py_IDENTIFIER() (or _Py_static_string()) in any core CPython code.  It is still used in a number of non-builtin stdlib modules.

The replacement is: PyUnicodeObject (not pointer) fields under _PyRuntimeState, statically initialized as part of _PyRuntime.  A new _Py_GET_GLOBAL_IDENTIFIER() macro facilitates lookup of the fields (along with _Py_GET_GLOBAL_STRING() for non-identifier strings).

https://bugs.python.org/issue46541#msg411799 explains the rationale for this change.

The core of the change is in:

* (new) Include/internal/pycore_global_strings.h - the declarations for the global strings, along with the macros
* Include/internal/pycore_runtime_init.h - added the static initializers for the global strings
* Include/internal/pycore_global_objects.h - where the struct in pycore_global_strings.h is hooked into _PyRuntimeState
* Tools/scripts/generate_global_objects.py - added generation of the global string declarations and static initializers

I've also added a --check flag to generate_global_objects.py (along with make check-global-objects) to check for unused global strings.  That check is added to the PR CI config.

The remainder of this change updates the core code to use _Py_GET_GLOBAL_IDENTIFIER() instead of _Py_IDENTIFIER() and the related _Py*Id functions (likewise for _Py_GET_GLOBAL_STRING() instead of _Py_static_string()).  This includes adding a few functions where there wasn't already an alternative to _Py*Id(), replacing the _Py_Identifier * parameter with PyObject *.

The following are not changed (yet):

* stop using _Py_IDENTIFIER() in the stdlib modules
* (maybe) get rid of _Py_IDENTIFIER(), etc. entirely -- this may not be doable as at least one package on PyPI using this (private) API
* (maybe) intern the strings during runtime init

https://bugs.python.org/issue46541</content>
</entry>
</feed>
