<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/cpython-git.git/Python, branch Mariatta-patch-2</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>bpo-1635741: _PyUnicode_Name_CAPI moves to internal C API (GH-22713)</title>
<updated>2020-10-26T15:43:47+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2020-10-26T15:43:47+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.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>
<entry>
<title>bpo-42152: Use PyDict_Contains and PyDict_SetDefault if appropriate. (GH-22986)</title>
<updated>2020-10-26T10:47:57+00:00</updated>
<author>
<name>Serhiy Storchaka</name>
<email>storchaka@gmail.com</email>
</author>
<published>2020-10-26T10:47:57+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=b510e101f8b5b31276bf97b921ca9247162881d2'/>
<id>b510e101f8b5b31276bf97b921ca9247162881d2</id>
<content type='text'>
If PyDict_GetItemWithError is only used to check whether the key is in dict,
it is better to use PyDict_Contains instead.

And if it is used in combination with PyDict_SetItem, PyDict_SetDefault can
replace the combination.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If PyDict_GetItemWithError is only used to check whether the key is in dict,
it is better to use PyDict_Contains instead.

And if it is used in combination with PyDict_SetItem, PyDict_SetDefault can
replace the combination.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-42006: Stop using PyDict_GetItem, PyDict_GetItemString and _PyDict_GetItemId. (GH-22648)</title>
<updated>2020-10-26T06:43:39+00:00</updated>
<author>
<name>Serhiy Storchaka</name>
<email>storchaka@gmail.com</email>
</author>
<published>2020-10-26T06:43:39+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=fb5db7ec58624cab0797b4050735be865d380823'/>
<id>fb5db7ec58624cab0797b4050735be865d380823</id>
<content type='text'>
These functions are considered not safe because they suppress all internal errors
and can return wrong result.  PyDict_GetItemString and _PyDict_GetItemId can
also silence current exception in rare cases.

Remove no longer used _PyDict_GetItemId.
Add _PyDict_ContainsId and rename _PyDict_Contains into
_PyDict_Contains_KnownHash.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These functions are considered not safe because they suppress all internal errors
and can return wrong result.  PyDict_GetItemString and _PyDict_GetItemId can
also silence current exception in rare cases.

Remove no longer used _PyDict_GetItemId.
Add _PyDict_ContainsId and rename _PyDict_Contains into
_PyDict_Contains_KnownHash.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-38324: Fix test__locale.py Windows failures (GH-20529)</title>
<updated>2020-10-20T11:39:52+00:00</updated>
<author>
<name>TIGirardi</name>
<email>tiagoigirardi@gmail.com</email>
</author>
<published>2020-10-20T11:39:52+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=f2312037e3a974d26ed3e23884f94c6af111a27a'/>
<id>f2312037e3a974d26ed3e23884f94c6af111a27a</id>
<content type='text'>
Use wide-char _W_* fields of lconv structure on Windows
Remove "ps_AF" from test__locale.known_numerics on Windows</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use wide-char _W_* fields of lconv structure on Windows
Remove "ps_AF" from test__locale.known_numerics on Windows</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-42093: Add opcode cache for LOAD_ATTR (GH-22803)</title>
<updated>2020-10-20T05:22:44+00:00</updated>
<author>
<name>Pablo Galindo</name>
<email>Pablogsal@gmail.com</email>
</author>
<published>2020-10-20T05:22:44+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=109826c8508dd02e06ae0f1784f1d202495a8680'/>
<id>109826c8508dd02e06ae0f1784f1d202495a8680</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>closes bpo-42030: Remove legacy AIX dynload support (GH-22717)</title>
<updated>2020-10-16T18:03:28+00:00</updated>
<author>
<name>Kevin Adler</name>
<email>kadler@us.ibm.com</email>
</author>
<published>2020-10-16T18:03:28+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=1dd6d956a3ddf2cf6d4a69241dba8cd1379421b9'/>
<id>1dd6d956a3ddf2cf6d4a69241dba8cd1379421b9</id>
<content type='text'>
Since c19c5a6, AIX builds have defaulted to using dynload_shlib over
dynload_aix when dlopen is available. This function has been available
since AIX 4.3, which went out of support in 2003, the same year the
previously referenced commit was made. It has been nearly 20 years
since a version of AIX has been supported which has not used
dynload_shlib so there's no reason to keep this legacy code around.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since c19c5a6, AIX builds have defaulted to using dynload_shlib over
dynload_aix when dlopen is available. This function has been available
since AIX 4.3, which went out of support in 2003, the same year the
previously referenced commit was made. It has been nearly 20 years
since a version of AIX has been supported which has not used
dynload_shlib so there's no reason to keep this legacy code around.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-41919, test_codecs: Move codecs.register calls to setUp() (GH-22513)</title>
<updated>2020-10-16T08:34:15+00:00</updated>
<author>
<name>Hai Shi</name>
<email>shihai1992@gmail.com</email>
</author>
<published>2020-10-16T08:34:15+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=c9f696cb96d1c362d5cad871f61da520572d9b08'/>
<id>c9f696cb96d1c362d5cad871f61da520572d9b08</id>
<content type='text'>
* Move the codecs' (un)register operation to testcases.
* Remove _codecs._forget_codec() and _PyCodec_Forget()</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Move the codecs' (un)register operation to testcases.
* Remove _codecs._forget_codec() and _PyCodec_Forget()</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-41894: Fix UnicodeDecodeError while loading native module (GH-22466)</title>
<updated>2020-10-15T01:53:27+00:00</updated>
<author>
<name>Kevin Adler</name>
<email>kadler@us.ibm.com</email>
</author>
<published>2020-10-15T01:53:27+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=2d2af320d94afc6561e8f8adf174c9d3fd9065bc'/>
<id>2d2af320d94afc6561e8f8adf174c9d3fd9065bc</id>
<content type='text'>
When running in a non-UTF-8 locale, if an error occurs while importing a
native Python module (say because a dependent share library is missing),
the error message string returned may contain non-ASCII code points
causing a UnicodeDecodeError.

