[issue28426] PyUnicode_AsDecodedObject can only return unicode now

Serhiy Storchaka report at bugs.python.org
Tue Oct 25 04:33:16 EDT 2016


Serhiy Storchaka added the comment:

> BTW Serhiy, how about PyUnicode_AsEncodedObject? Not see it in your deprecate list.

Indeed. It is not such useless as other functions (that support only the rot13 encoding), but it can be replaced with either PyUnicode_AsEncodedString or PyCodec_Encode (both exists in 2.7).

Updated patch deprecates PyUnicode_AsEncodedObject too. Please make a review of warning messages, I'm not sure about the wording.

----------
versions:  -Python 3.4, Python 3.5
Added file: http://bugs.python.org/file45211/deprecate-str-to-str-coding-unicode-api-2.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue28426>
_______________________________________


More information about the Python-bugs-list mailing list