mirror of https://github.com/python/cpython
gh-91217: deprecate ossaudiodev (GH-91641)
Automerge-Triggered-By: GH:brettcannon
This commit is contained in:
parent
d5a69571f5
commit
ceea0715df
|
@ -884,6 +884,7 @@ Deprecated
|
|||
* :mod:`msilib`
|
||||
* :mod:`nis`
|
||||
* :mod:`nntplib`
|
||||
* :mod:`ossaudiodev`
|
||||
|
||||
(Contributed by Brett Cannon in :issue:`47061`.)
|
||||
|
||||
|
|
|
@ -1,10 +1,13 @@
|
|||
from test import support
|
||||
from test.support import import_helper, warnings_helper
|
||||
import warnings
|
||||
support.requires('audio')
|
||||
|
||||
from test.support import findfile
|
||||
|
||||
ossaudiodev = import_helper.import_module('ossaudiodev')
|
||||
with warnings.catch_warnings():
|
||||
warnings.simplefilter("ignore", DeprecationWarning)
|
||||
ossaudiodev = import_helper.import_module('ossaudiodev')
|
||||
audioop = warnings_helper.import_deprecated('audioop')
|
||||
|
||||
import errno
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Deprecate the ossaudiodev module.
|
|
@ -1117,6 +1117,13 @@ PyInit_ossaudiodev(void)
|
|||
{
|
||||
PyObject *m;
|
||||
|
||||
if (PyErr_WarnEx(PyExc_DeprecationWarning,
|
||||
"'ossaudiodev' is deprecated and slated for removal in "
|
||||
"Python 3.13",
|
||||
7)) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (PyType_Ready(&OSSAudioType) < 0)
|
||||
return NULL;
|
||||
|
||||
|
|
Loading…
Reference in New Issue