Closes #27781: Removes special cases for the experimental aspect of PEP 529
This commit is contained in:
parent
f570d0f117
commit
78057b4159
|
@ -355,11 +355,6 @@ correctly encoded. To revert to the previous behaviour, set
|
||||||
See :pep:`529` for more information and discussion of code modifications that
|
See :pep:`529` for more information and discussion of code modifications that
|
||||||
may be required.
|
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:
|
.. _whatsnew-pep487:
|
||||||
|
|
||||||
PEP 487: Simpler customization of class creation
|
PEP 487: Simpler customization of class creation
|
||||||
|
|
|
@ -2860,13 +2860,8 @@ class OSErrorTests(unittest.TestCase):
|
||||||
func(name, *func_args)
|
func(name, *func_args)
|
||||||
except OSError as err:
|
except OSError as err:
|
||||||
self.assertIs(err.filename, name, str(func))
|
self.assertIs(err.filename, name, str(func))
|
||||||
except RuntimeError as err:
|
except UnicodeDecodeError:
|
||||||
if sys.platform != 'win32':
|
pass
|
||||||
raise
|
|
||||||
|
|
||||||
# issue27781: undecodable bytes currently raise RuntimeError
|
|
||||||
# by 3.6.0b4 this will become UnicodeDecodeError or nothing
|
|
||||||
self.assertIsInstance(err.__context__, UnicodeDecodeError)
|
|
||||||
else:
|
else:
|
||||||
self.fail("No exception thrown by {}".format(func))
|
self.fail("No exception thrown by {}".format(func))
|
||||||
|
|
||||||
|
|
|
@ -3270,7 +3270,7 @@ Library
|
||||||
- Issue #24774: Fix docstring in http.server.test. Patch from Chiu-Hsiang Hsu.
|
- Issue #24774: Fix docstring in http.server.test. Patch from Chiu-Hsiang Hsu.
|
||||||
|
|
||||||
- Issue #21159: Improve message in configparser.InterpolationMissingOptionError.
|
- Issue #21159: Improve message in configparser.InterpolationMissingOptionError.
|
||||||
Patch from <EFBFBD>?ukasz Langa.
|
Patch from Łukasz Langa.
|
||||||
|
|
||||||
- Issue #20362: Honour TestCase.longMessage correctly in assertRegex.
|
- Issue #20362: Honour TestCase.longMessage correctly in assertRegex.
|
||||||
Patch from Ilia Kurenkov.
|
Patch from Ilia Kurenkov.
|
||||||
|
@ -5198,7 +5198,7 @@ Library
|
||||||
Based on patch by Martin Panter.
|
Based on patch by Martin Panter.
|
||||||
|
|
||||||
- Issue #17293: uuid.getnode() now determines MAC address on AIX using netstat.
|
- Issue #17293: uuid.getnode() now determines MAC address on AIX using netstat.
|
||||||
Based on patch by Aivars Kalv<EFBFBD>?ns.
|
Based on patch by Aivars Kalvāns.
|
||||||
|
|
||||||
- Issue #22769: Fixed ttk.Treeview.tag_has() when called without arguments.
|
- Issue #22769: Fixed ttk.Treeview.tag_has() when called without arguments.
|
||||||
|
|
||||||
|
|
|
@ -3843,18 +3843,9 @@ PyUnicode_DecodeFSDefaultAndSize(const char *s, Py_ssize_t size)
|
||||||
cannot only rely on it: check also interp->fscodec_initialized for
|
cannot only rely on it: check also interp->fscodec_initialized for
|
||||||
subinterpreters. */
|
subinterpreters. */
|
||||||
if (Py_FileSystemDefaultEncoding && interp->fscodec_initialized) {
|
if (Py_FileSystemDefaultEncoding && interp->fscodec_initialized) {
|
||||||
PyObject *res = PyUnicode_Decode(s, size,
|
return PyUnicode_Decode(s, size,
|
||||||
Py_FileSystemDefaultEncoding,
|
Py_FileSystemDefaultEncoding,
|
||||||
Py_FileSystemDefaultEncodeErrors);
|
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 {
|
else {
|
||||||
return PyUnicode_DecodeLocaleAndSize(s, size, Py_FileSystemDefaultEncodeErrors);
|
return PyUnicode_DecodeLocaleAndSize(s, size, Py_FileSystemDefaultEncodeErrors);
|
||||||
|
|
Loading…
Reference in New Issue