Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

bpo-34523: Support surrogatepass in locale codecs#8995

Merged
vstinner merged 1 commit into
python:masterpython/cpython:masterfrom
vstinner:surrogatepassCopy head branch name to clipboard
Aug 29, 2018
Merged

bpo-34523: Support surrogatepass in locale codecs#8995
vstinner merged 1 commit into
python:masterpython/cpython:masterfrom
vstinner:surrogatepassCopy head branch name to clipboard

Conversation

@vstinner

@vstinner vstinner commented Aug 29, 2018

Copy link
Copy Markdown
Member

Add support for the "surrogatepass" error handler in
PyUnicode_DecodeFSDefault() and PyUnicode_EncodeFSDefault().

Changes:

  • _Py_DecodeLocaleEx() and _Py_EncodeLocaleEx() now uses
    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.
  • _Py_DecodeUTF8Ex() and _Py_EncodeUTF8Ex() now support the
    surrogatepass error handler (_Py_ERROR_SURROGATEPASS).
  • Add unit tests for _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.

https://bugs.python.org/issue34523

Add support for the "surrogatepass" error handler in
PyUnicode_DecodeFSDefault() and PyUnicode_EncodeFSDefault().

Changes:

* _Py_DecodeLocaleEx() and _Py_EncodeLocaleEx() now uses
  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.
* _Py_DecodeUTF8Ex() and _Py_EncodeUTF8Ex() now support the
  surrogatepass error handler (_Py_ERROR_SURROGATEPASS).
* Add unit tests for _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.
@vstinner vstinner merged commit 3d4226a into python:master Aug 29, 2018
@vstinner vstinner deleted the surrogatepass branch August 29, 2018 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.