Skip to content

Commit

Permalink
gh-91217: deprecate sunau (GH-91866)
Browse files Browse the repository at this point in the history
  • Loading branch information
brettcannon committed Apr 25, 2022
1 parent cd5726f commit d174ebe
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions Doc/whatsnew/3.11.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1068,6 +1068,7 @@ Deprecated
* :mod:`pipes`
* :mod:`sndhdr`
* :mod:`spwd`
* :mod:`sunau`

(Contributed by Brett Cannon in :issue:`47061`.)

Expand Down
2 changes: 2 additions & 0 deletions Lib/sunau.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_ossaudiodev.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
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

Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_sunau.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")


Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Deprecate the sunau module.

0 comments on commit d174ebe

Please sign in to comment.