]> granicus.if.org Git - python/commitdiff
Deprecate al/AL for removal in 3.0.
authorBrett Cannon <bcannon@gmail.com>
Wed, 14 May 2008 01:08:21 +0000 (01:08 +0000)
committerBrett Cannon <bcannon@gmail.com>
Wed, 14 May 2008 01:08:21 +0000 (01:08 +0000)
Lib/plat-irix5/AL.py
Lib/plat-irix6/AL.py
Lib/test/test_al.py
Lib/test/test_py3kwarn.py
Misc/NEWS
Modules/almodule.c

index ec941a2bac0acdd67676fce720aa9c8a972c073b..3b43d2c8bc6f7037ce8fed34ea572770f38675fd 100755 (executable)
@@ -1,3 +1,7 @@
+from warnings import warnpy3k
+warnpy3k("the AL module has been removed in Python 3.0", stacklevel=2)
+del warnpy3k
+
 RATE_48000      = 48000
 RATE_44100      = 44100
 RATE_32000      = 32000
index ec941a2bac0acdd67676fce720aa9c8a972c073b..3b43d2c8bc6f7037ce8fed34ea572770f38675fd 100644 (file)
@@ -1,3 +1,7 @@
+from warnings import warnpy3k
+warnpy3k("the AL module has been removed in Python 3.0", stacklevel=2)
+del warnpy3k
+
 RATE_48000      = 48000
 RATE_44100      = 44100
 RATE_32000      = 32000
index 54496c12196630534ac33cbe19a112be0231db97..688576dc6ad74c439e2e4e70219f3b74bc69bccd 100755 (executable)
@@ -2,8 +2,8 @@
 """Whimpy test script for the al module
    Roger E. Masse
 """
-import al
-from test.test_support import verbose
+from test.test_support import verbose, import_module
+al = import_module('al', deprecated=True)
 
 alattrs = ['__doc__', '__name__', 'getdefault', 'getminmax', 'getname', 'getparams',
            'newconfig', 'openport', 'queryparams', 'setparams']
index be18188a7221ce71d306a9551cd1d705c71102ff..ecd94c41eb221e21c8afaf26bef2660be5c5929c 100644 (file)
@@ -131,7 +131,7 @@ class TestStdlibRemovals(unittest.TestCase):
     all_platforms = ('audiodev', 'imputil', 'mutex', 'user', 'new', 'rexec',
                         'Bastion', 'compiler', 'dircache', 'fpformat',
                         'ihooks', 'mhlib')
-    inclusive_platforms = {'irix' : ('pure',),
+    inclusive_platforms = {'irix' : ('pure', 'AL', 'al'),
                           'darwin' : ('autoGIL', 'Carbon', 'OSATerminology',
                                       'icglue', 'Nav', 'MacOS', 'aepack', 'aetools',
                                       'aetypes', 'applesingle', 'appletrawmain',
index 9869c0f13f5b010ace3040c67aa7dfe3efbac5bc..8dadbe7298f09173f1ed113cf5fdddf01661f7e9 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -30,6 +30,9 @@ Extension Modules
 Library
 -------
 
+- The al and AL modules for IRIX have been deprecated for removal in
+  Python 3.0.
+
 - #1713041: fix pprint's handling of maximum depth.
 
 - The timing module has been deprecated for removal in Python 3.0.
index 0a45d2e0c02b04a0ed606608ea00157f0f247595..7f48fffed4b1ab487677d814a39121b6e85340f7 100644 (file)
@@ -1994,6 +1994,10 @@ inital(void)
 {
        PyObject *m, *d, *x;
 
+       if (PyErr_WarnPy3k("the al module has been removed in "
+                          "Python 3.0", 2) < 0)
+           return;     
+
        /* Create the module and add the functions */
        m = Py_InitModule4("al", al_methods,
                al_module_documentation,