<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/cpython-git.git/Python/pathconfig.c, branch revert-10341-patch-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>bpo-36301: Cleanup preconfig.c and coreconfig.c (GH-12563)</title>
<updated>2019-03-26T15:58:50+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@redhat.com</email>
</author>
<published>2019-03-26T15:58:50+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=f8ba6f5afc317d1be3025db1be410ac66a7e5a27'/>
<id>f8ba6f5afc317d1be3025db1be410ac66a7e5a27</id>
<content type='text'>
* _PyCoreConfig_Write() now updates _PyRuntime.preconfig
* Remove _PyPreCmdline_Copy()
* _PyPreCmdline_Read() now accepts _PyPreConfig and _PyCoreConfig
  optional configurations.
* Rename _PyPreConfig_ReadFromArgv() to _PyPreConfig_Read(). Simplify
  the code.
* Calling _PyCoreConfig_Read() no longer adds the warning options
  twice: don't add a warning option if it's already in the list.
* Rename _PyCoreConfig_ReadFromArgv() to _PyCoreConfig_Read().
* Rename config_from_cmdline() to _PyCoreConfig_ReadFromArgv().
* Add more assertions on _PyCoreConfig in _PyCoreConfig_Read().
* Move some functions.
* Make some config functions private.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* _PyCoreConfig_Write() now updates _PyRuntime.preconfig
* Remove _PyPreCmdline_Copy()
* _PyPreCmdline_Read() now accepts _PyPreConfig and _PyCoreConfig
  optional configurations.
* Rename _PyPreConfig_ReadFromArgv() to _PyPreConfig_Read(). Simplify
  the code.
* Calling _PyCoreConfig_Read() no longer adds the warning options
  twice: don't add a warning option if it's already in the list.
* Rename _PyCoreConfig_ReadFromArgv() to _PyCoreConfig_Read().
* Rename config_from_cmdline() to _PyCoreConfig_ReadFromArgv().
* Add more assertions on _PyCoreConfig in _PyCoreConfig_Read().
* Move some functions.
* Make some config functions private.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-36301: Remove _PyCoreConfig.preconfig (GH-12546)</title>
<updated>2019-03-26T01:31:11+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@redhat.com</email>
</author>
<published>2019-03-26T01:31:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=20004959d23d07ac784eef51ecb161012180faa8'/>
<id>20004959d23d07ac784eef51ecb161012180faa8</id>
<content type='text'>
* Replace _PyCoreConfig.preconfig with 3 new fields in _PyCoreConfig:
  isolated, use_environment, dev_mode.
* Add _PyPreCmdline.dev_mode.
* Add _Py_PreInitializeFromPreConfigInPlace().</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Replace _PyCoreConfig.preconfig with 3 new fields in _PyCoreConfig:
  isolated, use_environment, dev_mode.
* Add _PyPreCmdline.dev_mode.
* Add _Py_PreInitializeFromPreConfigInPlace().</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-36301: Cleanup preconfig code (GH-12535)</title>
<updated>2019-03-25T16:54:58+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@redhat.com</email>
</author>
<published>2019-03-25T16:54:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=f72346c47537657a287a862305f65eb5d7594fbf'/>
<id>f72346c47537657a287a862305f65eb5d7594fbf</id>
<content type='text'>
Prepare code to move some _PyPreConfig parameters into _PyPreCmdline.
Changes:

* _PyCoreConfig_ReadFromArgv(): remove preconfig parameter,
  use _PyRuntime.preconfig.
* Add _PyPreCmdline_GetPreConfig() (called by _PyPreConfig_Read()).
* Rename _PyPreCmdline_Init() to _PyPreCmdline_SetArgv()
* Factorize _Py_PreInitializeFromPreConfig() code: add
  pyinit_preinit().
* _PyPreConfig_Read() now sets coerce_c_locale to 2 if it must be
  coerced.
* Remove _PyCoreConfig_ReadPreConfig().
* _PyCoreConfig_Write() now copies updated preconfig into _PyRuntime.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Prepare code to move some _PyPreConfig parameters into _PyPreCmdline.
Changes:

* _PyCoreConfig_ReadFromArgv(): remove preconfig parameter,
  use _PyRuntime.preconfig.
