<feed xmlns='http://www.w3.org/2005/Atom'>
<title>python.git/Programs/_testembed.c, branch master</title>
<subtitle>Python interpreter</subtitle>
<id>http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Programs/_testembed.c?h=master</id>
<link rel='self' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Programs/_testembed.c?h=master'/>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/'/>
<updated>2022-10-30T23:15:12Z</updated>
<entry>
<title>[3.11] gh-96853: Restore test coverage for Py_Initialize(Ex) (GH-98874)</title>
<updated>2022-10-30T23:15:12Z</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2022-10-30T23:15:12Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=57dd11038f22379770d9f16e527f787fdea978fd'/>
<id>urn:sha1:57dd11038f22379770d9f16e527f787fdea978fd</id>
<content type='text'>
* As most of `test_embed` now uses `Py_InitializeFromConfig`, add
  a specific test case to cover `Py_Initialize` (and `Py_InitializeEx`)
* Rename `_testembed` init helper to clarify the API used
* Add a `PyConfig_Clear` call in `Py_InitializeEx` to make
  the code more obviously correct (it already didn't leak as
  none of the dynamically allocated config fields were being
  populated, but it's clearer if the wrappers follow the
  documented API usage guidelines)
(cherry picked from commit 05e48865be69e1e5824f6915b588ff054717bb42)

Co-authored-by: Nick Coghlan &lt;ncoghlan@gmail.com&gt;</content>
</entry>
<entry>
<title>GH-96975: Skip incomplete frames in PyEval_GetFrame (GH-97018)</title>
<updated>2022-09-22T17:17:53Z</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2022-09-22T17:17:53Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=6a646dd1ffa9ccc9130e09fdd2f5b75652c4f121'/>
<id>urn:sha1:6a646dd1ffa9ccc9130e09fdd2f5b75652c4f121</id>
<content type='text'>
(cherry picked from commit 8fd2c3b75b90c4ee391894aa5094615bbdb6242f)

Co-authored-by: Brandt Bucher &lt;brandtbucher@microsoft.com&gt;</content>
</entry>
<entry>
<title>gh-96678: Avoid undefined behaviour in test (GH-96672) (#96795)</title>
<updated>2022-09-13T15:04:00Z</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2022-09-13T15:04:00Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=cc8b006ae3140162de2b616786ca4452f39c1767'/>
<id>urn:sha1:cc8b006ae3140162de2b616786ca4452f39c1767</id>
<content type='text'>
(cherry picked from commit 6ba686d97fd6d2a2169696c6629f7de9482f52db)

Co-authored-by: Matthias Görgens &lt;matthias.goergens@gmail.com&gt;

Co-authored-by: Matthias Görgens &lt;matthias.goergens@gmail.com&gt;</content>
</entry>
<entry>
<title>bpo-45445: Revert "bpo-45445: Fail if an invalid X-option is provided in the command line (GH-28823)" (GH-94745)</title>
<updated>2022-07-31T15:58:02Z</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2022-07-31T15:58:02Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=147a9a8be79fb5666e264175e3047d6d67b50254'/>
<id>urn:sha1:147a9a8be79fb5666e264175e3047d6d67b50254</id>
<content type='text'>
(cherry picked from commit aa37ffda29ac48fb2df5a7029ba2e626ecc45850)

Co-authored-by: Pablo Galindo Salgado &lt;Pablogsal@gmail.com&gt;</content>
</entry>
<entry>
<title>gh-90815: Fix test_embed for Windows PGO build with mimalloc (GH-94790)</title>
<updated>2022-07-13T16:40:46Z</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2022-07-13T16:40:46Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=11cdde85c3153f4cef382500d74b4155a0e784a0'/>
<id>urn:sha1:11cdde85c3153f4cef382500d74b4155a0e784a0</id>
<content type='text'>
Fixes the failure of PGO building with `mimalloc` on Windows, ensuring that `test_bpo20891` does not break profiling data (`python31*.pgc`).
(cherry picked from commit 4a6bb30eb600e3b18f4a84c1be922c07758c613f)

Co-authored-by: neonene &lt;53406459+neonene@users.noreply.github.com&gt;</content>
</entry>
<entry>
<title>gh-91985: Ensure in-tree builds override platstdlib_dir in every path calculation (GH-93641)</title>
<updated>2022-06-20T18:37:27Z</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2022-06-20T18:37:27Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=b8fe3bd1d4be5b7d8e9e20b3c36277117e8f6102'/>
<id>urn:sha1:b8fe3bd1d4be5b7d8e9e20b3c36277117e8f6102</id>
<content type='text'>
(cherry picked from commit 38af903506e9b18c6350c1dadcb489f057713f36)

Co-authored-by: neonene &lt;53406459+neonene@users.noreply.github.com&gt;</content>
</entry>
<entry>
<title>gh-57684: Add -P cmdline option and PYTHONSAFEPATH env var (#31542)</title>
<updated>2022-05-05T23:34:11Z</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2022-05-05T23:34:11Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=ada8b6d1b1b02ae7c38f161c2a0ad866559fe18b'/>
<id>urn:sha1:ada8b6d1b1b02ae7c38f161c2a0ad866559fe18b</id>
<content type='text'>
Add the -P command line option and the PYTHONSAFEPATH environment
variable to not prepend a potentially unsafe path to sys.path.

* Add sys.flags.safe_path flag.
* Add PyConfig.safe_path member.
* Programs/_bootstrap_python.c uses config.safe_path=0.
* Update subprocess._optim_args_from_interpreter_flags() to handle
  the -P command line option.
* Modules/getpath.py sets safe_path to 1 if a "._pth" file is
  present.</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://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=81c72044a181dbbfbf689d7a977d0d99090f26a8'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>bpo-46417: _testembed.c avoids Py_SetProgramName() (GH-30732)</title>
<updated>2022-01-21T01:12:18Z</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2022-01-21T01:12:18Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=6415e2ee4955b1a995c1e75544e2506b03780c3d'/>
<id>urn:sha1:6415e2ee4955b1a995c1e75544e2506b03780c3d</id>
<content type='text'>
* _testembed_Py_Initialize() now uses the PyConfig API, rather than
  deprecated Py_SetProgramName().
* Reduce INIT_LOOPS from 16 to 4: test_embed now takes 8.7 seconds
  rather than 14.7 seconds.</content>
</entry>
<entry>
<title>bpo-46417: Finalize structseq types at exit (GH-30645)</title>
<updated>2022-01-21T00:42:25Z</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2022-01-21T00:42:25Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=e9e3eab0b868c7d0b48e472705024240d5c39d5c'/>
<id>urn:sha1:e9e3eab0b868c7d0b48e472705024240d5c39d5c</id>
<content type='text'>
Add _PyStructSequence_FiniType() and _PyStaticType_Dealloc()
functions to finalize a structseq static type in Py_Finalize().
Currrently, these functions do nothing if Python is built in release
mode.

Clear static types:

* AsyncGenHooksType: sys.set_asyncgen_hooks()
* FlagsType: sys.flags
* FloatInfoType: sys.float_info
* Hash_InfoType: sys.hash_info
* Int_InfoType: sys.int_info
* ThreadInfoType: sys.thread_info
* UnraisableHookArgsType: sys.unraisablehook
* VersionInfoType: sys.version
* WindowsVersionType: sys.getwindowsversion()</content>
</entry>
</feed>
