<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/cpython-git.git/Python, branch benjamin-interp-initialize</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>Initialize a variable to make the compiler happy.</title>
<updated>2018-09-11T01:27:22+00:00</updated>
<author>
<name>Benjamin Peterson</name>
<email>benjamin@python.org</email>
</author>
<published>2018-09-11T01:27:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=444f3e657f6e1264585fc10f47cc71ad829c4864'/>
<id>444f3e657f6e1264585fc10f47cc71ad829c4864</id>
<content type='text'>
GCC complains:

Python/pylifecycle.c: In function ‘_Py_InitializeFromConfig’:
Python/pylifecycle.c:900:13: warning: ‘interp’ may be used uninitialized in this function [-Wmaybe-uninitialized]
         err = _Py_InitializeMainInterpreter(interp, &amp;main_config);
         ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This seems spurious since &amp;interp is passed to _Py_InitializeCore. Anyway, we
can easily initialize to quiet the warning.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
GCC complains:

Python/pylifecycle.c: In function ‘_Py_InitializeFromConfig’:
Python/pylifecycle.c:900:13: warning: ‘interp’ may be used uninitialized in this function [-Wmaybe-uninitialized]
         err = _Py_InitializeMainInterpreter(interp, &amp;main_config);
         ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This seems spurious since &amp;interp is passed to _Py_InitializeCore. Anyway, we
can easily initialize to quiet the warning.
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-34588: Fix an off-by-one error in traceback formatting. (GH-9077)</title>
<updated>2018-09-10T15:43:10+00:00</updated>
<author>
<name>Benjamin Peterson</name>
<email>benjamin@python.org</email>
</author>
<published>2018-09-10T15:43:10+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=d545869d084e70d4838310e79b52a25a72a1ca56'/>
<id>d545869d084e70d4838310e79b52a25a72a1ca56</id>
<content type='text'>
The recursive frame pruning code always undercounted the number of elided frames
by one. That is, in the "[Previous line repeated N more times]" message, N would
always be one too few. Near the recursive pruning cutoff, one frame could be
silently dropped. That situation is demonstrated in the OP of the bug report.

The fix is to start the identical frame counter at 1.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The recursive frame pruning code always undercounted the number of elided frames
by one. That is, in the "[Previous line repeated N more times]" message, N would
always be one too few. Near the recursive pruning cutoff, one frame could be
silently dropped. That situation is demonstrated in the OP of the bug report.

The fix is to start the identical frame counter at 1.</pre>
</div>
</content>
</entry>
<entry>
<title>_Py_CoerceLegacyLocale() restores LC_CTYPE on fail (GH-9044)</title>
<updated>2018-09-03T15:05:18+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@redhat.com</email>
</author>
<published>2018-09-03T15:05:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=8ea09110d413829f71d979d8c7073008cb87fb03'/>
<id>8ea09110d413829f71d979d8c7073008cb87fb03</id>
<content type='text'>
bpo-34544: If _Py_CoerceLegacyLocale() fails to coerce the C locale,
restore the LC_CTYPE locale to the its previous value.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
bpo-34544: If _Py_CoerceLegacyLocale() fails to coerce the C locale,
restore the LC_CTYPE locale to the its previous value.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-34408: Prevent a null pointer dereference and resource leakage in `PyInterpreterState_New()` (GH-8767)</title>
<updated>2018-08-31T21:49:29+00:00</updated>
<author>
<name>Pablo Galindo</name>
<email>Pablogsal@gmail.com</email>
</author>
<published>2018-08-31T21:49:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=95d630e2213fb0ffc197ec440efa3ae3dbb74f8d'/>
<id>95d630e2213fb0ffc197ec440efa3ae3dbb74f8d</id>
<content type='text'>
* A pointer in `PyInterpreterState_New()` could have been `NULL` when being dereferenced.

* Memory was leaked in `PyInterpreterState_New()` when taking some error-handling code path.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* A pointer in `PyInterpreterState_New()` could have been `NULL` when being dereferenced.

* Memory was leaked in `PyInterpreterState_New()` when taking some error-handling code path.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-34523: Use _PyCoreConfig instead of globals (GH-9005)</title>
<updated>2018-08-29T22:50:45+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@redhat.com</email>
</author>
<published>2018-08-29T22:50:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=fbca90856d96273fd87c0b126f6e7966af7fbf7b'/>
<id>fbca90856d96273fd87c0b126f6e7966af7fbf7b</id>
<content type='text'>
Use the core configuration of the interpreter, rather
than using global configuration variables. For example, replace
Py_QuietFlag with core_config-&gt;quiet.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use the core configuration of the interpreter, rather
than using global configuration variables. For example, replace
Py_QuietFlag with core_config-&gt;quiet.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-34523: Py_FileSystemDefaultEncoding NULL by default (GH-9003)</title>
<updated>2018-08-29T21:26:55+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@redhat.com</email>
</author>
<published>2018-08-29T21:26:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=de427556746aa41a8b5198924ce423021bc0c718'/>
<id>de427556746aa41a8b5198924ce423021bc0c718</id>
<content type='text'>
* Py_FileSystemDefaultEncoding and Py_FileSystemDefaultEncodeErrors
  default value is now NULL: initfsencoding() set them
  during Python initialization.
