From 404c6b7ef07ac1962b877c6019be516006004e06 Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Sun, 17 Apr 2022 12:38:54 -0700 Subject: [PATCH 1/2] deprecate sunau --- Lib/sunau.py | 2 ++ Lib/test/test_ossaudiodev.py | 2 +- Lib/test/test_sunau.py | 2 +- .../next/Library/2022-04-17-12-38-31.gh-issue-91217.55714p.rst | 1 + 4 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 Misc/NEWS.d/next/Library/2022-04-17-12-38-31.gh-issue-91217.55714p.rst diff --git a/Lib/sunau.py b/Lib/sunau.py index 9b3533d93067625..94c42f1582c021d 100644 --- a/Lib/sunau.py +++ b/Lib/sunau.py @@ -106,6 +106,8 @@ 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 37d2d1f5ff44192..63a19a676cba8f8 100644 --- a/Lib/test/test_ossaudiodev.py +++ b/Lib/test/test_ossaudiodev.py @@ -6,10 +6,10 @@ 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 e65742b69f2e9c4..40408b01eda9ac5 100644 --- a/Lib/test/test_sunau.py +++ b/Lib/test/test_sunau.py @@ -3,9 +3,9 @@ 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 000000000000000..4cebfc4222d4cb8 --- /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. From 00997ee7380c6ec146ae9272ce4c79f69a4d299e Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Sat, 23 Apr 2022 14:49:19 -0700 Subject: [PATCH 2/2] Update What's New --- Doc/whatsnew/3.11.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/Doc/whatsnew/3.11.rst b/Doc/whatsnew/3.11.rst index 34742515168c306..91121d3268867d7 100644 --- a/Doc/whatsnew/3.11.rst +++ b/Doc/whatsnew/3.11.rst @@ -930,6 +930,7 @@ Deprecated * :mod:`pipes` * :mod:`sndhdr` * :mod:`spwd` + * :mod:`sunau` (Contributed by Brett Cannon in :issue:`47061`.)