summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@microsoft.com>2016-11-07 03:35:08 (GMT)
committerSteve Dower <steve.dower@microsoft.com>2016-11-07 03:35:08 (GMT)
commit78057b41591629aa676d8f128da8ec6c65ffaeb5 (patch)
tree21ca0db7ee2806a6ecd87227f20320c2edc31e87 /Objects
parentf570d0f117e23c2be982c7db910309d52b0496aa (diff)
downloadcpython-78057b41591629aa676d8f128da8ec6c65ffaeb5.zip
cpython-78057b41591629aa676d8f128da8ec6c65ffaeb5.tar.gz
cpython-78057b41591629aa676d8f128da8ec6c65ffaeb5.tar.bz2
Closes #27781: Removes special cases for the experimental aspect of PEP 529
Diffstat (limited to 'Objects')
-rw-r--r--Objects/unicodeobject.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index 50b21cf..249cf57 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -3843,18 +3843,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);