<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/cpython-git.git/Python/import.c, branch v3.8.7</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>[3.8] bpo-40417: Fix deprecation warning in PyImport_ReloadModule (GH-19750) (GH-19934)</title>
<updated>2020-05-06T00:32:14+00:00</updated>
<author>
<name>Robert Rouhani</name>
<email>robert.rouhani@gmail.com</email>
</author>
<published>2020-05-06T00:32:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=a32587a60da5939a3932bb30432d2bdd3d6203d4'/>
<id>a32587a60da5939a3932bb30432d2bdd3d6203d4</id>
<content type='text'>
Automerge-Triggered-By: @brettcannon.
(cherry picked from commit f40bd466bf14029e2687e36e965875adf9d4be1a)

Co-authored-by: Robert Rouhani &lt;robert.rouhani@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Automerge-Triggered-By: @brettcannon.
(cherry picked from commit f40bd466bf14029e2687e36e965875adf9d4be1a)

Co-authored-by: Robert Rouhani &lt;robert.rouhani@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-40412: Nullify inittab_copy during finalization (GH-19746)</title>
<updated>2020-05-01T23:06:23+00:00</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2020-05-01T23:06:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=1205afb3e10194fe22fa76385abb7e522144eb29'/>
<id>1205afb3e10194fe22fa76385abb7e522144eb29</id>
<content type='text'>
Otherwise we leave a dangling pointer to free'd memory. If we
then initialize a new interpreter in the same process and call
PyImport_ExtendInittab, we will (likely) crash when calling
PyMem_RawRealloc(inittab_copy, ...) since the pointer address
is bogus.

Automerge-Triggered-By: @brettcannon
(cherry picked from commit 64224a4727321a8dd33e6f769edda401193ebef0)

Co-authored-by: Gregory Szorc &lt;gregory.szorc@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Otherwise we leave a dangling pointer to free'd memory. If we
then initialize a new interpreter in the same process and call
PyImport_ExtendInittab, we will (likely) crash when calling
PyMem_RawRealloc(inittab_copy, ...) since the pointer address
is bogus.

Automerge-Triggered-By: @brettcannon
(cherry picked from commit 64224a4727321a8dd33e6f769edda401193ebef0)

Co-authored-by: Gregory Szorc &lt;gregory.szorc@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[3.8] bpo-37409: fix relative import with no parent (GH-14956) (GH-15913)</title>
<updated>2019-09-11T11:38:22+00:00</updated>
<author>
<name>Brett Cannon</name>
<email>54418+brettcannon@users.noreply.github.com</email>
</author>
<published>2019-09-11T11:38:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=0a6693a469cfb1dd5c8048d8cb4231a7b5883251'/>
<id>0a6693a469cfb1dd5c8048d8cb4231a7b5883251</id>
<content type='text'>
Relative imports use resolve_name to get the absolute target name,
which first seeks the current module's absolute package name from the globals:
If __package__ (and __spec__.parent) are missing then
import uses __name__, truncating the last segment if
the module is a submodule rather than a package __init__.py
(which it guesses from whether __path__ is defined).

The __name__ attempt should fail if there is no parent package (top level modules),
if __name__ is '__main__' (-m entry points), or both (scripts).
That is, if both __name__ has no subcomponents and the module does not seem
to be a package __init__ module then import should fail..
(cherry picked from commit 92420b3e679959a7d0ce875875601a4cee45231e)

Co-authored-by: Ben Lewis &lt;benjimin@users.noreply.github.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Relative imports use resolve_name to get the absolute target name,
which first seeks the current module's absolute package name from the globals:
If __package__ (and __spec__.parent) are missing then
import uses __name__, truncating the last segment if
the module is a submodule rather than a package __init__.py
(which it guesses from whether __path__ is defined).

The __name__ attempt should fail if there is no parent package (top level modules),
if __name__ is '__main__' (-m entry points), or both (scripts).
That is, if both __name__ has no subcomponents and the module does not seem
to be a package __init__ module then import should fail..
(cherry picked from commit 92420b3e679959a7d0ce875875601a4cee45231e)

