<feed xmlns='http://www.w3.org/2005/Atom'>
<title>cpython.git/Programs/python.c, branch v3.10.19</title>
<subtitle>https://github.com/python/cpython.git</subtitle>
<link rel='alternate' type='text/html' href='http://service.techsat.com/oss-git/cpython.git/'/>
<entry>
<title>bpo-40268: Remove unused imports in pylifecycle.c (GH-19533)</title>
<updated>2020-04-15T02:01:58Z</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2020-04-15T02:01:58Z</published>
<link rel='alternate' type='text/html' href='http://service.techsat.com/oss-git/cpython.git/commit/?id=4f98f465f14e7258c5b18a62c5aa114dbe1174d8'/>
<id>4f98f465f14e7258c5b18a62c5aa114dbe1174d8</id>
<content type='text'>
Remove unused imports in files:

* initconfig.c
* main.c
* preconfig.h
* pylifecycle.c
* python.c
* pythonrun.c</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove unused imports in files:

* initconfig.c
* main.c
* preconfig.h
* pylifecycle.c
* python.c
* pythonrun.c</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-36763: Implement the PEP 587 (GH-13592)</title>
<updated>2019-05-27T14:39:22Z</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@redhat.com</email>
</author>
<published>2019-05-27T14:39:22Z</published>
<link rel='alternate' type='text/html' href='http://service.techsat.com/oss-git/cpython.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-35081: Rename internal headers (GH-10275)</title>
<updated>2018-11-12T15:53:38Z</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@redhat.com</email>
</author>
<published>2018-11-12T15:53:38Z</published>
<link rel='alternate' type='text/html' href='http://service.techsat.com/oss-git/cpython.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: And pycore_lifecycle.h and pycore_pathconfig.h (GH-10273)</title>
<updated>2018-11-01T02:15:58Z</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@redhat.com</email>
</author>
<published>2018-11-01T02:15:58Z</published>
<link rel='alternate' type='text/html' href='http://service.techsat.com/oss-git/cpython.git/commit/?id=a1c249c40517917d2e0971d55aea8d14a44b2cc8'/>
<id>a1c249c40517917d2e0971d55aea8d14a44b2cc8</id>
<content type='text'>
* And pycore_lifecycle.h and pycore_pathconfig.h headers to
  Include/internal/
* Move Py_BUILD_CORE specific code from coreconfig.h and
  pylifecycle.h to pycore_pathconfig.h and pycore_lifecycle.h
* Move _Py_wstrlist_XXX() definitions and _PyPathConfig code
  from pycore_state.h to pycore_pathconfig.h
* Move "Init" and "Fini" function definitions from pylifecycle.c to
  pycore_lifecycle.h.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* And pycore_lifecycle.h and pycore_pathconfig.h headers to
  Include/internal/
* Move Py_BUILD_CORE specific code from coreconfig.h and
  pylifecycle.h to pycore_pathconfig.h and pycore_lifecycle.h
* Move _Py_wstrlist_XXX() definitions and _PyPathConfig code
  from pycore_state.h to pycore_pathconfig.h
* Move "Init" and "Fini" function definitions from pylifecycle.c to
  pycore_lifecycle.h.</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "bpo-34589: Add -X coerce_c_locale command line option (GH-9378)" (GH-9430)</title>
<updated>2018-09-19T21:56:36Z</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@redhat.com</email>
</author>
<published>2018-09-19T21:56:36Z</published>
<link rel='alternate' type='text/html' href='http://service.techsat.com/oss-git/cpython.git/commit/?id=06e7608207daab9fb82d13ccf2d3664535442f11'/>
<id>06e7608207daab9fb82d13ccf2d3664535442f11</id>
<content type='text'>
* Revert "bpo-34589: Add -X coerce_c_locale command line option (GH-9378)"

This reverts commit dbdee0073cf0b88fe541980ace1f650900f455cc.

* Revert "bpo-34589: C locale coercion off by default (GH-9073)"

This reverts commit 7a0791b6992d420dc52536257f2f093851ed7215.

* Revert "bpo-34589: Make _PyCoreConfig.coerce_c_locale private (GH-9371)"

This reverts commit 188ebfa475a6f6aa2d0ea14ca8e1fbe7865b6d27.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Revert "bpo-34589: Add -X coerce_c_locale command line option (GH-9378)"

This reverts commit dbdee0073cf0b88fe541980ace1f650900f455cc.

* Revert "bpo-34589: C locale coercion off by default (GH-9073)"

This reverts commit 7a0791b6992d420dc52536257f2f093851ed7215.

* Revert "bpo-34589: Make _PyCoreConfig.coerce_c_locale private (GH-9371)"

