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
{
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;