mirror of
https://github.com/python/cpython.git
synced 2025-07-08 03:45:36 +00:00
gh-133610: Remove PyUnicode_AsDecoded/Encoded functions (#133612)
This commit is contained in:
parent
f34ec09ba5
commit
4fd1095280
6 changed files with 26 additions and 90 deletions
|
@ -341,49 +341,6 @@ PyAPI_FUNC(PyObject*) PyUnicode_Decode(
|
|||
const char *errors /* error handling */
|
||||
);
|
||||
|
||||
/* Decode a Unicode object unicode and return the result as Python
|
||||
object.
|
||||
|
||||
This API is DEPRECATED and will be removed in 3.15.
|
||||
The only supported standard encoding is rot13.
|
||||
Use PyCodec_Decode() to decode with rot13 and non-standard codecs
|
||||
that decode from str. */
|
||||
|
||||
Py_DEPRECATED(3.6) PyAPI_FUNC(PyObject*) PyUnicode_AsDecodedObject(
|
||||
PyObject *unicode, /* Unicode object */
|
||||
const char *encoding, /* encoding */
|
||||
const char *errors /* error handling */
|
||||
);
|
||||
|
||||
/* Decode a Unicode object unicode and return the result as Unicode
|
||||
object.
|
||||
|
||||
This API is DEPRECATED and will be removed in 3.15.
|
||||
The only supported standard encoding is rot13.
|
||||
Use PyCodec_Decode() to decode with rot13 and non-standard codecs
|
||||
that decode from str to str. */
|
||||
|
||||
Py_DEPRECATED(3.6) PyAPI_FUNC(PyObject*) PyUnicode_AsDecodedUnicode(
|
||||
PyObject *unicode, /* Unicode object */
|
||||
const char *encoding, /* encoding */
|
||||
const char *errors /* error handling */
|
||||
);
|
||||
|
||||
/* Encodes a Unicode object and returns the result as Python
|
||||
object.
|
||||
|
||||
This API is DEPRECATED and will be removed in 3.15.
|
||||
It is superseded by PyUnicode_AsEncodedString()
|
||||
since all standard encodings (except rot13) encode str to bytes.
|
||||
Use PyCodec_Encode() for encoding with rot13 and non-standard codecs
|
||||
that encode form str to non-bytes. */
|
||||
|
||||
Py_DEPRECATED(3.6) PyAPI_FUNC(PyObject*) PyUnicode_AsEncodedObject(
|
||||
PyObject *unicode, /* Unicode object */
|
||||
const char *encoding, /* encoding */
|
||||
const char *errors /* error handling */
|
||||
);
|
||||
|
||||
/* Encodes a Unicode object and returns the result as Python string
|
||||
object. */
|
||||
|
||||
|
@ -393,20 +350,6 @@ PyAPI_FUNC(PyObject*) PyUnicode_AsEncodedString(
|
|||
const char *errors /* error handling */
|
||||
);
|
||||
|
||||
/* Encodes a Unicode object and returns the result as Unicode
|
||||
object.
|
||||
|
||||
This API is DEPRECATED and will be removed in 3.15.
|
||||
The only supported standard encodings is rot13.
|
||||
Use PyCodec_Encode() to encode with rot13 and non-standard codecs
|
||||
that encode from str to str. */
|
||||
|
||||
Py_DEPRECATED(3.6) PyAPI_FUNC(PyObject*) PyUnicode_AsEncodedUnicode(
|
||||
PyObject *unicode, /* Unicode object */
|
||||
const char *encoding, /* encoding */
|
||||
const char *errors /* error handling */
|
||||
);
|
||||
|
||||
/* Build an encoding map. */
|
||||
|
||||
PyAPI_FUNC(PyObject*) PyUnicode_BuildEncodingMap(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue