Deprecate sunaudiodev/SUNAUDIODEV for removal in 3.0.
This commit is contained in:
parent
7b5151c1f6
commit
2224817cdf
|
@ -1,6 +1,9 @@
|
||||||
# Symbolic constants for use with sunaudiodev module
|
# Symbolic constants for use with sunaudiodev module
|
||||||
# The names are the same as in audioio.h with the leading AUDIO_
|
# The names are the same as in audioio.h with the leading AUDIO_
|
||||||
# removed.
|
# removed.
|
||||||
|
from warnings import warnpy3k
|
||||||
|
warnpy3k("the SUNAUDIODEV module has been removed in Python 3.0", stacklevel=2)
|
||||||
|
del warnpy3k
|
||||||
|
|
||||||
# Not all values are supported on all releases of SunOS.
|
# Not all values are supported on all releases of SunOS.
|
||||||
|
|
||||||
|
|
|
@ -151,7 +151,9 @@ class TestStdlibRemovals(unittest.TestCase):
|
||||||
'Explorer', 'Finder', 'Netscape',
|
'Explorer', 'Finder', 'Netscape',
|
||||||
'StdSuites', 'SystemEvents', 'Terminal',
|
'StdSuites', 'SystemEvents', 'Terminal',
|
||||||
'cfmfile', 'bundlebuilder', 'buildtools',
|
'cfmfile', 'bundlebuilder', 'buildtools',
|
||||||
'ColorPicker')}
|
'ColorPicker'),
|
||||||
|
'sunos5' : ('sunaudiodev', 'SUNAUDIODEV'),
|
||||||
|
}
|
||||||
optional_modules = ('bsddb185', 'Canvas', 'dl', 'linuxaudiodev', 'imageop',
|
optional_modules = ('bsddb185', 'Canvas', 'dl', 'linuxaudiodev', 'imageop',
|
||||||
'sv')
|
'sv')
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
from test.test_support import findfile, TestFailed, TestSkipped
|
from test.test_support import findfile, TestFailed, TestSkipped, import_module
|
||||||
import sunaudiodev
|
sunaudiodev = import_module('sunaudiodev', deprecated=True)
|
||||||
import os
|
import os
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -37,6 +37,9 @@ Extension Modules
|
||||||
Library
|
Library
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
- The sunaudiodev and SUNAUDIODEV modules have been deprecated for removal in
|
||||||
|
Python 3.0.
|
||||||
|
|
||||||
- The WAIT module from IRIX has been deprecated for removal in Python 3.0.
|
- The WAIT module from IRIX has been deprecated for removal in Python 3.0.
|
||||||
|
|
||||||
- The torgb module from IRIX has been deprecated for removal in Python 3.0.
|
- The torgb module from IRIX has been deprecated for removal in Python 3.0.
|
||||||
|
|
|
@ -452,6 +452,10 @@ void
|
||||||
initsunaudiodev(void)
|
initsunaudiodev(void)
|
||||||
{
|
{
|
||||||
PyObject *m, *d;
|
PyObject *m, *d;
|
||||||
|
|
||||||
|
if (PyErr_WarnPy3k("the sunaudiodev module has been removed in "
|
||||||
|
"Python 3.0", 2) < 0)
|
||||||
|
return;
|
||||||
|
|
||||||
m = Py_InitModule("sunaudiodev", sunaudiodev_methods);
|
m = Py_InitModule("sunaudiodev", sunaudiodev_methods);
|
||||||
if (m == NULL)
|
if (m == NULL)
|
||||||
|
|
Loading…
Reference in New Issue