Co-authored-by: Ben Lewis &lt;benjimin@users.noreply.github.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "bpo-36818: Add PyInterpreterState.runtime field. (gh-13129)" (GH-13795)</title>
<updated>2019-06-04T01:15:09+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@redhat.com</email>
</author>
<published>2019-06-04T01:15:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=0fd2c300c2a85b3b227a907b2a39ef79fa86d850'/>
<id>0fd2c300c2a85b3b227a907b2a39ef79fa86d850</id>
<content type='text'>
This reverts commit 396e0a8d9dc65453cb9d53500d0a620602656cfe.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 396e0a8d9dc65453cb9d53500d0a620602656cfe.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-36818: Add PyInterpreterState.runtime field. (gh-13129)</title>
<updated>2019-06-01T03:16:47+00:00</updated>
<author>
<name>Eric Snow</name>
<email>ericsnowcurrently@gmail.com</email>
</author>
<published>2019-06-01T03:16:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=396e0a8d9dc65453cb9d53500d0a620602656cfe'/>
<id>396e0a8d9dc65453cb9d53500d0a620602656cfe</id>
<content type='text'>
https://bugs.python.org/issue36818</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://bugs.python.org/issue36818</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-20602: Do not clear sys.flags and sys.float_info during shutdown (GH-8096)</title>
<updated>2019-05-30T11:08:24+00:00</updated>
<author>
<name>Zackery Spytz</name>
<email>zspytz@gmail.com</email>
</author>
<published>2019-05-30T11:08:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=249b7d59d8038f9017fc95dc28a3ce3494aaf832'/>
<id>249b7d59d8038f9017fc95dc28a3ce3494aaf832</id>
<content type='text'>
There is no need to clear these immutable objects during shutdown.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There is no need to clear these immutable objects during shutdown.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-36763: Implement the PEP 587 (GH-13592)</title>
<updated>2019-05-27T14:39:22+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@redhat.com</email>
</author>
<published>2019-05-27T14:39:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=331a6a56e9a9c72f3e4605987fabdaec72677702'/>
<id>331a6a56e9a9c72f3e4605987fabdaec72677702</id>
<content type='text'>
* Add a whole new documentation page:
  "Python Initialization Configuration"
* PyWideStringList_Append() return type is now PyStatus,
  instead of int
* PyInterpreterState_New() now calls PyConfig_Clear() if
  PyConfig_InitPythonConfig() fails.
* Rename files:

  * Python/coreconfig.c =&gt; Python/initconfig.c
  * Include/cpython/coreconfig.h =&gt; Include/cpython/initconfig.h
  * Include/internal/: pycore_coreconfig.h =&gt; pycore_initconfig.h

* Rename structures

  * _PyCoreConfig =&gt; PyConfig
  * _PyPreConfig =&gt; PyPreConfig
  * _PyInitError =&gt; PyStatus
  * _PyWstrList =&gt; PyWideStringList

* Rename PyConfig fields:

  * use_module_search_paths =&gt; module_search_paths_set
  * module_search_path_env =&gt; pythonpath_env

* Rename PyStatus field: _func =&gt; func
* PyInterpreterState: rename core_config field to config
* Rename macros and functions:

  * _PyCoreConfig_SetArgv() =&gt; PyConfig_SetBytesArgv()
  * _PyCoreConfig_SetWideArgv() =&gt; PyConfig_SetArgv()
  * _PyCoreConfig_DecodeLocale() =&gt; PyConfig_SetBytesString()
  * _PyInitError_Failed() =&gt; PyStatus_Exception()
  * _Py_INIT_ERROR_TYPE_xxx enums =&gt; _PyStatus_TYPE_xxx
  * _Py_UnixMain() =&gt; Py_BytesMain()
  * _Py_ExitInitError() =&gt; Py_ExitStatusException()
  * _Py_PreInitializeFromArgs() =&gt; Py_PreInitializeFromBytesArgs()
  * _Py_PreInitializeFromWideArgs() =&gt; Py_PreInitializeFromArgs()
  * _Py_PreInitialize() =&gt; Py_PreInitialize()
  * _Py_RunMain() =&gt; Py_RunMain()
  * _Py_InitializeFromConfig() =&gt; Py_InitializeFromConfig()
  * _Py_INIT_XXX() =&gt; _PyStatus_XXX()
  * _Py_INIT_FAILED() =&gt; _PyStatus_EXCEPTION()

* Rename 'err' PyStatus variables to 'status'
* Convert RUN_CODE() macro to config_run_code() static inline function
* Remove functions:

  * _Py_InitializeFromArgs()
  * _Py_InitializeFromWideArgs()
  * _PyInterpreterState_GetCoreConfig()</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Add a whole new documentation page:
  "Python Initialization Configuration"
