<feed xmlns='http://www.w3.org/2005/Atom'>
<title>cpython.git/Python/codecs.c, branch v3.12.0b2</title>
<subtitle>https://github.com/python/cpython.git</subtitle>
<link rel='alternate' type='text/html' href='http://service.techsat.com/oss-git/cpython.git/'/>
<entry>
<title>gh-77757: replace exception wrapping by PEP-678 notes in typeobject's __set_name__ (#103402)</title>
<updated>2023-04-11T10:53:06Z</updated>
<author>
<name>Irit Katriel</name>
<email>1055913+iritkatriel@users.noreply.github.com</email>
</author>
<published>2023-04-11T10:53:06Z</published>
<link rel='alternate' type='text/html' href='http://service.techsat.com/oss-git/cpython.git/commit/?id=55c99d97e14618dfce41472dd4446f763b0da13f'/>
<id>55c99d97e14618dfce41472dd4446f763b0da13f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>gh-102406: replace exception chaining by PEP-678 notes in codecs (#102407)</title>
<updated>2023-03-21T21:36:31Z</updated>
<author>
<name>Irit Katriel</name>
<email>1055913+iritkatriel@users.noreply.github.com</email>
</author>
<published>2023-03-21T21:36:31Z</published>
<link rel='alternate' type='text/html' href='http://service.techsat.com/oss-git/cpython.git/commit/?id=76350e85ebf96df588384f3d9bdc20d11045bef4'/>
<id>76350e85ebf96df588384f3d9bdc20d11045bef4</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>gh-99300: Replace Py_INCREF() with Py_NewRef() (#99530)</title>
<updated>2022-11-16T17:34:24Z</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2022-11-16T17:34:24Z</published>
<link rel='alternate' type='text/html' href='http://service.techsat.com/oss-git/cpython.git/commit/?id=8211cf5d287acfd815b6a7f6471cdf83dcd2bb9b'/>
<id>8211cf5d287acfd815b6a7f6471cdf83dcd2bb9b</id>
<content type='text'>
Replace Py_INCREF() and Py_XINCREF() using a cast with Py_NewRef()
and Py_XNewRef().</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replace Py_INCREF() and Py_XINCREF() using a cast with Py_NewRef()
and Py_XNewRef().</pre>
</div>
</content>
</entry>
<entry>
<title>gh-99300: Use Py_NewRef() in Python/ directory (#99302)</title>
<updated>2022-11-10T08:03:39Z</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2022-11-10T08:03:39Z</published>
<link rel='alternate' type='text/html' href='http://service.techsat.com/oss-git/cpython.git/commit/?id=d8f239d86eb70c31aa4c4ac46a1d0a27bdb14b20'/>
<id>d8f239d86eb70c31aa4c4ac46a1d0a27bdb14b20</id>
<content type='text'>
Replace Py_INCREF() and Py_XINCREF() with Py_NewRef() and
Py_XNewRef() in C files of the Python/ directory.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replace Py_INCREF() and Py_XINCREF() with Py_NewRef() and
Py_XNewRef() in C files of the Python/ directory.</pre>
</div>
</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://service.techsat.com/oss-git/cpython.git/commit/?id=81c72044a181dbbfbf689d7a977d0d99090f26a8'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-45855: Replaced deprecated `PyImport_ImportModuleNoBlock` with PyImport_ImportModule (GH-30046)</title>
<updated>2021-12-12T08:45:20Z</updated>
<author>
<name>Kumar Aditya</name>
<email>59607654+kumaraditya303@users.noreply.github.com</email>
</author>
<published>2021-12-12T08:45:20Z</published>
<link rel='alternate' type='text/html' href='http://service.techsat.com/oss-git/cpython.git/commit/?id=41026c3155012d6ea50e01205c163b6739c675b8'/>
<id>41026c3155012d6ea50e01205c163b6739c675b8</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-45439: Move _PyObject_CallNoArgs() to pycore_call.h (GH-28895)</title>
<updated>2021-10-12T06:38:19Z</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2021-10-12T06:38:19Z</published>
<link rel='alternate' type='text/html' href='http://service.techsat.com/oss-git/cpython.git/commit/?id=d943d19172aa93ce88bade15b9f23a0ce3bc72ff'/>
<id>d943d19172aa93ce88bade15b9f23a0ce3bc72ff</id>
<content type='text'>
* Move _PyObject_CallNoArgs() to pycore_call.h (internal C API).
* _ssl, _sqlite and _testcapi extensions now call the public
  PyObject_CallNoArgs() function, rather than _PyObject_CallNoArgs().
* _lsprof extension is now built with Py_BUILD_CORE_MODULE macro
  defined to get access to internal _PyObject_CallNoArgs().</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Move _PyObject_CallNoArgs() to pycore_call.h (internal C API).
* _ssl, _sqlite and _testcapi extensions now call the public
  PyObject_CallNoArgs() function, rather than _PyObject_CallNoArgs().
* _lsprof extension is now built with Py_BUILD_CORE_MODULE macro
  defined to get access to internal _PyObject_CallNoArgs().</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-45439: Rename _PyObject_CallNoArg() to _PyObject_CallNoArgs() (GH-28891)</title>
<updated>2021-10-11T22:42:23Z</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2021-10-11T22:42:23Z</published>
<link rel='alternate' type='text/html' href='http://service.techsat.com/oss-git/cpython.git/commit/?id=ce3489cfdb9f0e050bdc45ce5d3902c2577ea683'/>
<id>ce3489cfdb9f0e050bdc45ce5d3902c2577ea683</id>
<content type='text'>
Fix typo in the private _PyObject_CallNoArg() function name: rename
it to _PyObject_CallNoArgs() to be consistent with the public
function PyObject_CallNoArgs().</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix typo in the private _PyObject_CallNoArg() function name: rename
it to _PyObject_CallNoArgs() to be consistent with the public
function PyObject_CallNoArgs().</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-42157: unicodedata avoids references to UCD_Type (GH-22990)</title>
<updated>2020-10-26T18:19:36Z</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2020-10-26T18:19:36Z</published>
<link rel='alternate' type='text/html' href='http://service.techsat.com/oss-git/cpython.git/commit/?id=920cb647ba23feab7987d0dac1bd63bfc2ffc4c0'/>
<id>920cb647ba23feab7987d0dac1bd63bfc2ffc4c0</id>
<content type='text'>
* UCD_Check() uses PyModule_Check()
* Simplify the internal _PyUnicode_Name_CAPI structure:

  * Remove size and state members
  * Remove state and self parameters of getcode() and getname()
    functions

* Remove global_module_state</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* UCD_Check() uses PyModule_Check()
* Simplify the internal _PyUnicode_Name_CAPI structure:

  * Remove size and state members
  * Remove state and self parameters of getcode() and getname()
    functions

* Remove global_module_state</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-1635741: _PyUnicode_Name_CAPI moves to internal C API (GH-22713)</title>
<updated>2020-10-26T15:43:47Z</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2020-10-26T15:43:47Z</published>
<link rel='alternate' type='text/html' href='http://service.techsat.com/oss-git/cpython.git/commit/?id=47e1afd2a1793b5818a16c41307a4ce976331649'/>
<id>47e1afd2a1793b5818a16c41307a4ce976331649</id>
<content type='text'>
The private _PyUnicode_Name_CAPI structure of the PyCapsule API
unicodedata.ucnhash_CAPI moves to the internal C API. Moreover, the
structure gets a new state member which must be passed to the
getcode() and getname() functions.

* Move Include/ucnhash.h to Include/internal/pycore_ucnhash.h
* unicodedata module is now built with Py_BUILD_CORE_MODULE.
* unicodedata: move hashAPI variable into unicodedata_module_state.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The private _PyUnicode_Name_CAPI structure of the PyCapsule API
unicodedata.ucnhash_CAPI moves to the internal C API. Moreover, the
structure gets a new state member which must be passed to the
getcode() and getname() functions.

* Move Include/ucnhash.h to Include/internal/pycore_ucnhash.h
* unicodedata module is now built with Py_BUILD_CORE_MODULE.
* unicodedata: move hashAPI variable into unicodedata_module_state.</pre>
</div>
</content>
</entry>
</feed>