* Add _PyPreCmdline_GetPreConfig() (called by _PyPreConfig_Read()).
* Rename _PyPreCmdline_Init() to _PyPreCmdline_SetArgv()
* Factorize _Py_PreInitializeFromPreConfig() code: add
  pyinit_preinit().
* _PyPreConfig_Read() now sets coerce_c_locale to 2 if it must be
  coerced.
* Remove _PyCoreConfig_ReadPreConfig().
* _PyCoreConfig_Write() now copies updated preconfig into _PyRuntime.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-36236: Fix _PyPathConfig_ComputeSysPath0() for empty argv (GH-12441)</title>
<updated>2019-03-19T17:22:55+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@redhat.com</email>
</author>
<published>2019-03-19T17:22:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=fc96e5474a7bda1c5dec66420e4467fc9f7ca968'/>
<id>fc96e5474a7bda1c5dec66420e4467fc9f7ca968</id>
<content type='text'>
* _PyPathConfig_ComputeSysPath0() now returns 0 if argv is empty.
* Cleanup also _PyPathConfig_ComputeSysPath0() code: move variables
  definitions closer to where they are used.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* _PyPathConfig_ComputeSysPath0() now returns 0 if argv is empty.
* Cleanup also _PyPathConfig_ComputeSysPath0() code: move variables
  definitions closer to where they are used.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-36236: Handle removed cwd at Python init (GH-12424)</title>
<updated>2019-03-19T15:09:27+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@redhat.com</email>
</author>
<published>2019-03-19T15:09:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=dcf617152e1d4c4a5e7965733928858a9c0936ca'/>
<id>dcf617152e1d4c4a5e7965733928858a9c0936ca</id>
<content type='text'>
At Python initialization, the current directory is no longer
prepended to sys.path if it has been removed.

Rename _PyPathConfig_ComputeArgv0() to
_PyPathConfig_ComputeSysPath0() to avoid confusion between argv[0]
and sys.path[0].</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
At Python initialization, the current directory is no longer
prepended to sys.path if it has been removed.

Rename _PyPathConfig_ComputeArgv0() to
_PyPathConfig_ComputeSysPath0() to avoid confusion between argv[0]
and sys.path[0].</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-36352: Avoid hardcoded MAXPATHLEN size in getpath.c (GH-12423)</title>
<updated>2019-03-19T01:58:14+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@redhat.com</email>
</author>
<published>2019-03-19T01:58:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=faddaedd05ca81a9fed3f315e7bc8dcf455824a2'/>
<id>faddaedd05ca81a9fed3f315e7bc8dcf455824a2</id>
<content type='text'>
* Use Py_ARRAY_LENGTH() rather than hardcoded MAXPATHLEN in getpath.c.
* Pass string length to functions modifying strings.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Use Py_ARRAY_LENGTH() rather than hardcoded MAXPATHLEN in getpath.c.
* Pass string length to functions modifying strings.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-36301: Error if decoding pybuilddir.txt fails (GH-12422)</title>
<updated>2019-03-19T00:46:25+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@redhat.com</email>
</author>
<published>2019-03-19T00:46:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=5f9cf23502febe0eb3bc02e45c7d2bfc79424757'/>
<id>5f9cf23502febe0eb3bc02e45c7d2bfc79424757</id>
<content type='text'>
Python initialization now fails if decoding pybuilddir.txt
configuration file fails at startup.

_PyPathConfig_Calculate() now reports memory allocation failure and
decoding error on decoding pybuilddir.txt content from
UTF-8/surrogateescape.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Python initialization now fails if decoding pybuilddir.txt
configuration file fails at startup.

_PyPathConfig_Calculate() now reports memory allocation failure and
decoding error on decoding pybuilddir.txt content from
UTF-8/surrogateescape.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-36301: Fix Py_Main() memory leaks (GH-12420)</title>
<updated>2019-03-18T21:24:28+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@redhat.com</email>
</author>
<published>2019-03-18T21:24:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=c183444f7e2640b054956474d71aae6e8d31a543'/>
<id>c183444f7e2640b054956474d71aae6e8d31a543</id>
<content type='text'>
bpo-36301, bpo-36333:

