]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-91217: deprecate sunau (GH-91866)
authorBrett Cannon <brett@python.org>
Mon, 25 Apr 2022 23:26:43 +0000 (16:26 -0700)
committerGitHub <noreply@github.com>
Mon, 25 Apr 2022 23:26:43 +0000 (16:26 -0700)
Doc/whatsnew/3.11.rst
Lib/sunau.py
Lib/test/test_ossaudiodev.py
Lib/test/test_sunau.py
Misc/NEWS.d/next/Library/2022-04-17-12-38-31.gh-issue-91217.55714p.rst [new file with mode: 0644]

index ebaa1e993e276f380616779493e74a1cfc1e9669..8f0d3c7c7099a37063f28b9f070f45087970618f 100644 (file)
@@ -1068,6 +1068,7 @@ Deprecated
   * :mod:`pipes`
   * :mod:`sndhdr`
   * :mod:`spwd`
+  * :mod:`sunau`
 
   (Contributed by Brett Cannon in :issue:`47061`.)
 
index 9b3533d93067625b31f3fca76f1de0a85a2661b3..94c42f1582c021db4b8862d6efe2e13af35948ed 100644 (file)
@@ -106,6 +106,8 @@ is destroyed.
 from collections import namedtuple
 import warnings
 
+warnings._deprecated(__name__, remove=(3, 13))
+
 
 _sunau_params = namedtuple('_sunau_params',
                            'nchannels sampwidth framerate nframes comptype compname')
index 3275333545882127aab9e5d57486d116e9c7ba72..2cc641a49b63a584063c299b9c125c55030acd0e 100644 (file)
@@ -9,10 +9,10 @@ with warnings.catch_warnings():
     warnings.simplefilter("ignore", DeprecationWarning)
     ossaudiodev = import_helper.import_module('ossaudiodev')
 audioop = warnings_helper.import_deprecated('audioop')
+sunau = warnings_helper.import_deprecated('sunau')
 
 import errno
 import sys
-import sunau
 import time
 import unittest
 
index e65742b69f2e9c4b2144e071dd7dadf16fc9c5b2..40408b01eda9ac5dc331bbf24fa62c56fbb15235 100644 (file)
@@ -3,9 +3,9 @@ from test import audiotests
 import io
 import struct
 import sys
-import sunau
 from test.support import warnings_helper
 
+sunau = warnings_helper.import_deprecated("sunau")
 audioop = warnings_helper.import_deprecated("audioop")
 
 
diff --git a/Misc/NEWS.d/next/Library/2022-04-17-12-38-31.gh-issue-91217.55714p.rst b/Misc/NEWS.d/next/Library/2022-04-17-12-38-31.gh-issue-91217.55714p.rst
new file mode 100644 (file)
index 0000000..4cebfc4
--- /dev/null
@@ -0,0 +1 @@
+Deprecate the sunau module.