@@ -719,17 +719,6 @@ Extension modules can continue using them, as they will not be removed in Python
719
719
:c:func: `PyUnicode_ReadChar ` or similar new APIs.
720
720
721
721
722
- .. c :function :: PyObject* PyUnicode_TransformDecimalToASCII (Py_UNICODE *s, Py_ssize_t size)
723
-
724
- Create a Unicode object by replacing all decimal digits in
725
- :c:type: `Py_UNICODE ` buffer of the given *size * by ASCII digits 0--9
726
- according to their decimal value. Return ``NULL `` if an exception occurs.
727
-
728
- .. deprecated-removed :: 3.3 3.11
729
- Part of the old-style :c:type: `Py_UNICODE ` API; please migrate to using
730
- :c:func: `Py_UNICODE_TODECIMAL `.
731
-
732
-
733
722
.. c :function :: Py_UNICODE* PyUnicode_AsUnicodeAndSize (PyObject *unicode, Py_ssize_t *size)
734
723
735
724
Like :c:func: `PyUnicode_AsUnicode `, but also saves the :c:func: `Py_UNICODE `
@@ -1038,20 +1027,6 @@ These are the generic codec APIs:
1038
1027
the codec.
1039
1028
1040
1029
1041
- .. c :function :: PyObject* PyUnicode_Encode (const Py_UNICODE *s, Py_ssize_t size, \
1042
- const char *encoding, const char *errors)
1043
-
1044
- Encode the :c:type: `Py_UNICODE ` buffer *s * of the given *size * and return a Python
1045
- bytes object. *encoding * and *errors * have the same meaning as the
1046
- parameters of the same name in the Unicode :meth: `~str.encode ` method. The codec
1047
- to be used is looked up using the Python codec registry. Return ``NULL `` if an
1048
- exception was raised by the codec.
1049
-
1050
- .. deprecated-removed :: 3.3 3.11
1051
- Part of the old-style :c:type: `Py_UNICODE ` API; please migrate to using
1052
- :c:func: `PyUnicode_AsEncodedString `.
1053
-
1054
-
1055
1030
UTF-8 Codecs
1056
1031
""""""""""""
1057
1032
@@ -1114,18 +1089,6 @@ These are the UTF-8 codec APIs:
1114
1089
The return type is now ``const char * `` rather of ``char * ``.
1115
1090
1116
1091
1117
- .. c :function :: PyObject* PyUnicode_EncodeUTF8 (const Py_UNICODE *s, Py_ssize_t size, const char *errors)
1118
-
1119
- Encode the :c:type: `Py_UNICODE ` buffer *s * of the given *size * using UTF-8 and
1120
- return a Python bytes object. Return ``NULL `` if an exception was raised by
1121
- the codec.
1122
-
1123
- .. deprecated-removed :: 3.3 3.11
1124
- Part of the old-style :c:type: `Py_UNICODE ` API; please migrate to using
1125
- :c:func: `PyUnicode_AsUTF8String `, :c:func: `PyUnicode_AsUTF8AndSize ` or
1126
- :c:func: `PyUnicode_AsEncodedString `.
1127
-
1128
-
1129
1092
UTF-32 Codecs
1130
1093
"""""""""""""
1131
1094
@@ -1176,29 +1139,6 @@ These are the UTF-32 codec APIs:
1176
1139
Return ``NULL `` if an exception was raised by the codec.
1177
1140
1178
1141
1179
- .. c :function :: PyObject* PyUnicode_EncodeUTF32 (const Py_UNICODE *s, Py_ssize_t size, \
1180
- const char *errors, int byteorder)
1181
-
1182
- Return a Python bytes object holding the UTF-32 encoded value of the Unicode
1183
- data in *s *. Output is written according to the following byte order::
1184
-
1185
- byteorder == -1: little endian
1186
- byteorder == 0: native byte order (writes a BOM mark)
1187
- byteorder == 1: big endian
1188
-
1189
- If byteorder is ``0 ``, the output string will always start with the Unicode BOM
1190
- mark (U+FEFF). In the other two modes, no BOM mark is prepended.
1191
-
1192
- If ``Py_UNICODE_WIDE`` is not defined, surrogate pairs will be output
1193
- as a single code point.
1194
-
1195
- Return ``NULL`` if an exception was raised by the codec.
1196
-
1197
- .. deprecated-removed:: 3.3 3.11
1198
- Part of the old-style :c:type:`Py_UNICODE` API; please migrate to using
1199
- :c:func:`PyUnicode_AsUTF32String` or :c:func:`PyUnicode_AsEncodedString`.
1200
-
1201
-
1202
1142
UTF-16 Codecs
1203
1143
"""""""""""""
1204
1144
@@ -1250,30 +1190,6 @@ These are the UTF-16 codec APIs:
1250
1190
Return ``NULL `` if an exception was raised by the codec.
1251
1191
1252
1192
1253
- .. c :function :: PyObject* PyUnicode_EncodeUTF16 (const Py_UNICODE *s, Py_ssize_t size, \
1254
- const char *errors, int byteorder)
1255
-
1256
- Return a Python bytes object holding the UTF-16 encoded value of the Unicode
1257
- data in *s *. Output is written according to the following byte order::
1258
-
1259
- byteorder == -1: little endian
1260
- byteorder == 0: native byte order (writes a BOM mark)
1261
- byteorder == 1: big endian
1262
-
1263
- If byteorder is ``0 ``, the output string will always start with the Unicode BOM
1264
- mark (U+FEFF). In the other two modes, no BOM mark is prepended.
1265
-
1266
- If ``Py_UNICODE_WIDE`` is defined, a single :c:type:`Py_UNICODE` value may get
1267
- represented as a surrogate pair. If it is not defined, each :c:type:`Py_UNICODE`
1268
- values is interpreted as a UCS-2 character.
1269
-
1270
- Return ``NULL`` if an exception was raised by the codec.
1271
-
1272
- .. deprecated-removed:: 3.3 3.11
1273
- Part of the old-style :c:type:`Py_UNICODE` API; please migrate to using
1274
- :c:func:`PyUnicode_AsUTF16String` or :c:func:`PyUnicode_AsEncodedString`.
1275
-
1276
-
1277
1193
UTF-7 Codecs
1278
1194
""""""""""""
1279
1195
@@ -1295,23 +1211,6 @@ These are the UTF-7 codec APIs:
1295
1211
bytes that have been decoded will be stored in *consumed *.
1296
1212
1297
1213
1298
- .. c :function :: PyObject* PyUnicode_EncodeUTF7 (const Py_UNICODE *s, Py_ssize_t size, \
1299
- int base64SetO, int base64WhiteSpace, const char *errors)
1300
-
1301
- Encode the :c:type: `Py_UNICODE ` buffer of the given size using UTF-7 and
1302
- return a Python bytes object. Return ``NULL `` if an exception was raised by
1303
- the codec.
1304
-
1305
- If *base64SetO * is nonzero, "Set O" (punctuation that has no otherwise
1306
- special meaning) will be encoded in base-64. If *base64WhiteSpace* is
1307
- nonzero, whitespace will be encoded in base-64. Both are set to zero for the
1308
- Python "utf-7" codec.
1309
-
1310
- .. deprecated-removed:: 3.3 3.11
1311
- Part of the old-style :c:type:`Py_UNICODE` API; please migrate to using
1312
- :c:func:`PyUnicode_AsEncodedString`.
1313
-
1314
-
1315
1214
Unicode-Escape Codecs
1316
1215
"""""""""""""""""""""
1317
1216
@@ -1332,16 +1231,6 @@ These are the "Unicode Escape" codec APIs:
1332
1231
raised by the codec.
1333
1232
1334
1233
1335
- .. c :function :: PyObject* PyUnicode_EncodeUnicodeEscape (const Py_UNICODE *s, Py_ssize_t size)
1336
-
1337
- Encode the :c:type: `Py_UNICODE ` buffer of the given *size * using Unicode-Escape and
1338
- return a bytes object. Return ``NULL `` if an exception was raised by the codec.
1339
-
1340
- .. deprecated-removed :: 3.3 3.11
1341
- Part of the old-style :c:type: `Py_UNICODE ` API; please migrate to using
1342
- :c:func: `PyUnicode_AsUnicodeEscapeString `.
1343
-
1344
-
1345
1234
Raw-Unicode-Escape Codecs
1346
1235
"""""""""""""""""""""""""
1347
1236
@@ -1362,18 +1251,6 @@ These are the "Raw Unicode Escape" codec APIs:
1362
1251
was raised by the codec.
1363
1252
1364
1253
1365
- .. c :function :: PyObject* PyUnicode_EncodeRawUnicodeEscape (const Py_UNICODE *s, \
1366
- Py_ssize_t size)
1367
-
1368
- Encode the :c:type: `Py_UNICODE ` buffer of the given *size * using Raw-Unicode-Escape
1369
- and return a bytes object. Return ``NULL `` if an exception was raised by the codec.
1370
-
1371
- .. deprecated-removed :: 3.3 3.11
1372
- Part of the old-style :c:type: `Py_UNICODE ` API; please migrate to using
1373
- :c:func: `PyUnicode_AsRawUnicodeEscapeString ` or
1374
- :c:func: `PyUnicode_AsEncodedString `.
1375
-
1376
-
1377
1254
Latin-1 Codecs
1378
1255
""""""""""""""
1379
1256
@@ -1394,18 +1271,6 @@ ordinals and only these are accepted by the codecs during encoding.
1394
1271
raised by the codec.
1395
1272
1396
1273
1397
- .. c :function :: PyObject* PyUnicode_EncodeLatin1 (const Py_UNICODE *s, Py_ssize_t size, const char *errors)
1398
-
1399
- Encode the :c:type: `Py_UNICODE ` buffer of the given *size * using Latin-1 and
1400
- return a Python bytes object. Return ``NULL `` if an exception was raised by
1401
- the codec.
1402
-
1403
- .. deprecated-removed :: 3.3 3.11
1404
- Part of the old-style :c:type: `Py_UNICODE ` API; please migrate to using
1405
- :c:func: `PyUnicode_AsLatin1String ` or
1406
- :c:func: `PyUnicode_AsEncodedString `.
1407
-
1408
-
1409
1274
ASCII Codecs
1410
1275
""""""""""""
1411
1276
@@ -1426,18 +1291,6 @@ codes generate errors.
1426
1291
raised by the codec.
1427
1292
1428
1293
1429
- .. c :function :: PyObject* PyUnicode_EncodeASCII (const Py_UNICODE *s, Py_ssize_t size, const char *errors)
1430
-
1431
- Encode the :c:type: `Py_UNICODE ` buffer of the given *size * using ASCII and
1432
- return a Python bytes object. Return ``NULL `` if an exception was raised by
1433
- the codec.
1434
-
1435
- .. deprecated-removed :: 3.3 3.11
1436
- Part of the old-style :c:type: `Py_UNICODE ` API; please migrate to using
1437
- :c:func: `PyUnicode_AsASCIIString ` or
1438
- :c:func: `PyUnicode_AsEncodedString `.
1439
-
1440
-
1441
1294
Character Map Codecs
1442
1295
""""""""""""""""""""
1443
1296
@@ -1477,19 +1330,6 @@ These are the mapping codec APIs:
1477
1330
``None`` are treated as "undefined mapping" and cause an error.
1478
1331
1479
1332
1480
- .. c:function:: PyObject* PyUnicode_EncodeCharmap(const Py_UNICODE *s, Py_ssize_t size, \
1481
- PyObject *mapping, const char *errors)
1482
-
1483
- Encode the :c:type: `Py_UNICODE ` buffer of the given *size * using the given
1484
- *mapping * object and return the result as a bytes object. Return ``NULL `` if
1485
- an exception was raised by the codec.
1486
-
1487
- .. deprecated-removed :: 3.3 3.11
1488
- Part of the old-style :c:type: `Py_UNICODE ` API; please migrate to using
1489
- :c:func: `PyUnicode_AsCharmapString ` or
1490
- :c:func: `PyUnicode_AsEncodedString `.
1491
-
1492
-
1493
1333
The following codec API is special in that maps Unicode to Unicode.
1494
1334
1495
1335
.. c:function:: PyObject* PyUnicode_Translate(PyObject *str, PyObject *table, const char *errors)
@@ -1509,19 +1349,6 @@ The following codec API is special in that maps Unicode to Unicode.
1509
1349
use the default error handling.
1510
1350
1511
1351
1512
- .. c:function:: PyObject* PyUnicode_TranslateCharmap(const Py_UNICODE *s, Py_ssize_t size, \
1513
- PyObject *mapping, const char *errors)
1514
-
1515
- Translate a :c:type: `Py_UNICODE ` buffer of the given *size * by applying a
1516
- character *mapping * table to it and return the resulting Unicode object.
1517
- Return ``NULL `` when an exception was raised by the codec.
1518
-
1519
- .. deprecated-removed :: 3.3 3.11
1520
- Part of the old-style :c:type: `Py_UNICODE ` API; please migrate to using
1521
- :c:func: `PyUnicode_Translate `. or :ref: `generic codec based API
1522
- <codec-registry>`
1523
-
1524
-
1525
1352
MBCS codecs for Windows
1526
1353
"""""""""""""""""""""""
1527
1354
@@ -1561,18 +1388,6 @@ the user settings on the machine running the codec.
1561
1388
.. versionadded :: 3.3
1562
1389
1563
1390
1564
- .. c :function :: PyObject* PyUnicode_EncodeMBCS (const Py_UNICODE *s, Py_ssize_t size, const char *errors)
1565
-
1566
- Encode the :c:type: `Py_UNICODE ` buffer of the given *size * using MBCS and return
1567
- a Python bytes object. Return ``NULL `` if an exception was raised by the
1568
- codec.
1569
-
1570
- .. deprecated-removed :: 3.3 4.0
1571
- Part of the old-style :c:type: `Py_UNICODE ` API; please migrate to using
1572
- :c:func: `PyUnicode_AsMBCSString `, :c:func: `PyUnicode_EncodeCodePage ` or
1573
- :c:func: `PyUnicode_AsEncodedString `.
1574
-
1575
-
1576
1391
Methods & Slots
1577
1392
"""""""""""""""
1578
1393
0 commit comments