<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/cpython-git.git/Modules/_io, branch v3.11.0b2</title>
<subtitle>github.com: python/cpython.git
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/'/>
<entry>
<title>gh-91320: Argument Clinic uses _PyCFunction_CAST() (#32210)</title>
<updated>2022-05-03T18:25:41+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2022-05-03T18:25:41+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=b270b82f1137ff25ee263eafd31503d760f3403d'/>
<id>b270b82f1137ff25ee263eafd31503d760f3403d</id>
<content type='text'>
Replace "(PyCFunction)(void(*)(void))func" cast with
_PyCFunction_CAST(func).</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replace "(PyCFunction)(void(*)(void))func" cast with
_PyCFunction_CAST(func).</pre>
</div>
</content>
</entry>
<entry>
<title>gh-91952: Make TextIOWrapper.reconfigure() supports "locale" encoding (GH-91982)</title>
<updated>2022-05-01T01:44:14+00:00</updated>
<author>
<name>Inada Naoki</name>
<email>songofacandy@gmail.com</email>
</author>
<published>2022-05-01T01:44:14+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=0729b31a8b9ac35ef9b79fdc5aed22cccec9ba16'/>
<id>0729b31a8b9ac35ef9b79fdc5aed22cccec9ba16</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-46712: share more global strings in deepfreeze (gh-32152)</title>
<updated>2022-04-19T17:41:36+00:00</updated>
<author>
<name>Kumar Aditya</name>
<email>59607654+kumaraditya303@users.noreply.github.com</email>
</author>
<published>2022-04-19T17:41:36+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=ab0d35d70dfe0b4c11583f8f735a8cc49b58c58b'/>
<id>ab0d35d70dfe0b4c11583f8f735a8cc49b58c58b</id>
<content type='text'>
(for gh-90868)</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(for gh-90868)</pre>
</div>
</content>
</entry>
<entry>
<title>gh-91526: io: Remove device encoding support from TextIOWrapper (GH-91529)</title>
<updated>2022-04-19T02:44:36+00:00</updated>
<author>
<name>Inada Naoki</name>
<email>songofacandy@gmail.com</email>
</author>
<published>2022-04-19T02:44:36+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=6fdb62b1fa344b9cdf1f221eac83404fb1980822'/>
<id>6fdb62b1fa344b9cdf1f221eac83404fb1980822</id>
<content type='text'>
`TextIOWrapper.__init__()` called `os.device_encoding(file.fileno())` if fileno is 0-2 and encoding=None.
But it is very rarely works, and never documented behavior.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`TextIOWrapper.__init__()` called `os.device_encoding(file.fileno())` if fileno is 0-2 and encoding=None.
But it is very rarely works, and never documented behavior.</pre>
</div>
</content>
</entry>
<entry>
<title>gh-91156: Fix `encoding="locale"` in UTF-8 mode (GH-70056)</title>
<updated>2022-04-14T07:00:35+00:00</updated>
<author>
<name>Inada Naoki</name>
<email>songofacandy@gmail.com</email>
</author>
<published>2022-04-14T07:00:35+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=13b17e2a0a56d506d62a0bf2774e3deb4cbaeb72'/>
<id>13b17e2a0a56d506d62a0bf2774e3deb4cbaeb72</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-47000: Add `locale.getencoding()` (GH-32068)</title>
<updated>2022-04-09T00:54:54+00:00</updated>
<author>
<name>Inada Naoki</name>
<email>songofacandy@gmail.com</email>
</author>
<published>2022-04-09T00:54:54+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=677320348728ce058fa3579017e985af74a236d4'/>
<id>677320348728ce058fa3579017e985af74a236d4</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-47000: Make `io.text_encoding()` respects UTF-8 mode (GH-32003)</title>
<updated>2022-04-04T02:46:57+00:00</updated>
<author>
<name>Inada Naoki</name>
<email>songofacandy@gmail.com</email>
</author>
<published>2022-04-04T02:46:57+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=4216dce04b7d3f329beaaafc82a77c4ac6cf4d57'/>
<id>4216dce04b7d3f329beaaafc82a77c4ac6cf4d57</id>
<content type='text'>
Co-authored-by: Eric Snow &lt;ericsnowcurrently@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Co-authored-by: Eric Snow &lt;ericsnowcurrently@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-25415: Remove confusing sentence from IOBase docstrings (PR-31631)</title>
<updated>2022-03-04T17:35:52+00:00</updated>
<author>
<name>slateny</name>
<email>46876382+slateny@users.noreply.github.com</email>
</author>
<published>2022-03-04T17:35:52+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=cedd2473a9bebe07f3ced4f341cf58a2fef07b03'/>
<id>cedd2473a9bebe07f3ced4f341cf58a2fef07b03</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-46765: Replace Locally Cached Strings with Statically Initialized Objects (gh-31366)</title>
<updated>2022-02-23T00:23:51+00:00</updated>
<author>
<name>Eric Snow</name>
<email>ericsnowcurrently@gmail.com</email>
</author>
<published>2022-02-23T00:23:51+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=1f455361ecfb1892e375bdbee813cdf095b6cfb8'/>
<id>1f455361ecfb1892e375bdbee813cdf095b6cfb8</id>
<content type='text'>
https://bugs.python.org/issue46765</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://bugs.python.org/issue46765</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:07+00:00</updated>
<author>
<name>Eric Snow</name>
<email>ericsnowcurrently@gmail.com</email>
</author>
<published>2022-02-08T20:39:07+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.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>
</feed>
