mirror of
https://github.com/python/cpython.git
synced 2025-08-01 07:33:08 +00:00
The linuxaudidev module has been deprecated for removal in Python 3.0.
This commit is contained in:
parent
27508d4eb9
commit
df0a717037
5 changed files with 10 additions and 2 deletions
|
@ -55,6 +55,8 @@ Multimedia
|
||||||
--- Play audio data on the Linux audio device. Replaced in Python 2.3 by the
|
--- Play audio data on the Linux audio device. Replaced in Python 2.3 by the
|
||||||
:mod:`ossaudiodev` module.
|
:mod:`ossaudiodev` module.
|
||||||
|
|
||||||
|
.. warning:: The linuxaudiodev module has been removed in Python 3.0.
|
||||||
|
|
||||||
:mod:`sunaudio`
|
:mod:`sunaudio`
|
||||||
--- Interpret Sun audio headers (may become obsolete or a tool/demo).
|
--- Interpret Sun audio headers (may become obsolete or a tool/demo).
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ test_support.requires('audio')
|
||||||
from test.test_support import findfile, TestSkipped, run_unittest
|
from test.test_support import findfile, TestSkipped, run_unittest
|
||||||
|
|
||||||
import errno
|
import errno
|
||||||
import linuxaudiodev
|
linuxaudiodev = test_support.import_module('linuxaudiodev', deprecated=True)
|
||||||
import sys
|
import sys
|
||||||
import sunaudio
|
import sunaudio
|
||||||
import audioop
|
import audioop
|
||||||
|
|
|
@ -133,7 +133,7 @@ class TestStdlibRemovals(unittest.TestCase):
|
||||||
'ihooks')
|
'ihooks')
|
||||||
inclusive_platforms = {'irix':('pure',)}
|
inclusive_platforms = {'irix':('pure',)}
|
||||||
# XXX Don't know if lib-tk is only installed if _tkinter is built.
|
# XXX Don't know if lib-tk is only installed if _tkinter is built.
|
||||||
optional_modules = ('bsddb185', 'Canvas', 'dl')
|
optional_modules = ('bsddb185', 'Canvas', 'dl', 'linuxaudiodev')
|
||||||
|
|
||||||
def check_removal(self, module_name, optional=False):
|
def check_removal(self, module_name, optional=False):
|
||||||
"""Make sure the specified module, when imported, raises a
|
"""Make sure the specified module, when imported, raises a
|
||||||
|
|
|
@ -23,6 +23,8 @@ Extension Modules
|
||||||
Library
|
Library
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
- The linuxaudiodev module has been deprecated for removal in Python 3.0.
|
||||||
|
|
||||||
- The ihooks module has been deprecated for removal in Python 3.0.
|
- The ihooks module has been deprecated for removal in Python 3.0.
|
||||||
|
|
||||||
- The fpformat module has been deprecated for removal in Python 3.0.
|
- The fpformat module has been deprecated for removal in Python 3.0.
|
||||||
|
|
|
@ -470,6 +470,10 @@ initlinuxaudiodev(void)
|
||||||
{
|
{
|
||||||
PyObject *m;
|
PyObject *m;
|
||||||
|
|
||||||
|
if (PyErr_WarnPy3k("the linuxaudiodev module has been removed in "
|
||||||
|
"Python 3.0; use the ossaudiodev module instead", 2) < 0)
|
||||||
|
return;
|
||||||
|
|
||||||
m = Py_InitModule("linuxaudiodev", linuxaudiodev_methods);
|
m = Py_InitModule("linuxaudiodev", linuxaudiodev_methods);
|
||||||
if (m == NULL)
|
if (m == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue