@@ -1171,22 +1171,30 @@ PyAPI_FUNC(PyObject*) PyUnicode_Decode(
11711171 );
11721172
11731173/* Decode a Unicode object unicode and return the result as Python
1174- object. */
1174+ object.
1175+
1176+ This API is DEPRECATED. The only supported standard encoding is rot13.
1177+ Use PyCodec_Decode() to decode with rot13 and non-standard codecs
1178+ that decode from str. */
11751179
11761180PyAPI_FUNC (PyObject*) PyUnicode_AsDecodedObject(
11771181 PyObject *unicode, /* Unicode object */
11781182 const char *encoding, /* encoding */
11791183 const char *errors /* error handling */
1180- );
1184+ ) Py_DEPRECATED( 3.6 ) ;
11811185
11821186/* Decode a Unicode object unicode and return the result as Unicode
1183- object. */
1187+ object.
1188+
1189+ This API is DEPRECATED. The only supported standard encoding is rot13.
1190+ Use PyCodec_Decode() to decode with rot13 and non-standard codecs
1191+ that decode from str to str. */
11841192
11851193PyAPI_FUNC (PyObject*) PyUnicode_AsDecodedUnicode(
11861194 PyObject *unicode, /* Unicode object */
11871195 const char *encoding, /* encoding */
11881196 const char *errors /* error handling */
1189- );
1197+ ) Py_DEPRECATED( 3.6 ) ;
11901198
11911199/* Encodes a Py_UNICODE buffer of the given size and returns a
11921200 Python string object. */
@@ -1201,13 +1209,18 @@ PyAPI_FUNC(PyObject*) PyUnicode_Encode(
12011209#endif
12021210
12031211/* Encodes a Unicode object and returns the result as Python
1204- object. */
1212+ object.
1213+
1214+ This API is DEPRECATED. It is superceeded by PyUnicode_AsEncodedString()
1215+ since all standard encodings (except rot13) encode str to bytes.
1216+ Use PyCodec_Encode() for encoding with rot13 and non-standard codecs
1217+ that encode form str to non-bytes. */
12051218
12061219PyAPI_FUNC (PyObject*) PyUnicode_AsEncodedObject(
12071220 PyObject *unicode, /* Unicode object */
12081221 const char *encoding, /* encoding */
12091222 const char *errors /* error handling */
1210- );
1223+ ) Py_DEPRECATED( 3.6 ) ;
12111224
12121225/* Encodes a Unicode object and returns the result as Python string
12131226 object. */
@@ -1219,13 +1232,17 @@ PyAPI_FUNC(PyObject*) PyUnicode_AsEncodedString(
12191232 );
12201233
12211234/* Encodes a Unicode object and returns the result as Unicode
1222- object. */
1235+ object.
1236+
1237+ This API is DEPRECATED. The only supported standard encodings is rot13.
1238+ Use PyCodec_Encode() to encode with rot13 and non-standard codecs
1239+ that encode from str to str. */
12231240
12241241PyAPI_FUNC (PyObject*) PyUnicode_AsEncodedUnicode(
12251242 PyObject *unicode, /* Unicode object */
12261243 const char *encoding, /* encoding */
12271244 const char *errors /* error handling */
1228- );
1245+ ) Py_DEPRECATED( 3.6 ) ;
12291246
12301247/* Build an encoding map. */
12311248
0 commit comments