8000 Update uuencode deprecation messages to reflect bump to Python 3.12 · python/cpython@53141f5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 53141f5

Browse files
committed
Update uuencode deprecation messages to reflect bump to Python 3.12
1 parent b3ce329 commit 53141f5

File tree

8 files changed

+34
-13
lines changed

8 files changed

+34
-13
lines changed

Doc/library/binascii.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ The :mod:`binascii` module defines the following functions:
3838
data. Lines normally contain 45 (binary) bytes, except for the last line. Line
3939
data may be followed by whitespace.
4040

41-
.. deprecated-removed:: 3.11 3.13
41+
.. deprecated-removed:: 3.12 3.14
4242
This function and the legacy uuencode format it implements are deprecated
4343
(see :pep:`PEP 594 <594#uu-and-the-uu-encoding>` for details).
4444

@@ -52,7 +52,7 @@ The :mod:`binascii` module defines the following functions:
5252
.. versionchanged:: 3.7
5353
Added the *backtick* parameter.
5454

55-
.. deprecated-removed:: 3.11 3.13
55+
.. deprecated-removed:: 3.12 3.14
5656
This function and the legacy uuencode format it implements are deprecated
5757
(see :pep:`PEP 594 <594#uu-and-the-uu-encoding>` for details).
5858

Doc/library/codecs.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1430,7 +1430,7 @@ to :class:`bytes` mappings. They are not supported by :meth:`bytes.decode`
14301430
.. versionchanged:: 3.4
14311431
Restoration of the aliases for the binary transforms.
14321432

1433-
.. deprecated-removed:: 3.11 3.13
1433+
.. deprecated-removed:: 3.12 3.14
14341434
The uuencode codec (``uu_codec``) is deprecated
14351435
(see :pep:`PEP 594 <594#uu-and-the-uu-encoding>` for details).
14361436

Doc/library/email.compat32-message.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ Here are the methods of the :class:`Message` class:
227227
replaced by :meth:`~email.message.EmailMessage.get_content` and
228228
:meth:`~email.message.EmailMessage.iter_parts`.
229229

230-
.. deprecated-removed:: 3.11 3.13
230+
.. deprecated-removed:: 3.12 3.14
231231
Decoding legacy uuencode payloads (with ``decode=True``) is deprecated
232232
(see :pep:`PEP 594 <594#uu-and-the-uu-encoding>` for details).
233233

Doc/whatsnew/3.12.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,24 @@ Deprecated
348348
and tailor them to your needs.
349349
(Contributed by Erlend E. Aasland in :gh:`90016`.)
350350

351+
* Per :pep:`PEP 594 <594#uu-and-the-uu-encoding>`,
352+
the remaining functionality related to the legacy
353+
`uuencode encoding <https://en.wikipedia.org/wiki/Uuencoding>`__
354+
(also exposed in the to-be-removed :mod:`uu` module) has been deprecated,
355+
and will be removed in Python 3.14:
356+
357+
* :func:`binascii.a2b_uu` and :func:`binascii.b2a_uu`,
358+
low-level interfaces for decoding and encoding uuencode data.
359+
* The ``uu_codec`` :ref:`binary transform <binary-transforms>`
360+
in the :mod:`codecs` module,
361+
implementing uuencode as a Python codec
362+
* Support for decoding non-MIME uuencode payloads
363+
with the :meth:`email.message.Message.get_payload` method
364+
of the legacy :ref:`email.message.Message <compat32_message>`
365+
(:attr:`email.policy.Compat32`) API.
366+
367+
(Contributed by C.A.M. Gerlach in :gh:`92613`.)
368+
351369
* The 3-arg signatures (type, value, traceback) of :meth:`~coroutine.throw`,
352370
:meth:`~generator.throw` and :meth:`~agen.athrow` are deprecated and
353371
may be removed in a fu 67E6 ture version of Python. Use the single-arg versions

Lib/email/message.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ def get_payload(self, i=None, decode=False):
322322
warnings._deprecated(
323323
'Support for decoding legacy uuencoded payloads in messages '
324324
'is deprecated and scheduled for removal in Python {remove}',
325-
remove=(3, 13))
325+
remove=(3, 14))
326326
try:
327327
# We already issue our own warning here
328328
with warnings.catch_warnings():

Lib/encodings/uu_codec.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
### Codec APIs
2424

2525
def uu_encode(input, errors='strict', filename='<data>', mode=0o666):
26-
warnings._deprecated(__name__, remove=(3, 13))
26+
warnings._deprecated(__name__, remove=(3, 14))
2727
assert errors == 'strict'
2828
infile = BytesIO(input)
2929
outfile = BytesIO()
@@ -49,7 +49,7 @@ def uu_encode(input, errors='strict', filename='<data>', mode=0o666):
4949
return (outfile.getvalue(), len(input))
5050

5151
def uu_decode(input, errors='strict'):
52-
warnings._deprecated(__name__, remove=(3, 13))
52+
warnings._deprecated(__name__, remove=(3, 14))
5353
assert errors == 'strict'
5454
infile = BytesIO(input)
5555
outfile = BytesIO()
Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
Per :pep:`PEP 594 <594#uu-and-the-uu-encoding>`, deprecate other
2-
uuencode-related functionality with appropriate warnings, and document them.
1+
Per :pep:`PEP 594 <594#uu-and-the-uu-encoding>`,
2+
deprecate other uuencode-related functionality with appropriate warnings,
3+
and document them as scheduled for removal in Python 3.14.
34
This includes :func:`binascii.a2b_uu`/:func:`binascii.b2a_uu`,
45
the ``uu_codec`` :ref:`binary transform <binary-transforms>`
5-
in the :mod:`codecs` module, and support for decoding uuencode payloads
6-
with the :meth:`email.message.Message.get_payload` method of the legacy
6+
in the :mod:`codecs` module,
7+
and support for decoding uuencode payloads
8+
with the :meth:`email.message.Message.get_payload` method
9+
of the legacy
710
:ref:`email.message.Message <compat32_message>` (``Compat32``) API.
811
Contributed by C.A.M. Gerlach.

Modules/binascii.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ binascii_a2b_uu_impl(PyObject *module, Py_buffer *data)
225225

226226
if (PyErr_WarnEx(PyExc_DeprecationWarning,
227227
"'binascii.a2b_uu' is deprecated and scheduled for "
228-
"removal in Python 3.13",
228+
"removal in Python 3.14",
229229
1)) {
230230
return NULL;
231231
}
@@ -330,7 +330,7 @@ binascii_b2a_uu_impl(PyObject *module, Py_buffer *data, int backtick)
330330

331331
if (PyErr_WarnEx(PyExc_DeprecationWarning,
332332
"'binascii.b2a_uu' is deprecated and scheduled for "
333-
"removal in Python 3.13",
333+
"removal in Python 3.14",
334334
1)) {
335335
return NULL;
336336
}

0 commit comments

Comments
 (0)
0