PyUnicode_DecodeFSDefault is used for buffers which may contain
filesystem  paths. For consistency with os.strerror(),
PyUnicode_DecodeLocale is used for buffers which contain system error
messages. While the shortname parameter is always encoded in ASCII
according to PEP 489, it is left decoded using PyUnicode_FromString to
minimize the changes and since it should not affect the decoding (albeit
_potentially_ slower).

In dynload_hpux, since the error buffer contains a message generated
from a static ASCII string and the module filesystem path,
PyUnicode_DecodeFSDefault is used instead of PyUnicode_DecodeLocale as
is used elsewhere.

* bpo-41894: Fix bugs in dynload error msg handling

For both dynload_aix and dynload_hpux, properly handle the possibility
that decoding strings may return NULL and when such an error happens,
properly decrement any previously decoded strings and return early.

In addition, in dynload_aix, ensure that we pass the decoded string
*object* pathname_ob to PyErr_SetImportError instead of the original
pathname buffer.

Co-authored-by: Serhiy Storchaka &lt;storchaka@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When running in a non-UTF-8 locale, if an error occurs while importing a
native Python module (say because a dependent share library is missing),
the error message string returned may contain non-ASCII code points
causing a UnicodeDecodeError.

PyUnicode_DecodeFSDefault is used for buffers which may contain
filesystem  paths. For consistency with os.strerror(),
PyUnicode_DecodeLocale is used for buffers which contain system error
messages. While the shortname parameter is always encoded in ASCII
according to PEP 489, it is left decoded using PyUnicode_FromString to
minimize the changes and since it should not affect the decoding (albeit
_potentially_ slower).

In dynload_hpux, since the error buffer contains a message generated
from a static ASCII string and the module filesystem path,
PyUnicode_DecodeFSDefault is used instead of PyUnicode_DecodeLocale as
is used elsewhere.

* bpo-41894: Fix bugs in dynload error msg handling

For both dynload_aix and dynload_hpux, properly handle the possibility
that decoding strings may return NULL and when such an error happens,
properly decrement any previously decoded strings and return early.

In addition, in dynload_aix, ensure that we pass the decoded string
*object* pathname_ob to PyErr_SetImportError instead of the original
pathname buffer.

Co-authored-by: Serhiy Storchaka &lt;storchaka@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>closes bpo-42029: Remove dynload_dl (GH-22687)</title>
<updated>2020-10-14T01:49:24+00:00</updated>
<author>
<name>Kevin Adler</name>
<email>kadler@us.ibm.com</email>
</author>
<published>2020-10-14T01:49:24+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=0cafcd3c56c9475913d8d4fd0223c297dbb70ac6'/>
<id>0cafcd3c56c9475913d8d4fd0223c297dbb70ac6</id>
<content type='text'>
All references to this dynamic loading method were removed in b9949db,
when support for this method was dropped, but the implementation code
was not dropped (seemingly in oversight).</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
All references to this dynamic loading method were removed in b9949db,
when support for this method was dropped, but the implementation code
was not dropped (seemingly in oversight).</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-40422: Move _Py_closerange to fileutils.c (GH-22680)</title>
<updated>2020-10-13T20:04:44+00:00</updated>
<author>
<name>Kyle Evans</name>
<email>kevans91@users.noreply.github.com</email>
</author>
<published>2020-10-13T20:04:44+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=7992579cd27f14f472acc37aca537eec55f681ef'/>
<id>7992579cd27f14f472acc37aca537eec55f681ef</id>
<content type='text'>
This API is relatively lightweight and organizationally, given that it's
used by multiple modules, it makes sense to move it to fileutils.

Requires making sure that _posixsubprocess is compiled with the appropriate
Py_BUIILD_CORE_BUILTIN macro.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This API is relatively lightweight and organizationally, given that it's
used by multiple modules, it makes sense to move it to fileutils.

Requires making sure that _posixsubprocess is compiled with the appropriate
Py_BUIILD_CORE_BUILTIN macro.</pre>
</div>
</content>
</entry>
</feed>
