diff options
| author | Serhiy Storchaka <storchaka@gmail.com> | 2015-12-03 18:47:48 (GMT) |
|---|---|---|
| committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-12-03 18:47:48 (GMT) |
| commit | e37003e9ae82584c6f1ced32370a7d7c7e7a2974 (patch) | |
| tree | a905a232ad291909bd094a89205dc28ae7d5df7a /Objects/unicodeobject.c | |
| parent | c747e5564f0315357a3e7d2f580c6d1c8a3b4ab8 (diff) | |
| download | cpython-e37003e9ae82584c6f1ced32370a7d7c7e7a2974.zip cpython-e37003e9ae82584c6f1ced32370a7d7c7e7a2974.tar.gz cpython-e37003e9ae82584c6f1ced32370a7d7c7e7a2974.tar.bz2 | |
Issue #19543: Added Py3k warning for decoding unicode.
Diffstat (limited to 'Objects/unicodeobject.c')
| -rw-r--r-- | Objects/unicodeobject.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 9368a3a..2925651 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -1288,6 +1288,9 @@ PyObject *PyUnicode_AsDecodedObject(PyObject *unicode, goto onError; } + if (PyErr_WarnPy3k("decoding Unicode is not supported in 3.x", 1) < 0) + goto onError; + if (encoding == NULL) encoding = PyUnicode_GetDefaultEncoding(); |
