From 7b020ce8e9b3b14359e0a492ddb179b23e1a988b Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Sun, 7 Aug 2022 12:18:55 +0300 Subject: [PATCH 01/11] gh-80480 Emit DeprecationWarning for array's 'u' type code --- Doc/library/array.rst | 2 +- Doc/whatsnew/3.12.rst | 7 +++++- Lib/test/test_array.py | 22 ++++++++++++++++++- Lib/test/test_buffer.py | 2 ++ Lib/test/test_csv.py | 1 + Lib/test/test_re.py | 5 +++-- ...2-08-07-11-10-26.gh-issue-80480.IFccj3.rst | 2 ++ Modules/arraymodule.c | 9 ++++++++ 8 files changed, 45 insertions(+), 5 deletions(-) create mode 100644 Misc/NEWS.d/next/Library/2022-08-07-11-10-26.gh-issue-80480.IFccj3.rst diff --git a/Doc/library/array.rst b/Doc/library/array.rst index 975670cc81a202..e282646f8fb896 100644 --- a/Doc/library/array.rst +++ b/Doc/library/array.rst @@ -55,7 +55,7 @@ Notes: ``Py_UNICODE``. This change doesn't affect its behavior because ``Py_UNICODE`` is alias of ``wchar_t`` since Python 3.3. - .. deprecated-removed:: 3.3 4.0 + .. deprecated-removed:: 3.3 3.14 The actual representation of values is determined by the machine architecture diff --git a/Doc/whatsnew/3.12.rst b/Doc/whatsnew/3.12.rst index ddf9e1f6a59b47..00f3e9d7538f2d 100644 --- a/Doc/whatsnew/3.12.rst +++ b/Doc/whatsnew/3.12.rst @@ -205,8 +205,13 @@ Pending Removal in Python 3.14 (Contributed by Jason R. Coombs and Hugo van Kemenade in :gh:`93963`.) +APIs: + * Creating :c:data:`immutable types ` with mutable - bases using the C API. + bases using the C API (:gh:`95388`) +* :mod:`array`'s ``'u'`` format code, deprecated in docs since Python 3.3, + emits :exc:`DeprecationWarning` since 3.12 + (contributed by Hugo van Kemenade in :gh:`80480`) Pending Removal in Future Versions diff --git a/Lib/test/test_array.py b/Lib/test/test_array.py index 5b2c107a6044bd..c6b886f0eacce2 100755 --- a/Lib/test/test_array.py +++ b/Lib/test/test_array.py @@ -13,11 +13,14 @@ import operator import struct import sys +import warnings import array from array import _array_reconstructor as array_reconstructor -sizeof_wchar = array.array('u').itemsize +with warnings.catch_warnings(): + warnings.simplefilter('ignore', DeprecationWarning) + sizeof_wchar = array.array('u').itemsize class ArraySubclass(array.array): @@ -93,8 +96,16 @@ def test_empty(self): UTF32_LE = 20 UTF32_BE = 21 + class ArrayReconstructorTest(unittest.TestCase): + def setUp(self): + warnings.filterwarnings( + "ignore", + message="The 'u' type code is deprecated and " + "will be removed in Python 3.14", + category=DeprecationWarning) + def test_error(self): self.assertRaises(TypeError, array_reconstructor, "", "b", 0, b"") @@ -1205,6 +1216,15 @@ def test_issue17223(self): self.assertRaises(ValueError, a.tounicode) self.assertRaises(ValueError, str, a) + def test_typecode_u_deprecation(self): + with warnings.catch_warnings(record=True) as w: + warnings.simplefilter("always", DeprecationWarning) + array.array("u") + self.assertGreaterEqual(len(w), 1) + for warning in w: + self.assertIs(warning.category, DeprecationWarning) + + class NumberTest(BaseTest): def test_extslice(self): diff --git a/Lib/test/test_buffer.py b/Lib/test/test_buffer.py index 468c6ea9def923..194067a8d39528 100644 --- a/Lib/test/test_buffer.py +++ b/Lib/test/test_buffer.py @@ -23,6 +23,7 @@ import sys, array, io, os from decimal import Decimal from fractions import Fraction +from test.support import warnings_helper try: from _testbuffer import * @@ -3174,6 +3175,7 @@ def cmptest(testcase, a, b, m, singleitem): self.assertEqual(m.tobytes(), a.tobytes()) cmptest(self, a, b, m, singleitem) + @warnings_helper.ignore_warnings(category=DeprecationWarning) # gh-80480 array('u') def test_memoryview_compare_special_cases(self): a = array.array('L', [1, 2, 3]) diff --git a/Lib/test/test_csv.py b/Lib/test/test_csv.py index 95a19dd46cb4ff..07f65b6281c194 100644 --- a/Lib/test/test_csv.py +++ b/Lib/test/test_csv.py @@ -880,6 +880,7 @@ def test_float_write(self): fileobj.seek(0) self.assertEqual(fileobj.read(), expected) + @warnings_helper.ignore_warnings(category=DeprecationWarning) # gh-80480 array('u') def test_char_write(self): import array, string a = array.array('u', string.ascii_letters) diff --git a/Lib/test/test_re.py b/Lib/test/test_re.py index 3f0f84ea8cee6f..a5d0d896b756fe 100644 --- a/Lib/test/test_re.py +++ b/Lib/test/test_re.py @@ -1,7 +1,7 @@ from test.support import (gc_collect, bigmemtest, _2G, cpython_only, captured_stdout, check_disallow_instantiation, is_emscripten, is_wasi, - SHORT_TIMEOUT) + warnings_helper, SHORT_TIMEOUT) import locale import re import string @@ -1517,10 +1517,11 @@ def test_bug_6561(self): for x in not_decimal_digits: self.assertIsNone(re.match(r'^\d$', x)) + @warnings_helper.ignore_warnings(category=DeprecationWarning) # gh-80480 array('u') def test_empty_array(self): # SF buf 1647541 import array - for typecode in 'bBuhHiIlLfd': + for typecode in 'bBhuHiIlLfd': a = array.array(typecode) self.assertIsNone(re.compile(b"bla").match(a)) self.assertEqual(re.compile(b"").match(a).groups(), ()) diff --git a/Misc/NEWS.d/next/Library/2022-08-07-11-10-26.gh-issue-80480.IFccj3.rst b/Misc/NEWS.d/next/Library/2022-08-07-11-10-26.gh-issue-80480.IFccj3.rst new file mode 100644 index 00000000000000..2d4956ffa08035 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2022-08-07-11-10-26.gh-issue-80480.IFccj3.rst @@ -0,0 +1,2 @@ +Emit :exc:`DeprecationWarning` for :mod:`array`'s ``'u'`` type code, +deprecated in docs since Python 3.3. diff --git a/Modules/arraymodule.c b/Modules/arraymodule.c index 924fbf29bfb889..147d607fb226f0 100644 --- a/Modules/arraymodule.c +++ b/Modules/arraymodule.c @@ -2620,6 +2620,15 @@ array_new(PyTypeObject *type, PyObject *args, PyObject *kwds) if (!PyArg_ParseTuple(args, "C|O:array", &c, &initial)) return NULL; + if (c == 'u') { + if (PyErr_WarnEx(PyExc_DeprecationWarning, + "The 'u' type code is deprecated and " + "will be removed in Python 3.14", + 1)) { + return NULL; + } + } + if (PySys_Audit("array.__new__", "CO", c, initial ? initial : Py_None) < 0) { return NULL; From 19ed73c37624592cae50c340fe09721c5e8883d2 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Sun, 14 Aug 2022 11:47:02 +0300 Subject: [PATCH 02/11] gh-80480: Simplify test --- Lib/test/test_array.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Lib/test/test_array.py b/Lib/test/test_array.py index c6b886f0eacce2..88977879b0e86e 100755 --- a/Lib/test/test_array.py +++ b/Lib/test/test_array.py @@ -1217,12 +1217,8 @@ def test_issue17223(self): self.assertRaises(ValueError, str, a) def test_typecode_u_deprecation(self): - with warnings.catch_warnings(record=True) as w: - warnings.simplefilter("always", DeprecationWarning) + with self.assertWarns(DeprecationWarning): array.array("u") - self.assertGreaterEqual(len(w), 1) - for warning in w: - self.assertIs(warning.category, DeprecationWarning) class NumberTest(BaseTest): From 2fb57bc5ad9744f62b7f0684d97143be3fb27a22 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Tue, 23 May 2023 15:24:29 +0300 Subject: [PATCH 03/11] Bump removal for Python 3.15 --- Doc/library/array.rst | 2 +- Doc/whatsnew/3.12.rst | 3 --- Doc/whatsnew/3.13.rst | 5 +++++ Lib/test/test_array.py | 2 +- Modules/arraymodule.c | 2 +- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Doc/library/array.rst b/Doc/library/array.rst index 556ece931fd7d3..f2e8f3e5c7e075 100644 --- a/Doc/library/array.rst +++ b/Doc/library/array.rst @@ -55,7 +55,7 @@ Notes: ``Py_UNICODE``. This change doesn't affect its behavior because ``Py_UNICODE`` is alias of ``wchar_t`` since Python 3.3. - .. deprecated-removed:: 3.3 3.14 + .. deprecated-removed:: 3.3 3.15 The actual representation of values is determined by the machine architecture diff --git a/Doc/whatsnew/3.12.rst b/Doc/whatsnew/3.12.rst index 082fd5e5e21e40..ec7f4d21d17387 100644 --- a/Doc/whatsnew/3.12.rst +++ b/Doc/whatsnew/3.12.rst @@ -854,9 +854,6 @@ APIs: * Creating :c:data:`immutable types ` with mutable bases using the C API (:gh:`95388`) -* :mod:`array`'s ``'u'`` format code, deprecated in docs since Python 3.3, - emits :exc:`DeprecationWarning` since 3.12 - (contributed by Hugo van Kemenade in :gh:`80480`) * Deprecated :class:`collections.abc.ByteString`. Prefer :class:`Sequence` or :class:`collections.abc.Buffer`. diff --git a/Doc/whatsnew/3.13.rst b/Doc/whatsnew/3.13.rst index 8256f429183a3a..7b3495505e2073 100644 --- a/Doc/whatsnew/3.13.rst +++ b/Doc/whatsnew/3.13.rst @@ -97,7 +97,12 @@ Optimizations Deprecated ========== +Pending Removal in Python 3.15 +------------------------------ +* :mod:`array`'s ``'u'`` format code, deprecated in docs since Python 3.3, + emits :exc:`DeprecationWarning` since 3.13 + (contributed by Hugo van Kemenade in :gh:`80480`) Removed ======= diff --git a/Lib/test/test_array.py b/Lib/test/test_array.py index 88977879b0e86e..7c1ba5dd8b54c5 100755 --- a/Lib/test/test_array.py +++ b/Lib/test/test_array.py @@ -103,7 +103,7 @@ def setUp(self): warnings.filterwarnings( "ignore", message="The 'u' type code is deprecated and " - "will be removed in Python 3.14", + "will be removed in Python 3.15", category=DeprecationWarning) def test_error(self): diff --git a/Modules/arraymodule.c b/Modules/arraymodule.c index b1b19ffefe2d99..6f7afac75ad267 100644 --- a/Modules/arraymodule.c +++ b/Modules/arraymodule.c @@ -2617,7 +2617,7 @@ array_new(PyTypeObject *type, PyObject *args, PyObject *kwds) if (c == 'u') { if (PyErr_WarnEx(PyExc_DeprecationWarning, "The 'u' type code is deprecated and " - "will be removed in Python 3.14", + "will be removed in Python 3.15", 1)) { return NULL; } From c9637c928203e40d021c188bef54409fd9db5d0d Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Sun, 4 Jun 2023 19:52:25 +0300 Subject: [PATCH 04/11] Bump removal for Python 3.16 --- Doc/library/array.rst | 2 +- Doc/whatsnew/3.13.rst | 5 ++++- Lib/test/test_array.py | 2 +- Lib/test/test_csv.py | 1 - Modules/arraymodule.c | 2 +- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Doc/library/array.rst b/Doc/library/array.rst index 0da26906a92fb6..0afc217642a756 100644 --- a/Doc/library/array.rst +++ b/Doc/library/array.rst @@ -57,7 +57,7 @@ Notes: ``Py_UNICODE``. This change doesn't affect its behavior because ``Py_UNICODE`` is alias of ``wchar_t`` since Python 3.3. - .. deprecated-removed:: 3.3 3.15 + .. deprecated-removed:: 3.3 3.16 Please migrate to ``'w'`` typecode. diff --git a/Doc/whatsnew/3.13.rst b/Doc/whatsnew/3.13.rst index 78127ffef9ff42..8af47e34ee64f7 100644 --- a/Doc/whatsnew/3.13.rst +++ b/Doc/whatsnew/3.13.rst @@ -130,9 +130,12 @@ Pending Removal in Python 3.15 They will be removed in Python 3.15. (Contributed by Victor Stinner in :gh:`105096`.) +Pending Removal in Python 3.16 +------------------------------ + * :mod:`array`'s ``'u'`` format code, deprecated in docs since Python 3.3, emits :exc:`DeprecationWarning` since 3.13 - and will be removed in Python 3.15. + and will be removed in Python 3.16. (contributed by Hugo van Kemenade in :gh:`80480`) Removed diff --git a/Lib/test/test_array.py b/Lib/test/test_array.py index ac0ac36dd3e7f1..f6bf9e6c5ea871 100755 --- a/Lib/test/test_array.py +++ b/Lib/test/test_array.py @@ -103,7 +103,7 @@ def setUp(self): warnings.filterwarnings( "ignore", message="The 'u' type code is deprecated and " - "will be removed in Python 3.15", + "will be removed in Python 3.16", category=DeprecationWarning) def test_error(self): diff --git a/Lib/test/test_csv.py b/Lib/test/test_csv.py index b921ce36fb485e..6a4180e6d1b0a1 100644 --- a/Lib/test/test_csv.py +++ b/Lib/test/test_csv.py @@ -953,7 +953,6 @@ def test_float_write(self): fileobj.seek(0) self.assertEqual(fileobj.read(), expected) - @warnings_helper.ignore_warnings(category=DeprecationWarning) # gh-80480 array('u') def test_char_write(self): import array, string a = array.array('w', string.ascii_letters) diff --git a/Modules/arraymodule.c b/Modules/arraymodule.c index b2f5af8e895e34..ad72bcce1a9e63 100644 --- a/Modules/arraymodule.c +++ b/Modules/arraymodule.c @@ -2677,7 +2677,7 @@ array_new(PyTypeObject *type, PyObject *args, PyObject *kwds) if (c == 'u') { if (PyErr_WarnEx(PyExc_DeprecationWarning, "The 'u' type code is deprecated and " - "will be removed in Python 3.15", + "will be removed in Python 3.16", 1)) { return NULL; } From a0f256c8a8aff20f70f6c6fdf385960692f65466 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Sun, 4 Jun 2023 19:57:14 +0300 Subject: [PATCH 05/11] Remove duplicate entry --- Doc/whatsnew/3.12.rst | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Doc/whatsnew/3.12.rst b/Doc/whatsnew/3.12.rst index 3cf55ca7c26bec..c3c59e7540e826 100644 --- a/Doc/whatsnew/3.12.rst +++ b/Doc/whatsnew/3.12.rst @@ -1106,9 +1106,6 @@ Pending Removal in Python 3.14 APIs: -* Creating :c:data:`immutable types ` with mutable - bases using the C API (:gh:`95388`) - * Deprecated :class:`collections.abc.ByteString`. Prefer :class:`Sequence` or :class:`collections.abc.Buffer`. For use in typing, prefer a union, like ``bytes | bytearray``, or :class:`collections.abc.Buffer`. @@ -1118,7 +1115,7 @@ APIs: :exc:`DeprecationWarning` to be emitted when it is used. * Creating immutable types (:data:`Py_TPFLAGS_IMMUTABLETYPE`) with mutable - bases using the C API. + bases using the C API (:gh:`95388`). * Deprecated the *isdst* parameter in :func:`email.utils.localtime`. (Contributed by Alan Williams in :gh:`72346`.) From dc167afce25bf132a6d23d5ff08c8c00421514cf Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Mon, 5 Jun 2023 08:55:24 +0300 Subject: [PATCH 06/11] Add 'w' typecode to test --- Doc/whatsnew/3.12.rst | 2 -- Lib/test/test_re.py | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Doc/whatsnew/3.12.rst b/Doc/whatsnew/3.12.rst index c3c59e7540e826..dfc82d52b19edb 100644 --- a/Doc/whatsnew/3.12.rst +++ b/Doc/whatsnew/3.12.rst @@ -1104,8 +1104,6 @@ Pending Removal in Python 3.14 (Contributed by Jason R. Coombs and Hugo van Kemenade in :gh:`93963`.) -APIs: - * Deprecated :class:`collections.abc.ByteString`. Prefer :class:`Sequence` or :class:`collections.abc.Buffer`. For use in typing, prefer a union, like ``bytes | bytearray``, or :class:`collections.abc.Buffer`. diff --git a/Lib/test/test_re.py b/Lib/test/test_re.py index e0413e51c3ba27..d1575dc2c34785 100644 --- a/Lib/test/test_re.py +++ b/Lib/test/test_re.py @@ -1526,7 +1526,7 @@ def test_bug_6561(self): def test_empty_array(self): # SF buf 1647541 import array - for typecode in 'bBhuHiIlLfd': + for typecode in 'bBhuwHiIlLfd': a = array.array(typecode) self.assertIsNone(re.compile(b"bla").match(a)) self.assertEqual(re.compile(b"").match(a).groups(), ()) From 5956887b33e788cf55ca98a6024e010024ce860c Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Tue, 6 Jun 2023 17:15:34 +0300 Subject: [PATCH 07/11] Suggest 'w' as a replacement --- Doc/whatsnew/3.13.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/Doc/whatsnew/3.13.rst b/Doc/whatsnew/3.13.rst index 8af47e34ee64f7..6e5b1dd31ddd81 100644 --- a/Doc/whatsnew/3.13.rst +++ b/Doc/whatsnew/3.13.rst @@ -136,6 +136,7 @@ Pending Removal in Python 3.16 * :mod:`array`'s ``'u'`` format code, deprecated in docs since Python 3.3, emits :exc:`DeprecationWarning` since 3.13 and will be removed in Python 3.16. + Use the ``'w'`` format code instead. (contributed by Hugo van Kemenade in :gh:`80480`) Removed From e3b96bb6eec9bbc6f4c8cfda012decdcd0380795 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Tue, 6 Jun 2023 17:16:28 +0300 Subject: [PATCH 08/11] Move warning after audit --- Modules/arraymodule.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Modules/arraymodule.c b/Modules/arraymodule.c index ad72bcce1a9e63..1a5993819b2e13 100644 --- a/Modules/arraymodule.c +++ b/Modules/arraymodule.c @@ -2674,6 +2674,11 @@ array_new(PyTypeObject *type, PyObject *args, PyObject *kwds) if (!PyArg_ParseTuple(args, "C|O:array", &c, &initial)) return NULL; + if (PySys_Audit("array.__new__", "CO", + c, initial ? initial : Py_None) < 0) { + return NULL; + } + if (c == 'u') { if (PyErr_WarnEx(PyExc_DeprecationWarning, "The 'u' type code is deprecated and " @@ -2683,11 +2688,6 @@ array_new(PyTypeObject *type, PyObject *args, PyObject *kwds) } } - if (PySys_Audit("array.__new__", "CO", - c, initial ? initial : Py_None) < 0) { - return NULL; - } - bool is_unicode = c == 'u' || c == 'w'; if (initial && !is_unicode) { From 8a0c72828e0051d74a41392f589dac2191754ca1 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Tue, 6 Jun 2023 21:03:25 +0300 Subject: [PATCH 09/11] Remove unrelated --- Doc/whatsnew/3.12.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/whatsnew/3.12.rst b/Doc/whatsnew/3.12.rst index dfc82d52b19edb..daae9495005277 100644 --- a/Doc/whatsnew/3.12.rst +++ b/Doc/whatsnew/3.12.rst @@ -1113,7 +1113,7 @@ Pending Removal in Python 3.14 :exc:`DeprecationWarning` to be emitted when it is used. * Creating immutable types (:data:`Py_TPFLAGS_IMMUTABLETYPE`) with mutable - bases using the C API (:gh:`95388`). + bases using the C API. * Deprecated the *isdst* parameter in :func:`email.utils.localtime`. (Contributed by Alan Williams in :gh:`72346`.) From 6e7bff63c593afd4c1f5983ed117cb54a76cd38b Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Tue, 6 Jun 2023 21:33:07 +0300 Subject: [PATCH 10/11] Move 'u' test to own method --- Lib/test/test_buffer.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/Lib/test/test_buffer.py b/Lib/test/test_buffer.py index cb13ca95c1ffe2..8d6902e004689b 100644 --- a/Lib/test/test_buffer.py +++ b/Lib/test/test_buffer.py @@ -3184,7 +3184,6 @@ def cmptest(testcase, a, b, m, singleitem): self.assertEqual(m.tobytes(), a.tobytes()) cmptest(self, a, b, m, singleitem) - @warnings_helper.ignore_warnings(category=DeprecationWarning) # gh-80480 array('u') def test_memoryview_compare_special_cases(self): a = array.array('L', [1, 2, 3]) @@ -3219,12 +3218,6 @@ def test_memoryview_compare_special_cases(self): nd[0] = (-1, float('nan')) self.assertNotEqual(memoryview(nd), nd) - # Depends on issue #15625: the struct module does not understand 'u'. - a = array.array('u', 'xyz') - v = memoryview(a) - self.assertNotEqual(a, v) - self.assertNotEqual(v, a) - # Some ctypes format strings are unknown to the struct module. if ctypes: # format: "T{>l:x:>l:y:}" @@ -3238,6 +3231,15 @@ class BEPoint(ctypes.BigEndianStructure): self.assertNotEqual(point, a) self.assertRaises(NotImplementedError, a.tolist) + @warnings_helper.ignore_warnings(category=DeprecationWarning) # gh-80480 array('u') + def test_memoryview_compare_special_cases_deprecated_u_type_code(self): + + # Depends on issue #15625: the struct module does not understand 'u'. + a = array.array('u', 'xyz') + v = memoryview(a) + self.assertNotEqual(a, v) + self.assertNotEqual(v, a) + def test_memoryview_compare_ndim_zero(self): nd1 = ndarray(1729, shape=[], format='@L') From f480c58aa06ac97e3d2df1f3dc7919cdcd7a4004 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Wed, 7 Jun 2023 21:08:12 +0300 Subject: [PATCH 11/11] Remove subsection titles, they're for deprecations from earlier releases --- Doc/whatsnew/3.13.rst | 6 ------ 1 file changed, 6 deletions(-) diff --git a/Doc/whatsnew/3.13.rst b/Doc/whatsnew/3.13.rst index 6e5b1dd31ddd81..e63134a326a37e 100644 --- a/Doc/whatsnew/3.13.rst +++ b/Doc/whatsnew/3.13.rst @@ -122,17 +122,11 @@ Optimizations Deprecated ========== -Pending Removal in Python 3.15 ------------------------------- - * :mod:`wave`: Deprecate the ``getmark()``, ``setmark()`` and ``getmarkers()`` methods of the :class:`wave.Wave_read` and :class:`wave.Wave_write` classes. They will be removed in Python 3.15. (Contributed by Victor Stinner in :gh:`105096`.) -Pending Removal in Python 3.16 ------------------------------- - * :mod:`array`'s ``'u'`` format code, deprecated in docs since Python 3.3, emits :exc:`DeprecationWarning` since 3.13 and will be removed in Python 3.16.