* Document how Python chooses the filesystem encoding and error
  handler.
* Add an assertion to _PyCoreConfig_Read().</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Py_FileSystemDefaultEncoding and Py_FileSystemDefaultEncodeErrors
  default value is now NULL: initfsencoding() set them
  during Python initialization.
* Document how Python chooses the filesystem encoding and error
  handler.
* Add an assertion to _PyCoreConfig_Read().</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-34485: Emit C locale coercion warning later (GH-9002)</title>
<updated>2018-08-29T20:56:06+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@redhat.com</email>
</author>
<published>2018-08-29T20:56:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=cf21504194927b2f22132f48effea69eb8ade751'/>
<id>cf21504194927b2f22132f48effea69eb8ade751</id>
<content type='text'>
PYTHONCOERCELOCALE=warn warning is now emitted later and written into
sys.stderr, rather than being written into the C stderr stream.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PYTHONCOERCELOCALE=warn warning is now emitted later and written into
sys.stderr, rather than being written into the C stderr stream.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-34523: Support surrogatepass in locale codecs (GH-8995)</title>
<updated>2018-08-29T20:21:32+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@redhat.com</email>
</author>
<published>2018-08-29T20:21:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=3d4226a832cabc630402589cc671cc4035d504e5'/>
<id>3d4226a832cabc630402589cc671cc4035d504e5</id>
<content type='text'>
Add support for the "surrogatepass" error handler in
PyUnicode_DecodeFSDefault() and PyUnicode_EncodeFSDefault()
for the UTF-8 encoding.

Changes:

* _Py_DecodeUTF8Ex() and _Py_EncodeUTF8Ex() now support the
  surrogatepass error handler (_Py_ERROR_SURROGATEPASS).
* _Py_DecodeLocaleEx() and _Py_EncodeLocaleEx() now use
  the _Py_error_handler enum instead of "int surrogateescape" to pass
  the error handler. These functions now return -3 if the error
  handler is unknown.
* Add unit tests on _Py_DecodeLocaleEx() and _Py_EncodeLocaleEx()
  in test_codecs.
* Rename get_error_handler() to _Py_GetErrorHandler() and expose it
  as a private function.
* _freeze_importlib doesn't need config.filesystem_errors="strict"
  workaround anymore.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add support for the "surrogatepass" error handler in
PyUnicode_DecodeFSDefault() and PyUnicode_EncodeFSDefault()
for the UTF-8 encoding.

Changes:

* _Py_DecodeUTF8Ex() and _Py_EncodeUTF8Ex() now support the
  surrogatepass error handler (_Py_ERROR_SURROGATEPASS).
* _Py_DecodeLocaleEx() and _Py_EncodeLocaleEx() now use
  the _Py_error_handler enum instead of "int surrogateescape" to pass
  the error handler. These functions now return -3 if the error
  handler is unknown.
* Add unit tests on _Py_DecodeLocaleEx() and _Py_EncodeLocaleEx()
  in test_codecs.
* Rename get_error_handler() to _Py_GetErrorHandler() and expose it
  as a private function.
* _freeze_importlib doesn't need config.filesystem_errors="strict"
  workaround anymore.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-34523: Py_DecodeLocale() use UTF-8 on Windows (GH-8998)</title>
<updated>2018-08-29T17:32:47+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@redhat.com</email>
</author>
<published>2018-08-29T17:32:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=c5989cd87659acbfd4d19dc00dbe99c3a0fc9bd2'/>
<id>c5989cd87659acbfd4d19dc00dbe99c3a0fc9bd2</id>
<content type='text'>
Py_DecodeLocale() and Py_EncodeLocale() now use the UTF-8 encoding on
Windows if Py_LegacyWindowsFSEncodingFlag is zero.

pymain_read_conf() now sets Py_LegacyWindowsFSEncodingFlag in its
loop, but restore its value at exit.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Py_DecodeLocale() and Py_EncodeLocale() now use the UTF-8 encoding on
Windows if Py_LegacyWindowsFSEncodingFlag is zero.

pymain_read_conf() now sets Py_LegacyWindowsFSEncodingFlag in its
loop, but restore its value at exit.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-34523: Fix config_init_fs_encoding() (GH-8991)</title>
<updated>2018-08-29T11:45:34+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@redhat.com</email>
</author>
<published>2018-08-29T11:45:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=70fead25e503a742ad4c919b151b9b2b5facee36'/>
<id>70fead25e503a742ad4c919b151b9b2b5facee36</id>
<content type='text'>
Call config_init_fs_encoding() if filesystem_errors is not NULL but
filesystem_encoding is NULL.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Call config_init_fs_encoding() if filesystem_errors is not NULL but
filesystem_encoding is NULL.</pre>
</div>
</content>
</entry>
</feed>
