<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/cpython-git.git/Lib/test/test_codecs.py, 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>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-22602: Raise an exception in the UTF-7 decoder for ill-formed sequences starting with "+". (GH-8741)</title>
<updated>2018-08-19T04:43:38+00:00</updated>
<author>
<name>Zackery Spytz</name>
<email>zspytz@gmail.com</email>
</author>
<published>2018-08-19T04:43:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=e349bf23584eef20e0d1e1b2989d9b1430f15507'/>
<id>e349bf23584eef20e0d1e1b2989d9b1430f15507</id>
<content type='text'>
The UTF-7 decoder now raises UnicodeDecodeError for ill-formed
sequences starting with "+" (as specified in RFC 2152).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The UTF-7 decoder now raises UnicodeDecodeError for ill-formed
sequences starting with "+" (as specified in RFC 2152).
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-29240: PEP 540: Add a new UTF-8 Mode (#855)</title>
<updated>2017-12-13T11:29:09+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>victor.stinner@gmail.com</email>
</author>
<published>2017-12-13T11:29:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.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-32110: codecs.StreamReader.read(n) now returns not more than n (#4499)</title>
<updated>2017-11-28T23:30:00+00:00</updated>
<author>
<name>Serhiy Storchaka</name>
<email>storchaka@gmail.com</email>
</author>
<published>2017-11-28T23:30:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=219c2de5ad0fdac825298bed1bb251f16956c04a'/>
<id>219c2de5ad0fdac825298bed1bb251f16956c04a</id>
<content type='text'>
characters/bytes for non-negative n.  This makes it compatible with
read() methods of other file-like objects.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
characters/bytes for non-negative n.  This makes it compatible with
read() methods of other file-like objects.
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-31825: Fixed OverflowError in the 'unicode-escape' codec (#4058)</title>
<updated>2017-10-20T14:08:15+00:00</updated>
<author>
<name>Serhiy Storchaka</name>
<email>storchaka@gmail.com</email>
</author>
<published>2017-10-20T14:08:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=56cb465cc93dcb35aaf7266ca3dbe2dcff1fac5f'/>
<id>56cb465cc93dcb35aaf7266ca3dbe2dcff1fac5f</id>
<content type='text'>
and in codecs.escape_decode() when decode an escaped non-ascii byte.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
and in codecs.escape_decode() when decode an escaped non-ascii byte.
</pre>
</div>
</content>
</entry>
<entry>
<title>Issue #25270: Merge from 3.5</title>
<updated>2016-09-16T14:32:06+00:00</updated>
<author>
<name>Berker Peksag</name>
<email>berker.peksag@gmail.com</email>
</author>
<published>2016-09-16T14:32:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=7b4bcd20041d25d5c5b5f416bc6d1090dd3e374a'/>
<id>7b4bcd20041d25d5c5b5f416bc6d1090dd3e374a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Issue #25270: Prevent codecs.escape_encode() from raising SystemError when an empty bytestring is passed</title>
<updated>2016-09-16T14:31:06+00:00</updated>
<author>
<name>Berker Peksag</name>
<email>berker.peksag@gmail.com</email>
</author>
<published>2016-09-16T14:31:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=4a72a7b6c4c95f7613486f0e4e20a3d4815a16c5'/>
<id>4a72a7b6c4c95f7613486f0e4e20a3d4815a16c5</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>#27364: Deprecate invalid escape strings in str/byutes.</title>
<updated>2016-09-08T19:34:08+00:00</updated>
<author>
<name>R David Murray</name>
<email>rdmurray@bitdance.com</email>
</author>
<published>2016-09-08T19:34:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=110b6fecbbb86143a4acb568f50eab2c870e7d34'/>
<id>110b6fecbbb86143a4acb568f50eab2c870e7d34</id>
<content type='text'>
Patch by Emanuel Barry, reviewed by Serhiy Storchaka and Martin Panter.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Patch by Emanuel Barry, reviewed by Serhiy Storchaka and Martin Panter.
</pre>
</div>
</content>
</entry>
<entry>
<title>#27364: fix "incorrect" uses of escape character in the stdlib.</title>
<updated>2016-09-08T17:59:53+00:00</updated>
<author>
<name>R David Murray</name>
<email>rdmurray@bitdance.com</email>
</author>
<published>2016-09-08T17:59:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=44b548dda872c0d4f30afd6b44fd74b053a55ad8'/>
<id>44b548dda872c0d4f30afd6b44fd74b053a55ad8</id>
<content type='text'>
And most of the tools.

Patch by Emanual Barry, reviewed by me, Serhiy Storchaka, and
Martin Panter.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
And most of the tools.

Patch by Emanual Barry, reviewed by me, Serhiy Storchaka, and
Martin Panter.
</pre>
</div>
</content>
</entry>
<entry>
<title>Issue #27959: Adds oem encoding, alias ansi to mbcs, move aliasmbcs to codec lookup</title>
<updated>2016-09-07T02:42:27+00:00</updated>
<author>
<name>Steve Dower</name>
<email>steve.dower@microsoft.com</email>
</author>
<published>2016-09-07T02:42:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=f5aba58480bb0dd45181f609487ac2ecfcc98673'/>
<id>f5aba58480bb0dd45181f609487ac2ecfcc98673</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
