<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/cpython-git.git/Python/dynload_shlib.c, branch enum-lost-fixes</title>
<subtitle>github.com: python/cpython.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/'/>
<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://git.baserock.org/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>bpo-40268: Rename _PyInterpreterState_GET_UNSAFE() (GH-19509)</title>
<updated>2020-04-14T13:14:01+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2020-04-14T13:14:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=81a7be3fa22c983209cc0ffb3537b92b0370f83c'/>
<id>81a7be3fa22c983209cc0ffb3537b92b0370f83c</id>
<content type='text'>
Rename _PyInterpreterState_GET_UNSAFE() to _PyInterpreterState_GET()
for consistency with _PyThreadState_GET() and to have a shorter name
(help to fit into 80 columns).

Add also "assert(tstate != NULL);" to the function.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Rename _PyInterpreterState_GET_UNSAFE() to _PyInterpreterState_GET()
for consistency with _PyThreadState_GET() and to have a shorter name
(help to fit into 80 columns).

Add also "assert(tstate != NULL);" to the function.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-40268: Include explicitly pycore_interp.h (GH-19505)</title>
<updated>2020-04-14T12:26:24+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2020-04-14T12:26:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=4a3fe0835310643193ea45529ab0fb45c5f8f2fd'/>
<id>4a3fe0835310643193ea45529ab0fb45c5f8f2fd</id>
<content type='text'>
pycore_pystate.h no longer includes pycore_interp.h:
it's now included explicitly in files accessing PyInterpreterState.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
pycore_pystate.h no longer includes pycore_interp.h:
it's now included explicitly in files accessing PyInterpreterState.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-39947: Use _PyInterpreterState_GET_UNSAFE() (GH-18978)</title>
<updated>2020-03-13T17:03:56+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2020-03-13T17:03:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=ff4584caca04cb3da0dbd5b1e9bf67e40adf5312'/>
<id>ff4584caca04cb3da0dbd5b1e9bf67e40adf5312</id>
<content type='text'>
Replace _PyInterpreterState_Get() function call with
_PyInterpreterState_GET_UNSAFE() macro which is more efficient but
don't check if tstate or interp is NULL.

_Py_GetConfigsAsDict() now uses _PyThreadState_GET().</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replace _PyInterpreterState_Get() function call with
_PyInterpreterState_GET_UNSAFE() macro which is more efficient but
don't check if tstate or interp is NULL.