* PyWideStringList_Append() return type is now PyStatus,
  instead of int
* PyInterpreterState_New() now calls PyConfig_Clear() if
  PyConfig_InitPythonConfig() fails.
* Rename files:

  * Python/coreconfig.c =&gt; Python/initconfig.c
  * Include/cpython/coreconfig.h =&gt; Include/cpython/initconfig.h
  * Include/internal/: pycore_coreconfig.h =&gt; pycore_initconfig.h

* Rename structures

  * _PyCoreConfig =&gt; PyConfig
  * _PyPreConfig =&gt; PyPreConfig
  * _PyInitError =&gt; PyStatus
  * _PyWstrList =&gt; PyWideStringList

* Rename PyConfig fields:

  * use_module_search_paths =&gt; module_search_paths_set
  * module_search_path_env =&gt; pythonpath_env

* Rename PyStatus field: _func =&gt; func
* PyInterpreterState: rename core_config field to config
* Rename macros and functions:

  * _PyCoreConfig_SetArgv() =&gt; PyConfig_SetBytesArgv()
  * _PyCoreConfig_SetWideArgv() =&gt; PyConfig_SetArgv()
  * _PyCoreConfig_DecodeLocale() =&gt; PyConfig_SetBytesString()
  * _PyInitError_Failed() =&gt; PyStatus_Exception()
  * _Py_INIT_ERROR_TYPE_xxx enums =&gt; _PyStatus_TYPE_xxx
  * _Py_UnixMain() =&gt; Py_BytesMain()
  * _Py_ExitInitError() =&gt; Py_ExitStatusException()
  * _Py_PreInitializeFromArgs() =&gt; Py_PreInitializeFromBytesArgs()
  * _Py_PreInitializeFromWideArgs() =&gt; Py_PreInitializeFromArgs()
  * _Py_PreInitialize() =&gt; Py_PreInitialize()
  * _Py_RunMain() =&gt; Py_RunMain()
  * _Py_InitializeFromConfig() =&gt; Py_InitializeFromConfig()
  * _Py_INIT_XXX() =&gt; _PyStatus_XXX()
  * _Py_INIT_FAILED() =&gt; _PyStatus_EXCEPTION()

* Rename 'err' PyStatus variables to 'status'
* Convert RUN_CODE() macro to config_run_code() static inline function
* Remove functions:

  * _Py_InitializeFromArgs()
  * _Py_InitializeFromWideArgs()
  * _PyInterpreterState_GetCoreConfig()</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-36842: Implement PEP 578 (GH-12613)</title>
<updated>2019-05-23T15:45:22+00:00</updated>
<author>
<name>Steve Dower</name>
<email>steve.dower@microsoft.com</email>
</author>
<published>2019-05-23T15:45:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=b82e17e626f7b1cd98aada0b1ebb65cb9f8fb184'/>
<id>b82e17e626f7b1cd98aada0b1ebb65cb9f8fb184</id>
<content type='text'>
Adds sys.audit, sys.addaudithook, io.open_code, and associated C APIs.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Adds sys.audit, sys.addaudithook, io.open_code, and associated C APIs.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-36900: import.c uses PyInterpreterState.core_config (GH-13278)</title>
<updated>2019-05-13T15:12:45+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@redhat.com</email>
</author>
<published>2019-05-13T15:12:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=410b85a7f701be280eb15b0ca4fe116e86f1d008'/>
<id>410b85a7f701be280eb15b0ca4fe116e86f1d008</id>
<content type='text'>
Move _PyImportZip_Init() to the internal C API and add an 'interp'
parameter.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Move _PyImportZip_Init() to the internal C API and add an 'interp'
parameter.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-24048: Save the live exception during import.c's remove_module() (GH-13005)</title>
<updated>2019-05-08T16:31:23+00:00</updated>
<author>
<name>Zackery Spytz</name>
<email>zspytz@gmail.com</email>
</author>
<published>2019-05-08T16:31:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=94a64e9cd411a87514b68082c1c437eb3b49dfb9'/>
<id>94a64e9cd411a87514b68082c1c437eb3b49dfb9</id>
<content type='text'>
Save the live exception during the course of remove_module().</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Save the live exception during the course of remove_module().</pre>
</div>
</content>
</entry>
</feed>
