cpython: b8233c779ff7 (original) (raw)
Mercurial > cpython
changeset 104944:b8233c779ff7
Closes #27781: Removes special cases for the experimental aspect of PEP 529 [#27781]
Steve Dower steve.dower@microsoft.com | |
---|---|
date | Sun, 06 Nov 2016 19:35:24 -0800 |
parents | e60c1aef639a(current diff)b26c8104e54f(diff) |
children | 62b7614970bd |
files | Doc/whatsnew/3.6.rst Misc/NEWS Objects/unicodeobject.c |
diffstat | 4 files changed, 5 insertions(+), 24 deletions(-)[+] [-] Doc/whatsnew/3.6.rst 5 Lib/test/test_os.py 9 Misc/NEWS 4 Objects/unicodeobject.c 11 |
line wrap: on
line diff
--- a/Doc/whatsnew/3.6.rst
+++ b/Doc/whatsnew/3.6.rst
@@ -356,11 +356,6 @@ correctly encoded. To revert to the prev
See :pep:529
for more information and discussion of code modifications that
may be required.
-.. note::
-
- This change is considered experimental for 3.6.0 beta releases. The default
- encoding may change before the final release. -
.. _whatsnew-pep487: PEP 487: Simpler customization of class creation
--- a/Lib/test/test_os.py +++ b/Lib/test/test_os.py @@ -2860,13 +2860,8 @@ class OSErrorTests(unittest.TestCase): func(name, *func_args) except OSError as err: self.assertIs(err.filename, name, str(func))
except RuntimeError as err:[](#l2.7)
if sys.platform != 'win32':[](#l2.8)
raise[](#l2.9)
# issue27781: undecodable bytes currently raise RuntimeError[](#l2.11)
# by 3.6.0b4 this will become UnicodeDecodeError or nothing[](#l2.12)
self.assertIsInstance(err.__context__, UnicodeDecodeError)[](#l2.13)
except UnicodeDecodeError:[](#l2.14)
pass[](#l2.15) else:[](#l2.16) self.fail("No exception thrown by {}".format(func))[](#l2.17)
--- a/Misc/NEWS +++ b/Misc/NEWS @@ -3278,7 +3278,7 @@ Library
- Issue #24774: Fix docstring in http.server.test. Patch from Chiu-Hsiang Hsu.
- Issue #21159: Improve message in configparser.InterpolationMissingOptionError.
- Patch from �?ukasz Langa.
- Issue #20362: Honour TestCase.longMessage correctly in assertRegex. Patch from Ilia Kurenkov. @@ -5206,7 +5206,7 @@ Library Based on patch by Martin Panter.
- Issue #17293: uuid.getnode() now determines MAC address on AIX using netstat.
- Based on patch by Aivars Kalv�?ns.
--- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -3832,18 +3832,9 @@ PyUnicode_DecodeFSDefaultAndSize(const c cannot only rely on it: check also interp->fscodec_initialized for subinterpreters. */ if (Py_FileSystemDefaultEncoding && interp->fscodec_initialized) {
PyObject *res = PyUnicode_Decode(s, size,[](#l4.7)
return PyUnicode_Decode(s, size,[](#l4.8) Py_FileSystemDefaultEncoding,[](#l4.9) Py_FileSystemDefaultEncodeErrors);[](#l4.10)
if (!res && PyErr_ExceptionMatches(PyExc_UnicodeDecodeError)) {[](#l4.12)
_PyErr_FormatFromCause(PyExc_RuntimeError,[](#l4.13)
"filesystem path bytes were not correctly encoded with '%s'. "[](#l4.14)
"Please report this at http://bugs.python.org/issue27781",[](#l4.15)
Py_FileSystemDefaultEncoding);[](#l4.16)
}[](#l4.17)