This reverts commit 188ebfa475a6f6aa2d0ea14ca8e1fbe7865b6d27.
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-34589: C locale coercion off by default (GH-9073)</title>
<updated>2018-09-17T23:22:29Z</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@redhat.com</email>
</author>
<published>2018-09-17T23:22:29Z</published>
<link rel='alternate' type='text/html' href='http://service.techsat.com/oss-git/cpython.git/commit/?id=7a0791b6992d420dc52536257f2f093851ed7215'/>
<id>7a0791b6992d420dc52536257f2f093851ed7215</id>
<content type='text'>
Py_Initialize() and Py_Main() cannot enable the C locale coercion
(PEP 538) anymore: it is always disabled. It can now only be enabled
by the Python program ("python3).

test_embed: get_filesystem_encoding() doesn't have to set PYTHONUTF8
nor PYTHONCOERCECLOCALE, these variables are already set in the
parent.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Py_Initialize() and Py_Main() cannot enable the C locale coercion
(PEP 538) anymore: it is always disabled. It can now only be enabled
by the Python program ("python3).

test_embed: get_filesystem_encoding() doesn't have to set PYTHONUTF8
nor PYTHONCOERCECLOCALE, these variables are already set in the
parent.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-32030: Fix compilation on FreeBSD, #include &lt;fenv.h&gt; (#4919)</title>
<updated>2017-12-18T22:42:55Z</updated>
<author>
<name>Victor Stinner</name>
<email>victor.stinner@gmail.com</email>
</author>
<published>2017-12-18T22:42:55Z</published>
<link rel='alternate' type='text/html' href='http://service.techsat.com/oss-git/cpython.git/commit/?id=6efcb6d3d5911aaf699f9df3bb3bc26e94f38e6d'/>
<id>6efcb6d3d5911aaf699f9df3bb3bc26e94f38e6d</id>
<content type='text'>
* main.c: add missing #include &lt;fenv.h&gt; on FreeBSD
* indent also other #ifdef in main.c
* cleanup Programs/python.c</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* main.c: add missing #include &lt;fenv.h&gt; on FreeBSD
* indent also other #ifdef in main.c
* cleanup Programs/python.c</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-29240, bpo-32030: Py_Main() re-reads config if encoding changes (#4899)</title>
<updated>2017-12-16T03:54:22Z</updated>
<author>
<name>Victor Stinner</name>
<email>victor.stinner@gmail.com</email>
</author>
<published>2017-12-16T03:54:22Z</published>
<link rel='alternate' type='text/html' href='http://service.techsat.com/oss-git/cpython.git/commit/?id=9454060e84a669dde63824d9e2fcaf295e34f687'/>
<id>9454060e84a669dde63824d9e2fcaf295e34f687</id>
<content type='text'>
bpo-29240, bpo-32030: If the encoding change (C locale coerced or
UTF-8 Mode changed), Py_Main() now reads again the configuration with
the new encoding.

Changes:

* Add _Py_UnixMain() called by main().
* Rename pymain_free_pymain() to pymain_clear_pymain(), it can now be
  called multipled times.
* Rename pymain_parse_cmdline_envvars() to pymain_read_conf().
* Py_Main() now clears orig_argc and orig_argv at exit.
* Remove argv_copy2, Py_Main() doesn't modify argv anymore. There is
  no need anymore to get two copies of the wchar_t** argv.
* _PyCoreConfig: add coerce_c_locale and coerce_c_locale_warn.
* Py_UTF8Mode is now initialized to -1.
* Locale coercion (PEP 538) now respects -I and -E options.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
bpo-29240, bpo-32030: If the encoding change (C locale coerced or
UTF-8 Mode changed), Py_Main() now reads again the configuration with
the new encoding.

Changes:

* Add _Py_UnixMain() called by main().
* Rename pymain_free_pymain() to pymain_clear_pymain(), it can now be
  called multipled times.
* Rename pymain_parse_cmdline_envvars() to pymain_read_conf().
* Py_Main() now clears orig_argc and orig_argv at exit.
* Remove argv_copy2, Py_Main() doesn't modify argv anymore. There is
  no need anymore to get two copies of the wchar_t** argv.
* _PyCoreConfig: add coerce_c_locale and coerce_c_locale_warn.
* Py_UTF8Mode is now initialized to -1.
* Locale coercion (PEP 538) now respects -I and -E options.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-29240: PEP 540: Add a new UTF-8 Mode (#855)</title>
<updated>2017-12-13T11:29:09Z</updated>
<author>
<name>Victor Stinner</name>
<email>victor.stinner@gmail.com</email>
</author>
<published>2017-12-13T11:29:09Z</published>
<link rel='alternate' type='text/html' href='http://service.techsat.com/oss-git/cpython.git/commit/?id=91106cd9ff2f321c0f60fbaa09fd46c80aa5c266'/>
<id>91106cd9ff2f321c0f60fbaa09fd46c80aa5c266</id>
<content type='text'>
* Add -X utf8 command line option, PYTHONUTF8 environment variable
  and a new sys.flags.utf8_mode flag.
* If the LC_CTYPE locale is "C" at startup: enable automatically the
  UTF-8 mode.
* Add _winapi.GetACP(). encodings._alias_mbcs() now calls
  _winapi.GetACP() to get the ANSI code page
* locale.getpreferredencoding() now returns 'UTF-8' in the UTF-8
  mode. As a side effect, open() now uses the UTF-8 encoding by
  default in this mode.
* Py_DecodeLocale() and Py_EncodeLocale() now use the UTF-8 encoding
  in the UTF-8 Mode.
* Update subprocess._args_from_interpreter_flags() to handle -X utf8
* Skip some tests relying on the current locale if the UTF-8 mode is
  enabled.
* Add test_utf8mode.py.
* _Py_DecodeUTF8_surrogateescape() gets a new optional parameter to
  return also the length (number of wide characters).
* pymain_get_global_config() and pymain_set_global_config() now
  always copy flag values, rather than only copying if the new value
  is greater than the old value.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Add -X utf8 command line option, PYTHONUTF8 environment variable
  and a new sys.flags.utf8_mode flag.
* If the LC_CTYPE locale is "C" at startup: enable automatically the
  UTF-8 mode.
* Add _winapi.GetACP(). encodings._alias_mbcs() now calls
  _winapi.GetACP() to get the ANSI code page
* locale.getpreferredencoding() now returns 'UTF-8' in the UTF-8
  mode. As a side effect, open() now uses the UTF-8 encoding by
  default in this mode.
* Py_DecodeLocale() and Py_EncodeLocale() now use the UTF-8 encoding
  in the UTF-8 Mode.
* Update subprocess._args_from_interpreter_flags() to handle -X utf8
* Skip some tests relying on the current locale if the UTF-8 mode is
  enabled.
* Add test_utf8mode.py.
* _Py_DecodeUTF8_surrogateescape() gets a new optional parameter to
  return also the length (number of wide characters).
* pymain_get_global_config() and pymain_set_global_config() now
  always copy flag values, rather than only copying if the new value
  is greater than the old value.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-32030: Rework memory allocators (#4625)</title>
<updated>2017-11-29T16:20:38Z</updated>
<author>
<name>Victor Stinner</name>
<email>victor.stinner@gmail.com</email>
</author>
<published>2017-11-29T16:20:38Z</published>
<link rel='alternate' type='text/html' href='http://service.techsat.com/oss-git/cpython.git/commit/?id=5d39e0429029324cae90bba2f19fb689b007c7d6'/>
<id>5d39e0429029324cae90bba2f19fb689b007c7d6</id>
<content type='text'>
* Fix _PyMem_SetupAllocators("debug"): always restore allocators to
  the defaults, rather than only caling _PyMem_SetupDebugHooks().
* Add _PyMem_SetDefaultAllocator() helper to set the "default"
  allocator.
* Add _PyMem_GetAllocatorsName(): get the name of the allocators
* main() now uses debug hooks on memory allocators if Py_DEBUG is
  defined, rather than calling directly malloc()
* Document default memory allocators in C API documentation
* _Py_InitializeCore() now fails with a fatal user error if
  PYTHONMALLOC value is an unknown memory allocator, instead of
  failing with a fatal internal error.
* Add new tests on the PYTHONMALLOC environment variable
* Add support.with_pymalloc()
* Add the _testcapi.WITH_PYMALLOC constant and expose it as
   support.with_pymalloc().
* sysconfig.get_config_var('WITH_PYMALLOC') doesn't work on Windows, so
   replace it with support.with_pymalloc().
* pythoninfo: add _testcapi collector for pymem</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Fix _PyMem_SetupAllocators("debug"): always restore allocators to
  the defaults, rather than only caling _PyMem_SetupDebugHooks().
* Add _PyMem_SetDefaultAllocator() helper to set the "default"
  allocator.
* Add _PyMem_GetAllocatorsName(): get the name of the allocators
* main() now uses debug hooks on memory allocators if Py_DEBUG is
  defined, rather than calling directly malloc()
* Document default memory allocators in C API documentation
* _Py_InitializeCore() now fails with a fatal user error if
  PYTHONMALLOC value is an unknown memory allocator, instead of
  failing with a fatal internal error.
* Add new tests on the PYTHONMALLOC environment variable
* Add support.with_pymalloc()
* Add the _testcapi.WITH_PYMALLOC constant and expose it as
   support.with_pymalloc().
* sysconfig.get_config_var('WITH_PYMALLOC') doesn't work on Windows, so
   replace it with support.with_pymalloc().
* pythoninfo: add _testcapi collector for pymem</pre>
</div>
</content>
</entry>
</feed>
