summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2022-04-25 23:26:43 (GMT)
committerGitHub <noreply@github.com>2022-04-25 23:26:43 (GMT)
commitd174ebe91ebc9f7388a22cc81cdc5f7be8bb8c9b (patch)
tree9d980ed8ab186c2bb4b0c4e16465c995e901857e
parentcd5726fe674eaff442510eeb6c75628858be9e9f (diff)
downloadcpython-d174ebe91ebc9f7388a22cc81cdc5f7be8bb8c9b.zip
cpython-d174ebe91ebc9f7388a22cc81cdc5f7be8bb8c9b.tar.gz
cpython-d174ebe91ebc9f7388a22cc81cdc5f7be8bb8c9b.tar.bz2
gh-91217: deprecate sunau (GH-91866)
-rw-r--r--Doc/whatsnew/3.11.rst1
-rw-r--r--Lib/sunau.py2
-rw-r--r--Lib/test/test_ossaudiodev.py2
-rw-r--r--Lib/test/test_sunau.py2
-rw-r--r--Misc/NEWS.d/next/Library/2022-04-17-12-38-31.gh-issue-91217.55714p.rst1
5 files changed, 6 insertions, 2 deletions
diff --git a/Doc/whatsnew/3.11.rst b/Doc/whatsnew/3.11.rst
index ebaa1e9..8f0d3c7 100644
--- a/Doc/whatsnew/3.11.rst
+++ b/Doc/whatsnew/3.11.rst
@@ -1068,6 +1068,7 @@ Deprecated
* :mod:`pipes`
* :mod:`sndhdr`
* :mod:`spwd`
+ * :mod:`sunau`
(Contributed by Brett Cannon in :issue:`47061`.)
diff --git a/Lib/sunau.py b/Lib/sunau.py
index 9b3533d..94c42f1 100644
--- a/Lib/sunau.py
+++ b/Lib/sunau.py
@@ -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')
diff --git a/Lib/test/test_ossaudiodev.py b/Lib/test/test_ossaudiodev.py
index 3275333..2cc641a 100644
--- a/Lib/test/test_ossaudiodev.py
+++ b/Lib/test/test_ossaudiodev.py
@@ -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
diff --git a/Lib/test/test_sunau.py b/Lib/test/test_sunau.py
index e65742b..40408b0 100644
--- a/Lib/test/test_sunau.py
+++ b/Lib/test/test_sunau.py
@@ -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
index 0000000..4cebfc4
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2022-04-17-12-38-31.gh-issue-91217.55714p.rst
@@ -0,0 +1 @@
+Deprecate the sunau module.