diff options
| author | Brett Cannon <bcannon@gmail.com> | 2008-05-14 01:08:21 (GMT) | 
|---|---|---|
| committer | Brett Cannon <bcannon@gmail.com> | 2008-05-14 01:08:21 (GMT) | 
| commit | 34721d56833932ccaaff6c6b0ff1bb9ffe8d20b4 (patch) | |
| tree | 0aa85c5c429c88a01a73d5d57d343806eb10c1a1 | |
| parent | c72df3305f03859d23e006f892db90a78e02f5e0 (diff) | |
| download | cpython-34721d56833932ccaaff6c6b0ff1bb9ffe8d20b4.zip cpython-34721d56833932ccaaff6c6b0ff1bb9ffe8d20b4.tar.gz cpython-34721d56833932ccaaff6c6b0ff1bb9ffe8d20b4.tar.bz2  | |
Deprecate al/AL for removal in 3.0.
| -rwxr-xr-x | Lib/plat-irix5/AL.py | 4 | ||||
| -rw-r--r-- | Lib/plat-irix6/AL.py | 4 | ||||
| -rwxr-xr-x | Lib/test/test_al.py | 4 | ||||
| -rw-r--r-- | Lib/test/test_py3kwarn.py | 2 | ||||
| -rw-r--r-- | Misc/NEWS | 3 | ||||
| -rw-r--r-- | Modules/almodule.c | 4 | 
6 files changed, 18 insertions, 3 deletions
diff --git a/Lib/plat-irix5/AL.py b/Lib/plat-irix5/AL.py index ec941a2..3b43d2c 100755 --- a/Lib/plat-irix5/AL.py +++ b/Lib/plat-irix5/AL.py @@ -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 diff --git a/Lib/plat-irix6/AL.py b/Lib/plat-irix6/AL.py index ec941a2..3b43d2c 100644 --- a/Lib/plat-irix6/AL.py +++ b/Lib/plat-irix6/AL.py @@ -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 diff --git a/Lib/test/test_al.py b/Lib/test/test_al.py index 54496c1..688576d 100755 --- a/Lib/test/test_al.py +++ b/Lib/test/test_al.py @@ -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'] diff --git a/Lib/test/test_py3kwarn.py b/Lib/test/test_py3kwarn.py index be18188..ecd94c4 100644 --- a/Lib/test/test_py3kwarn.py +++ b/Lib/test/test_py3kwarn.py @@ -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', @@ -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. diff --git a/Modules/almodule.c b/Modules/almodule.c index 0a45d2e..7f48fff 100644 --- a/Modules/almodule.c +++ b/Modules/almodule.c @@ -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,  | 
