<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/cpython-git.git/Python/pathconfig.c, branch v3.7.13</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-36236: Handle removed cwd at Python init (GH-12450)</title>
<updated>2019-03-19T23:30:45+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@redhat.com</email>
</author>
<published>2019-03-19T23:30:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=f7959a9fe7e7e316899c60251e29390c4ed0307a'/>
<id>f7959a9fe7e7e316899c60251e29390c4ed0307a</id>
<content type='text'>
At Python initialization, the current directory is no longer
prepended to sys.path if it has been removed.</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.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-34725: Adds _Py_SetProgramFullPath so embedders may override sys.executable (GH-9861)</title>
<updated>2018-11-18T04:42:08+00:00</updated>
<author>
<name>Steve Dower</name>
<email>steve.dower@microsoft.com</email>
</author>
<published>2018-11-18T04:42:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=e851049e0e045b5e0f9d5c6b8a64d7f6b8ecc9c7'/>
<id>e851049e0e045b5e0f9d5c6b8a64d7f6b8ecc9c7</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-33053: -m now adds *starting* directory to sys.path (GH-6231) (#6236)</title>
<updated>2018-03-25T13:43:50+00:00</updated>
<author>
<name>Nick Coghlan</name>
<email>ncoghlan@gmail.com</email>
</author>
<published>2018-03-25T13:43:50+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=ee3784594b33c72c3fdca6a71892d22f14045ab6'/>
<id>ee3784594b33c72c3fdca6a71892d22f14045ab6</id>
<content type='text'>
Historically, -m added the empty string as sys.path
zero, meaning it resolved imports against the current
working directory, the same way -c and the interactive
prompt do.

This changes the sys.path initialisation to add the
*starting* working directory as sys.path[0] instead,
such that changes to the working directory while the
program is running will have no effect on imports
when using the -m switch.

(cherry picked from commit d5d9e02dd3c6df06a8dd9ce75ee9b52976420a8b)</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Historically, -m added the empty string as sys.path
zero, meaning it resolved imports against the current
working directory, the same way -c and the interactive
prompt do.

This changes the sys.path initialisation to add the
*starting* working directory as sys.path[0] instead,
such that changes to the working directory while the
program is running will have no effect on imports
when using the -m switch.

(cherry picked from commit d5d9e02dd3c6df06a8dd9ce75ee9b52976420a8b)</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-9566: Fix size_t=&gt;int downcast warnings (#5230)</title>
<updated>2018-01-18T10:15:25+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>victor.stinner@gmail.com</email>
</author>
<published>2018-01-18T10:15:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=05d68a8bd84cb141be9f9335f5b3540f15a989c4'/>
<id>05d68a8bd84cb141be9f9335f5b3540f15a989c4</id>
<content type='text'>
* Use wider types (int =&gt; Py_ssize_t) to avoid integer overflows.
* Fix gc.get_freeze_count(): use Py_ssize_t type rather than int, since gc_list_size() returns a Py_ssize_t.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Use wider types (int =&gt; Py_ssize_t) to avoid integer overflows.
* Fix gc.get_freeze_count(): use Py_ssize_t type rather than int, since gc_list_size() returns a Py_ssize_t.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-29240: Fix locale encodings in UTF-8 Mode (#5170)</title>
<updated>2018-01-15T09:45:49+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>victor.stinner@gmail.com</email>
</author>
<published>2018-01-15T09:45:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=7ed7aead9503102d2ed316175f198104e0cd674c'/>
<id>7ed7aead9503102d2ed316175f198104e0cd674c</id>
<content type='text'>
Modify locale.localeconv(), time.tzname, os.strerror() and other
functions to ignore the UTF-8 Mode: always use the current locale
encoding.

Changes:

* Add _Py_DecodeLocaleEx() and _Py_EncodeLocaleEx(). On decoding or
  encoding error, they return the position of the error and an error
  message which are used to raise Unicode errors in
  PyUnicode_DecodeLocale() and PyUnicode_EncodeLocale().
* Replace _Py_DecodeCurrentLocale() with _Py_DecodeLocaleEx().
* PyUnicode_DecodeLocale() now uses _Py_DecodeLocaleEx() for all
  cases, especially for the strict error handler.
* Add _Py_DecodeUTF8Ex(): return more information on decoding error
  and supports the strict error handler.
* Rename _Py_EncodeUTF8_surrogateescape() to _Py_EncodeUTF8Ex().
* Replace _Py_EncodeCurrentLocale() with _Py_EncodeLocaleEx().
* Ignore the UTF-8 mode to encode/decode localeconv(), strerror()
  and time zone name.
* Remove PyUnicode_DecodeLocale(), PyUnicode_DecodeLocaleAndSize()
  and PyUnicode_EncodeLocale() now ignore the UTF-8 mode: always use
  the "current" locale.
* Remove _PyUnicode_DecodeCurrentLocale(),
  _PyUnicode_DecodeCurrentLocaleAndSize() and
  _PyUnicode_EncodeCurrentLocale().</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Modify locale.localeconv(), time.tzname, os.strerror() and other
functions to ignore the UTF-8 Mode: always use the current locale
encoding.

Changes:

* Add _Py_DecodeLocaleEx() and _Py_EncodeLocaleEx(). On decoding or
  encoding error, they return the position of the error and an error
  message which are used to raise Unicode errors in
  PyUnicode_DecodeLocale() and PyUnicode_EncodeLocale().
* Replace _Py_DecodeCurrentLocale() with _Py_DecodeLocaleEx().
* PyUnicode_DecodeLocale() now uses _Py_DecodeLocaleEx() for all
  cases, especially for the strict error handler.
* Add _Py_DecodeUTF8Ex(): return more information on decoding error
  and supports the strict error handler.
* Rename _Py_EncodeUTF8_surrogateescape() to _Py_EncodeUTF8Ex().
* Replace _Py_EncodeCurrentLocale() with _Py_EncodeLocaleEx().
* Ignore the UTF-8 mode to encode/decode localeconv(), strerror()
  and time zone name.
* Remove PyUnicode_DecodeLocale(), PyUnicode_DecodeLocaleAndSize()
  and PyUnicode_EncodeLocale() now ignore the UTF-8 mode: always use
  the "current" locale.
* Remove _PyUnicode_DecodeCurrentLocale(),
  _PyUnicode_DecodeCurrentLocaleAndSize() and
  _PyUnicode_EncodeCurrentLocale().</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-32030: Add _Py_FindEnvConfigValue() (#4963)</title>
<updated>2017-12-21T15:49:13+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>victor.stinner@gmail.com</email>
</author>
<published>2017-12-21T15:49:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=9bee329130aae5a13050c08dab9d349b76e66835'/>
<id>9bee329130aae5a13050c08dab9d349b76e66835</id>
<content type='text'>
Add a new _Py_FindEnvConfigValue() function: code shared between
Windows and Unix implementations of _PyPathConfig_Calculate() to read
the pyenv.cfg file.

_Py_FindEnvConfigValue() now uses _Py_DecodeUTF8_surrogateescape()
instead of using a Python Unicode string, the Python API must not be
used early during Python initialization. Same change in Unix
search_for_exec_prefix(): use _Py_DecodeUTF8_surrogateescape().

Cleanup also encode_current_locale(): PyMem_RawFree/PyMem_Free can be
called with NULL.

Fix also "NUL byte" =&gt; "NULL byte" typo.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a new _Py_FindEnvConfigValue() function: code shared between
Windows and Unix implementations of _PyPathConfig_Calculate() to read
the pyenv.cfg file.

_Py_FindEnvConfigValue() now uses _Py_DecodeUTF8_surrogateescape()
instead of using a Python Unicode string, the Python API must not be
used early during Python initialization. Same change in Unix
search_for_exec_prefix(): use _Py_DecodeUTF8_surrogateescape().

Cleanup also encode_current_locale(): PyMem_RawFree/PyMem_Free can be
called with NULL.

Fix also "NUL byte" =&gt; "NULL byte" typo.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-32030: Add _PyCoreConfig.warnoptions (#4936)</title>
<updated>2017-12-20T17:00:19+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>victor.stinner@gmail.com</email>
</author>
<published>2017-12-20T17:00:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=ca719ac42b3d58f7c3bcdf63f45b6d62b08b0d01'/>
<id>ca719ac42b3d58f7c3bcdf63f45b6d62b08b0d01</id>
<content type='text'>
Merge _PyCoreConfig_ReadEnv() into _PyCoreConfig_Read(), and
_Py_CommandLineDetails usage is now restricted to pymain_cmdline().

Changes:

* _PyCoreConfig: Add nxoption, xoptions, nwarnoption and warnoptions
* Add _PyCoreConfig.program: argv[0] or ""
* Move filename, command, module and xoptions from
  _Py_CommandLineDetails to _PyMain. xoptions _Py_OptList becomes
  (int, wchar_t**) list.
* Add pymain_cmdline() function
* Rename copy_argv() to copy_wstrlist(). Rename clear_argv() to
  clear_wstrlist(). Remove _Py_OptList structure: use (int,
  wchar_t**) list instead.
* Rename pymain_set_flag_from_env() to pymain_get_env_flag()
* Rename pymain_set_flags_from_env() to pymain_get_env_flags()
* _PyMainInterpreterConfig_Read() now creates the warnoptions from
  _PyCoreConfig.warnoptions
* Inline pymain_add_warning_dev_mode() and
  pymain_add_warning_bytes_flag() into config_init_warnoptions()
* Inline pymain_get_program_name() into _PyCoreConfig_Read()
* _Py_CommandLineDetails: Replace warning_options with nwarnoption
  and warnoptions. Replace env_warning_options with nenv_warnoption
  and env_warnoptions.
* pymain_warnings_envvar() now has a single implementation for
  Windows and Unix: use config_get_env_var_dup() to also get the
  variable as wchar_t* on Unix.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Merge _PyCoreConfig_ReadEnv() into _PyCoreConfig_Read(), and
_Py_CommandLineDetails usage is now restricted to pymain_cmdline().

Changes:

* _PyCoreConfig: Add nxoption, xoptions, nwarnoption and warnoptions
* Add _PyCoreConfig.program: argv[0] or ""
* Move filename, command, module and xoptions from
  _Py_CommandLineDetails to _PyMain. xoptions _Py_OptList becomes
  (int, wchar_t**) list.
* Add pymain_cmdline() function
* Rename copy_argv() to copy_wstrlist(). Rename clear_argv() to
  clear_wstrlist(). Remove _Py_OptList structure: use (int,
  wchar_t**) list instead.
* Rename pymain_set_flag_from_env() to pymain_get_env_flag()
* Rename pymain_set_flags_from_env() to pymain_get_env_flags()
* _PyMainInterpreterConfig_Read() now creates the warnoptions from
  _PyCoreConfig.warnoptions
* Inline pymain_add_warning_dev_mode() and
  pymain_add_warning_bytes_flag() into config_init_warnoptions()
* Inline pymain_get_program_name() into _PyCoreConfig_Read()
* _Py_CommandLineDetails: Replace warning_options with nwarnoption
  and warnoptions. Replace env_warning_options with nenv_warnoption
  and env_warnoptions.
* pymain_warnings_envvar() now has a single implementation for
  Windows and Unix: use config_get_env_var_dup() to also get the
  variable as wchar_t* on Unix.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-32030: Rewrite _PyMainInterpreterConfig (#4854)</title>
<updated>2017-12-14T01:20:52+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>victor.stinner@gmail.com</email>
</author>
<published>2017-12-14T01:20:52+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=b5fd9ad05e0f15f8272b8f1b829af22077230584'/>
<id>b5fd9ad05e0f15f8272b8f1b829af22077230584</id>
<content type='text'>
_PyMainInterpreterConfig now contains Python objects, whereas
_PyCoreConfig contains wchar_t* strings.

Core config:

* Rename _PyMainInterpreterConfig_ReadEnv() to _PyCoreConfig_ReadEnv()
* Move 3 strings from _PyMainInterpreterConfig to _PyCoreConfig:
  module_search_path_env, home, program_name.
* Add _PyCoreConfig_Clear()
* _PyPathConfig_Calculate() now takes core config rather than main
  config
* _PyMainInterpreterConfig_Read() now requires also a core config

Main config:

* Add _PyMainInterpreterConfig.module_search_path: sys.path list
* Add _PyMainInterpreterConfig.argv: sys.argv list
* _PyMainInterpreterConfig_Read() now computes module_search_path</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
_PyMainInterpreterConfig now contains Python objects, whereas
_PyCoreConfig contains wchar_t* strings.

Core config:

* Rename _PyMainInterpreterConfig_ReadEnv() to _PyCoreConfig_ReadEnv()
* Move 3 strings from _PyMainInterpreterConfig to _PyCoreConfig:
  module_search_path_env, home, program_name.
* Add _PyCoreConfig_Clear()
* _PyPathConfig_Calculate() now takes core config rather than main
  config
* _PyMainInterpreterConfig_Read() now requires also a core config

Main config:

* Add _PyMainInterpreterConfig.module_search_path: sys.path list
* Add _PyMainInterpreterConfig.argv: sys.argv list
* _PyMainInterpreterConfig_Read() now computes module_search_path</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-32030: Add _PyPathConfig_ComputeArgv0() (#4845)</title>
<updated>2017-12-13T20:05:57+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>victor.stinner@gmail.com</email>
</author>
<published>2017-12-13T20:05:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=11a247df88f15b51feff8a3c46005676bb29b96e'/>
<id>11a247df88f15b51feff8a3c46005676bb29b96e</id>
<content type='text'>
Changes:

* Split _PySys_SetArgvWithError() into subfunctions for Py_Main():

  * Create the Python list object
  * Set sys.argv to the list
  * Compute argv0
  * Prepend argv0 to sys.path

* Add _PyPathConfig_ComputeArgv0()
* Remove _PySys_SetArgvWithError()
* Py_Main() now splits the code to compute sys.argv/path0 and the
  code to update the sys module: add pymain_compute_argv()
  subfunction.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Changes:

* Split _PySys_SetArgvWithError() into subfunctions for Py_Main():

  * Create the Python list object
  * Set sys.argv to the list
  * Compute argv0
  * Prepend argv0 to sys.path

* Add _PyPathConfig_ComputeArgv0()
* Remove _PySys_SetArgvWithError()
* Py_Main() now splits the code to compute sys.argv/path0 and the
  code to update the sys module: add pymain_compute_argv()
  subfunction.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-32241: Add the const qualifire to declarations of umodifiable strings. (#4748)</title>
<updated>2017-12-12T11:55:04+00:00</updated>
<author>
<name>Serhiy Storchaka</name>
<email>storchaka@gmail.com</email>
</author>
<published>2017-12-12T11:55:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=4ae06c5337e01bdde28bce57b6b9166ad50947e3'/>
<id>4ae06c5337e01bdde28bce57b6b9166ad50947e3</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
