diff options
| author | Steve Dower <steve.dower@microsoft.com> | 2016-11-06 19:35:24 -0800 |
|---|---|---|
| committer | Steve Dower <steve.dower@microsoft.com> | 2016-11-06 19:35:24 -0800 |
| commit | 257a4c150301c96b46c53424dfdd3e96c6b62a9a (patch) | |
| tree | dcd47116e471e047fc6819e489740d75583ad232 /Objects/unicodeobject.c | |
| parent | a80b9c51e1b2e3234bee84dae6bb21f3e468d15d (diff) | |
| parent | 78057b41591629aa676d8f128da8ec6c65ffaeb5 (diff) | |
| download | cpython-git-257a4c150301c96b46c53424dfdd3e96c6b62a9a.tar.gz | |
Closes #27781: Removes special cases for the experimental aspect of PEP 529
Diffstat (limited to 'Objects/unicodeobject.c')
| -rw-r--r-- | Objects/unicodeobject.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 6e63e009a9..e22eed8853 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -3832,18 +3832,9 @@ PyUnicode_DecodeFSDefaultAndSize(const char *s, Py_ssize_t size) 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); |
