summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorBrett Cannon <bcannon@gmail.com>2008-05-16 00:10:24 (GMT)
committerBrett Cannon <bcannon@gmail.com>2008-05-16 00:10:24 (GMT)
commit2224817cdf2dd1bfd3efd8a0498f0c996fbc133e (patch)
tree755216525dd7ba3befa1557ca8107ebf0729420a /Lib
parent7b5151c1f69f164d38c5f4719f20f9723a9585e4 (diff)
downloadcpython-2224817cdf2dd1bfd3efd8a0498f0c996fbc133e.zip
cpython-2224817cdf2dd1bfd3efd8a0498f0c996fbc133e.tar.gz
cpython-2224817cdf2dd1bfd3efd8a0498f0c996fbc133e.tar.bz2
Deprecate sunaudiodev/SUNAUDIODEV for removal in 3.0.
Diffstat (limited to 'Lib')
-rwxr-xr-xLib/plat-sunos5/SUNAUDIODEV.py3
-rw-r--r--Lib/test/test_py3kwarn.py4
-rw-r--r--Lib/test/test_sunaudiodev.py4
3 files changed, 8 insertions, 3 deletions
diff --git a/Lib/plat-sunos5/SUNAUDIODEV.py b/Lib/plat-sunos5/SUNAUDIODEV.py
index 632139f..25599bb 100755
--- a/Lib/plat-sunos5/SUNAUDIODEV.py
+++ b/Lib/plat-sunos5/SUNAUDIODEV.py
@@ -1,6 +1,9 @@
# Symbolic constants for use with sunaudiodev module
# The names are the same as in audioio.h with the leading AUDIO_
# 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.
diff --git a/Lib/test/test_py3kwarn.py b/Lib/test/test_py3kwarn.py
index b35314f..2561f2a 100644
--- a/Lib/test/test_py3kwarn.py
+++ b/Lib/test/test_py3kwarn.py
@@ -151,7 +151,9 @@ class TestStdlibRemovals(unittest.TestCase):
'Explorer', 'Finder', 'Netscape',
'StdSuites', 'SystemEvents', 'Terminal',
'cfmfile', 'bundlebuilder', 'buildtools',
- 'ColorPicker')}
+ 'ColorPicker'),
+ 'sunos5' : ('sunaudiodev', 'SUNAUDIODEV'),
+ }
optional_modules = ('bsddb185', 'Canvas', 'dl', 'linuxaudiodev', 'imageop',
'sv')
diff --git a/Lib/test/test_sunaudiodev.py b/Lib/test/test_sunaudiodev.py
index 470fff8..2c5e7d4 100644
--- a/Lib/test/test_sunaudiodev.py
+++ b/Lib/test/test_sunaudiodev.py
@@ -1,5 +1,5 @@
-from test.test_support import findfile, TestFailed, TestSkipped
-import sunaudiodev
+from test.test_support import findfile, TestFailed, TestSkipped, import_module
+sunaudiodev = import_module('sunaudiodev', deprecated=True)
import os
try: