(original) (raw)
changeset: 104944:b8233c779ff7 parent: 104942:e60c1aef639a parent: 104943:b26c8104e54f user: Steve Dower steve.dower@microsoft.com date: Sun Nov 06 19:35:24 2016 -0800 files: Doc/whatsnew/3.6.rst Misc/NEWS Objects/unicodeobject.c description: Closes #27781: Removes special cases for the experimental aspect of PEP 529 diff -r e60c1aef639a -r b8233c779ff7 Doc/whatsnew/3.6.rst --- a/Doc/whatsnew/3.6.rst Sun Nov 06 18:26:08 2016 -0800 +++ b/Doc/whatsnew/3.6.rst Sun Nov 06 19:35:24 2016 -0800 @@ -356,11 +356,6 @@ 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 diff -r e60c1aef639a -r b8233c779ff7 Lib/test/test_os.py --- a/Lib/test/test_os.py Sun Nov 06 18:26:08 2016 -0800 +++ b/Lib/test/test_os.py Sun Nov 06 19:35:24 2016 -0800 @@ -2860,13 +2860,8 @@ func(name, *func_args) except OSError as err: self.assertIs(err.filename, name, str(func)) - except RuntimeError as err: - if sys.platform != 'win32': - raise - - # issue27781: undecodable bytes currently raise RuntimeError - # by 3.6.0b4 this will become UnicodeDecodeError or nothing - self.assertIsInstance(err.__context__, UnicodeDecodeError) + except UnicodeDecodeError: + pass else: self.fail("No exception thrown by {}".format(func)) diff -r e60c1aef639a -r b8233c779ff7 Misc/NEWS --- a/Misc/NEWS Sun Nov 06 18:26:08 2016 -0800 +++ b/Misc/NEWS Sun Nov 06 19:35:24 2016 -0800 @@ -3278,7 +3278,7 @@ - Issue #24774: Fix docstring in http.server.test. Patch from Chiu-Hsiang Hsu. - Issue #21159: Improve message in configparser.InterpolationMissingOptionError. - Patch from �?ukasz Langa. + Patch from Łukasz Langa. - Issue #20362: Honour TestCase.longMessage correctly in assertRegex. Patch from Ilia Kurenkov. @@ -5206,7 +5206,7 @@ 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. + Based on patch by Aivars Kalvāns. - Issue #22769: Fixed ttk.Treeview.tag_has() when called without arguments. diff -r e60c1aef639a -r b8233c779ff7 Objects/unicodeobject.c --- a/Objects/unicodeobject.c Sun Nov 06 18:26:08 2016 -0800 +++ b/Objects/unicodeobject.c Sun Nov 06 19:35:24 2016 -0800 @@ -3832,18 +3832,9 @@ cannot only rely on it: check also interp->fscodec_initialized for subinterpreters. */ if (Py_FileSystemDefaultEncoding && interp->fscodec_initialized) { - PyObject *res = PyUnicode_Decode(s, size, + return PyUnicode_Decode(s, size, Py_FileSystemDefaultEncoding, Py_FileSystemDefaultEncodeErrors); -#ifdef MS_WINDOWS - if (!res && PyErr_ExceptionMatches(PyExc_UnicodeDecodeError)) { - _PyErr_FormatFromCause(PyExc_RuntimeError, - "filesystem path bytes were not correctly encoded with '%s'. " - "Please report this at http://bugs.python.org/issue27781", - Py_FileSystemDefaultEncoding); - } -#endif - return res; } else { return PyUnicode_DecodeLocaleAndSize(s, size, Py_FileSystemDefaultEncodeErrors); /steve.dower@microsoft.com