<feed xmlns='http://www.w3.org/2005/Atom'>
<title>python.git/Include/internal/pycore_initconfig.h, branch 3.10</title>
<subtitle>Python interpreter</subtitle>
<id>http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Include/internal/pycore_initconfig.h?h=3.10</id>
<link rel='self' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Include/internal/pycore_initconfig.h?h=3.10'/>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/'/>
<updated>2022-09-02T16:51:49Z</updated>
<entry>
<title>[3.10] gh-95778: CVE-2020-10735: Prevent DoS by very large int() (#96501)</title>
<updated>2022-09-02T16:51:49Z</updated>
<author>
<name>Gregory P. Smith</name>
<email>gps@google.com</email>
</author>
<published>2022-09-02T16:51:49Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=8f0fa4bd10aba723aff988720cd26b93be99bc12'/>
<id>urn:sha1:8f0fa4bd10aba723aff988720cd26b93be99bc12</id>
<content type='text'>
Integer to and from text conversions via CPython's bignum `int` type is not safe against denial of service attacks due to malicious input. Very large input strings with hundred thousands of digits can consume several CPU seconds.

This PR comes fresh from a pile of work done in our private PSRT security response team repo.

This backports https://github.com/python/cpython/pull/96499 aka 511ca9452033ef95bc7d7fc404b8161068226002

Signed-off-by: Christian Heimes [Red Hat] &lt;christian@python.org&gt;
Tons-of-polishing-up-by: Gregory P. Smith [Google] &lt;greg@krypto.org&gt;
Reviews via the private PSRT repo via many others (see the NEWS entry in the PR).

&lt;!-- gh-issue-number: gh-95778 --&gt;
* Issue: gh-95778
&lt;!-- /gh-issue-number --&gt;

I wrote up [a one pager for the release managers](https://docs.google.com/document/d/1KjuF_aXlzPUxTK4BMgezGJ2Pn7uevfX7g0_mvgHlL7Y/edit#).</content>
</entry>
<entry>
<title>bpo-43510: Implement PEP 597 opt-in EncodingWarning. (GH-19481)</title>
<updated>2021-03-29T03:28:14Z</updated>
<author>
<name>Inada Naoki</name>
<email>songofacandy@gmail.com</email>
</author>
<published>2021-03-29T03:28:14Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=4827483f47906fecee6b5d9097df2a69a293a85c'/>
<id>urn:sha1:4827483f47906fecee6b5d9097df2a69a293a85c</id>
<content type='text'>
See [PEP 597](https://www.python.org/dev/peps/pep-0597/).

* Add `-X warn_default_encoding` and `PYTHONWARNDEFAULTENCODING`.
* Add EncodingWarning
* Add io.text_encoding()
* open(), TextIOWrapper() emits EncodingWarning when encoding is omitted and warn_default_encoding is enabled.
* _pyio.TextIOWrapper() uses UTF-8 as fallback default encoding used when failed to import locale module. (used during building Python)
* bz2, configparser, gzip, lzma, pathlib, tempfile modules use io.text_encoding().
* What's new entry</content>
</entry>
<entry>
<title>bpo-42260: Fix _PyConfig_Read() if compute_path_config=0 (GH-23220)</title>
<updated>2020-11-10T20:10:22Z</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2020-11-10T20:10:22Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=ace3f9a0ce7b9fe8ae757fdd614f1e7a171f92b0'/>
<id>urn:sha1:ace3f9a0ce7b9fe8ae757fdd614f1e7a171f92b0</id>
<content type='text'>
Fix _PyConfig_Read() if compute_path_config=0: use values set by
Py_SetPath(), Py_SetPythonHome() and Py_SetProgramName(). Add
compute_path_config parameter to _PyConfig_InitPathConfig().

The following functions now return NULL if called before
Py_Initialize():

* Py_GetExecPrefix()
* Py_GetPath()
* Py_GetPrefix()
* Py_GetProgramFullPath()
* Py_GetProgramName()
* Py_GetPythonHome()

These functions no longer automatically computes the Python Path
Configuration. Moreover, Py_SetPath() no longer computes
program_full_path.</content>
</entry>
<entry>
<title>bpo-42260: Compute the path config in the main init (GH-23211)</title>
<updated>2020-11-10T12:21:52Z</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2020-11-10T12:21:52Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=9e1b828265e6bfb58f1e0299bd78d8ff6347a2ba'/>
<id>urn:sha1:9e1b828265e6bfb58f1e0299bd78d8ff6347a2ba</id>
<content type='text'>
The path configuration is now computed in the "main" initialization.
The core initialization no longer computes it.

* Add _PyConfig_Read() function to read the configuration without
  computing the path configuration.
* pyinit_core() no longer computes the path configuration: it is now
  computed by init_interp_main().
* The path configuration output members of PyConfig are now optional:

  * executable
  * base_executable
  * prefix
  * base_prefix
  * exec_prefix
  * base_exec_prefix

* _PySys_UpdateConfig() now skips NULL strings in PyConfig.
* _testembed: Rename test_set_config() to test_init_set_config() for
  consistency with other tests.</content>
</entry>
<entry>
<title>bpo-42260: Add _PyConfig_FromDict() (GH-23167)</title>
<updated>2020-11-05T17:12:33Z</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2020-11-05T17:12:33Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=f3cb81431574453aac3b6dcadb3120331e6a8f1c'/>
<id>urn:sha1:f3cb81431574453aac3b6dcadb3120331e6a8f1c</id>
<content type='text'>
* Rename config_as_dict() to _PyConfig_AsDict().
* Add 'module_search_paths_set' to _PyConfig_AsDict().
* Add _PyConfig_FromDict().
* Add get_config() and set_config() to _testinternalcapi.
* Add config_check_consistency().</content>
</entry>
<entry>
<title>bpo-42260: Add _PyInterpreterState_SetConfig() (GH-23158)</title>
<updated>2020-11-04T23:45:56Z</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2020-11-04T23:45:56Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=048a35659aa8074afe7d7d054e7cea1f8ee6d366'/>
<id>urn:sha1:048a35659aa8074afe7d7d054e7cea1f8ee6d366</id>
<content type='text'>
* Inline _PyInterpreterState_SetConfig(): replace it with
  _PyConfig_Copy().
* Add _PyErr_SetFromPyStatus()
* Add _PyInterpreterState_GetConfigCopy()
* Add a new _PyInterpreterState_SetConfig() function.
* Add an unit which gets, modifies, and sets the config.</content>
</entry>
<entry>
<title>bpo-40910: Export Py_GetArgcArgv() function (GH-20721)</title>
<updated>2020-06-08T16:12:59Z</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2020-06-08T16:12:59Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=e81f6e687d0f04a45f2389d0b43fafd6d8491624'/>
<id>urn:sha1:e81f6e687d0f04a45f2389d0b43fafd6d8491624</id>
<content type='text'>
Export explicitly the Py_GetArgcArgv() function to the C API and
document the function. Previously, it was exported implicitly which
no longer works since Python is built with -fvisibility=hidden.

* Add PyConfig._orig_argv member.
* Py_InitializeFromConfig() no longer calls _PyConfig_Write() twice.
* PyConfig_Read() no longer initializes Py_GetArgcArgv(): it is now
  _PyConfig_Write() responsibility.
* _PyConfig_Write() result type becomes PyStatus instead of void.
* Write an unit test on Py_GetArgcArgv().</content>
</entry>
<entry>
<title>bpo-38353: Fix compiler warning in pycore_initconfig.h (GH-16570)</title>
<updated>2019-10-03T22:43:10Z</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2019-10-03T22:43:10Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=c515b573af1189fc46ddcd3323c53ed073b84848'/>
<id>urn:sha1:c515b573af1189fc46ddcd3323c53ed073b84848</id>
<content type='text'>
Replace "_PyRuntimeState" with "struct pyruntimestate" to avoid
a warning on typedef re-definition.</content>
</entry>
<entry>
<title>bpo-38353: Cleanup includes in the internal C API (GH-16548)</title>
<updated>2019-10-02T21:51:20Z</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@redhat.com</email>
</author>
<published>2019-10-02T21:51:20Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=61691d833631fed42b86605b09e1535e3e8d40e5'/>
<id>urn:sha1:61691d833631fed42b86605b09e1535e3e8d40e5</id>
<content type='text'>
Use forward declaration of types to avoid includes in the internal C
API. Add also comment to justify other includes.</content>
</entry>
<entry>
<title>bpo-38304: PyConfig_InitPythonConfig() cannot fail anymore (GH-16509)</title>
<updated>2019-10-01T10:06:16Z</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@redhat.com</email>
</author>
<published>2019-10-01T10:06:16Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=8462a4936b3a551dc546a6adea04a70b0a07ca67'/>
<id>urn:sha1:8462a4936b3a551dc546a6adea04a70b0a07ca67</id>
<content type='text'>
PyConfig_InitPythonConfig() and PyConfig_InitIsolatedConfig() no
longer return PyStatus: they cannot fail anymore.</content>
</entry>
</feed>