* Fix memory allocator used by _PyPathConfig_ClearGlobal():
  force the default allocator.
* _PyPreConfig_ReadFromArgv(): free init_ctype_locale memory.
* pymain_main(): call pymain_free() on init error

Co-Authored-By: Stéphane Wirtel &lt;stephane@wirtel.be&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
bpo-36301, bpo-36333:

* Fix memory allocator used by _PyPathConfig_ClearGlobal():
  force the default allocator.
* _PyPreConfig_ReadFromArgv(): free init_ctype_locale memory.
* pymain_main(): call pymain_free() on init error

Co-Authored-By: Stéphane Wirtel &lt;stephane@wirtel.be&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-36301: Add _PyWstrList structure (GH-12343)</title>
<updated>2019-03-15T14:08:05+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@redhat.com</email>
</author>
<published>2019-03-15T14:08:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=74f6568bbd3e70806ea3219e8bacb386ad802ccf'/>
<id>74f6568bbd3e70806ea3219e8bacb386ad802ccf</id>
<content type='text'>
Replace messy _Py_wstrlist_xxx() functions with a new clean
_PyWstrList structure and new _PyWstrList_xxx() functions.

Changes:

* Add _PyCoreConfig.use_module_search_paths to decide if
  _PyCoreConfig.module_search_paths should be computed or not, to
  support empty search path list.
* _PyWstrList_Clear() sets length to 0 and items to NULL, whereas
  _Py_wstrlist_clear() only freed memory.
* _PyWstrList_Append() returns an int, whereas _Py_wstrlist_append()
  returned _PyInitError.
* _PyWstrList uses Py_ssize_t for the length, instead of int.
* Replace (int, wchar_t**) with _PyWstrList in:

  * _PyPreConfig
  * _PyCoreConfig
  * _PyPreCmdline
  * _PyCmdline

* Replace "int orig_argv; wchar_t **orig_argv;"
  with "_PyWstrList orig_argv".
* _PyCmdline and _PyPreCmdline now also copy wchar_argv.
* Rename _PyArgv_Decode() to _PyArgv_AsWstrList().
* PySys_SetArgvEx() now pass the fixed (argc, argv) to
  _PyPathConfig_ComputeArgv0() (don't pass negative argc or NULL
  argv).
* _PyOS_GetOpt() uses Py_ssize_t</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replace messy _Py_wstrlist_xxx() functions with a new clean
_PyWstrList structure and new _PyWstrList_xxx() functions.

Changes:

* Add _PyCoreConfig.use_module_search_paths to decide if
  _PyCoreConfig.module_search_paths should be computed or not, to
  support empty search path list.
* _PyWstrList_Clear() sets length to 0 and items to NULL, whereas
  _Py_wstrlist_clear() only freed memory.
* _PyWstrList_Append() returns an int, whereas _Py_wstrlist_append()
  returned _PyInitError.
* _PyWstrList uses Py_ssize_t for the length, instead of int.
* Replace (int, wchar_t**) with _PyWstrList in:

  * _PyPreConfig
  * _PyCoreConfig
  * _PyPreCmdline
  * _PyCmdline

* Replace "int orig_argv; wchar_t **orig_argv;"
  with "_PyWstrList orig_argv".
* _PyCmdline and _PyPreCmdline now also copy wchar_argv.
* Rename _PyArgv_Decode() to _PyArgv_AsWstrList().
* PySys_SetArgvEx() now pass the fixed (argc, argv) to
  _PyPathConfig_ComputeArgv0() (don't pass negative argc or NULL
  argv).
* _PyOS_GetOpt() uses Py_ssize_t</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-36142: Add _PyPreConfig_ReadFromArgv() (GH-12173)</title>
<updated>2019-03-05T01:44:12+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@redhat.com</email>
</author>
<published>2019-03-05T01:44:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=6dcb54228e7520abd058897440c26e323f62afcd'/>
<id>6dcb54228e7520abd058897440c26e323f62afcd</id>
<content type='text'>
The new function is now responsible to parse -E and -I command line
arguments.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The new function is now responsible to parse -E and -I command line
arguments.</pre>
</div>
</content>
</entry>
</feed>