_Py_GetConfigsAsDict() now uses _PyThreadState_GET().</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-36722: Debug build loads libraries built in release mode (GH-12952)</title>
<updated>2019-04-25T23:40:00+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@redhat.com</email>
</author>
<published>2019-04-25T23:40:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=5422e3cfb7ffc50b147b4662d6f596cd61533754'/>
<id>5422e3cfb7ffc50b147b4662d6f596cd61533754</id>
<content type='text'>
In debug build, import now also looks for C extensions compiled in
release mode and for C extensions compiled in the stable ABI.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In debug build, import now also looks for C extensions compiled in
release mode and for C extensions compiled in the stable ABI.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-28401: prevent Py_DEBUG builds from trying to import limited ABI modules (GH-1766)</title>
<updated>2018-11-16T23:52:52+00:00</updated>
<author>
<name>Stefano Rivera</name>
<email>github@rivera.za.net</email>
</author>
<published>2018-11-16T23:52:52+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=338d54f0a59dc5e5b6c9e7397340169f3a3f8ea4'/>
<id>338d54f0a59dc5e5b6c9e7397340169f3a3f8ea4</id>
<content type='text'>
[Issue 28401](https://bugs.python.org/issue28401): Don't attempt to import the stable API extensions, they are not supported in PyDEBUG builds (which don't implement that ABI).


https://bugs.python.org/issue28401</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[Issue 28401](https://bugs.python.org/issue28401): Don't attempt to import the stable API extensions, they are not supported in PyDEBUG builds (which don't implement that ABI).


https://bugs.python.org/issue28401</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-35081: Rename internal headers (GH-10275)</title>
<updated>2018-11-12T15:53:38+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@redhat.com</email>
</author>
<published>2018-11-12T15:53:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=621cebe81b1e6c8de10425955bf532d31ee4df42'/>
<id>621cebe81b1e6c8de10425955bf532d31ee4df42</id>
<content type='text'>
Rename Include/internal/ headers:

* pycore_hash.h -&gt; pycore_pyhash.h
* pycore_lifecycle.h -&gt; pycore_pylifecycle.h
* pycore_mem.h -&gt; pycore_pymem.h
* pycore_state.h -&gt; pycore_pystate.h

Add missing headers to Makefile.pre.in and PCbuild:

* pycore_condvar.h.
* pycore_hamt.h
* pycore_pyhash.h</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Rename Include/internal/ headers:

* pycore_hash.h -&gt; pycore_pyhash.h
* pycore_lifecycle.h -&gt; pycore_pylifecycle.h
* pycore_mem.h -&gt; pycore_pymem.h
* pycore_state.h -&gt; pycore_pystate.h

Add missing headers to Makefile.pre.in and PCbuild:

* pycore_condvar.h.
* pycore_hamt.h
* pycore_pyhash.h</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-35081: Add pycore_ prefix to internal header files (GH-10263)</title>
<updated>2018-10-31T23:52:28+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@redhat.com</email>
</author>
<published>2018-10-31T23:52:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=27e2d1f21975dfb8c0ddcb192fa0f45a51b7977e'/>
<id>27e2d1f21975dfb8c0ddcb192fa0f45a51b7977e</id>
<content type='text'>
* Rename Include/internal/ header files:

  * pyatomic.h -&gt; pycore_atomic.h
  * ceval.h -&gt; pycore_ceval.h
  * condvar.h -&gt; pycore_condvar.h
  * context.h -&gt; pycore_context.h
  * pygetopt.h -&gt; pycore_getopt.h
  * gil.h -&gt; pycore_gil.h
  * hamt.h -&gt; pycore_hamt.h
  * hash.h -&gt; pycore_hash.h
  * mem.h -&gt; pycore_mem.h
  * pystate.h -&gt; pycore_state.h
  * warnings.h -&gt; pycore_warnings.h

* PCbuild project, Makefile.pre.in, Modules/Setup: add the
  Include/internal/ directory to the search paths of header files.
* Update includes. For example, replace #include "internal/mem.h"
  with #include "pycore_mem.h".</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Rename Include/internal/ header files:

  * pyatomic.h -&gt; pycore_atomic.h
  * ceval.h -&gt; pycore_ceval.h
  * condvar.h -&gt; pycore_condvar.h
  * context.h -&gt; pycore_context.h
  * pygetopt.h -&gt; pycore_getopt.h
  * gil.h -&gt; pycore_gil.h
  * hamt.h -&gt; pycore_hamt.h
  * hash.h -&gt; pycore_hash.h
  * mem.h -&gt; pycore_mem.h
  * pystate.h -&gt; pycore_state.h
  * warnings.h -&gt; pycore_warnings.h

* PCbuild project, Makefile.pre.in, Modules/Setup: add the
  Include/internal/ directory to the search paths of header files.
* Update includes. For example, replace #include "internal/mem.h"
  with #include "pycore_mem.h".</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-34301: Add _PyInterpreterState_Get() helper function (GH-8592)</title>
<updated>2018-08-03T13:33:52+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@redhat.com</email>
</author>
<published>2018-08-03T13:33:52+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=caba55b3b735405b280273f7d99866a046c18281'/>
<id>caba55b3b735405b280273f7d99866a046c18281</id>
<content type='text'>
sys_setcheckinterval() now uses a local variable to parse arguments,
before writing into interp-&gt;check_interval.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
sys_setcheckinterval() now uses a local variable to parse arguments,
before writing into interp-&gt;check_interval.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-30860: Consolidate stateful runtime globals. (#3397)</title>
<updated>2017-09-08T05:51:28+00:00</updated>
<author>
<name>Eric Snow</name>
<email>ericsnowcurrently@gmail.com</email>
</author>
<published>2017-09-08T05:51:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=2ebc5ce42a8a9e047e790aefbf9a94811569b2b6'/>
<id>2ebc5ce42a8a9e047e790aefbf9a94811569b2b6</id>
<content type='text'>
* group the (stateful) runtime globals into various topical structs
* consolidate the topical structs under a single top-level _PyRuntimeState struct
* add a check-c-globals.py script that helps identify runtime globals

Other globals are excluded (see globals.txt and check-c-globals.py).</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* group the (stateful) runtime globals into various topical structs
* consolidate the topical structs under a single top-level _PyRuntimeState struct
* add a check-c-globals.py script that helps identify runtime globals

Other globals are excluded (see globals.txt and check-c-globals.py).</pre>
</div>
</content>
</entry>
</feed>
