summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-02-21 20:51:28 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-02-21 20:51:28 (GMT)
commitfd34b3788fbfb1e46ece705e1df49ac6ac1e8b84 (patch)
treeaf1b9b1ee3174a4308667d00cc09b9b6ba35e9dd /Objects
parent5eaee2e23b374f83628d20acfc542092f1493b14 (diff)
downloadcpython-fd34b3788fbfb1e46ece705e1df49ac6ac1e8b84.zip
cpython-fd34b3788fbfb1e46ece705e1df49ac6ac1e8b84.tar.gz
cpython-fd34b3788fbfb1e46ece705e1df49ac6ac1e8b84.tar.bz2
Remove bootstrap code of PyUnicode_AsEncodedString()
Issue #11187: Remove bootstrap code (use ASCII) of PyUnicode_AsEncodedString(), it was replaced by a better fallback (use the locale encoding) in PyUnicode_EncodeFSDefault(). Prepare also empty sections in NEWS.
Diffstat (limited to 'Objects')
-rw-r--r--Objects/unicodeobject.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index 4567196..069be7b 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -1673,21 +1673,6 @@ PyObject *PyUnicode_AsEncodedString(PyObject *unicode,
PyUnicode_GET_SIZE(unicode),
errors);
}
- /* During bootstrap, we may need to find the encodings
- package, to load the file system encoding, and require the
- file system encoding in order to load the encodings
- package.
-
- Break out of this dependency by assuming that the path to
- the encodings module is ASCII-only. XXX could try wcstombs
- instead, if the file system encoding is the locale's
- encoding. */
- if (Py_FileSystemDefaultEncoding &&
- strcmp(encoding, Py_FileSystemDefaultEncoding) == 0 &&
- !PyThreadState_GET()->interp->codecs_initialized)
- return PyUnicode_EncodeASCII(PyUnicode_AS_UNICODE(unicode),
- PyUnicode_GET_SIZE(unicode),
- errors);
/* Encode via the codec registry */
v = PyCodec_Encode(unicode, encoding, errors);