[Python-checkins] r63213 - in python/trunk: 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
brett.cannon
python-checkins at python.org
Wed May 14 03:08:29 CEST 2008
Author: brett.cannon
Date: Wed May 14 03:08:21 2008
New Revision: 63213
Log:
Deprecate al/AL for removal in 3.0.
Modified:
python/trunk/Lib/plat-irix5/AL.py
python/trunk/Lib/plat-irix6/AL.py
python/trunk/Lib/test/test_al.py
python/trunk/Lib/test/test_py3kwarn.py
python/trunk/Misc/NEWS
python/trunk/Modules/almodule.c
Modified: python/trunk/Lib/plat-irix5/AL.py
==============================================================================
--- python/trunk/Lib/plat-irix5/AL.py (original)
+++ python/trunk/Lib/plat-irix5/AL.py Wed May 14 03:08:21 2008
@@ -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
Modified: python/trunk/Lib/plat-irix6/AL.py
==============================================================================
--- python/trunk/Lib/plat-irix6/AL.py (original)
+++ python/trunk/Lib/plat-irix6/AL.py Wed May 14 03:08:21 2008
@@ -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
Modified: python/trunk/Lib/test/test_al.py
==============================================================================
--- python/trunk/Lib/test/test_al.py (original)
+++ python/trunk/Lib/test/test_al.py Wed May 14 03:08:21 2008
@@ -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']
Modified: python/trunk/Lib/test/test_py3kwarn.py
==============================================================================
--- python/trunk/Lib/test/test_py3kwarn.py (original)
+++ python/trunk/Lib/test/test_py3kwarn.py Wed May 14 03:08:21 2008
@@ -131,7 +131,7 @@
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',
Modified: python/trunk/Misc/NEWS
==============================================================================
--- python/trunk/Misc/NEWS (original)
+++ python/trunk/Misc/NEWS Wed May 14 03:08:21 2008
@@ -30,6 +30,9 @@
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.
Modified: python/trunk/Modules/almodule.c
==============================================================================
--- python/trunk/Modules/almodule.c (original)
+++ python/trunk/Modules/almodule.c Wed May 14 03:08:21 2008
@@ -1994,6 +1994,10 @@
{
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,
More information about the Python-checkins
mailing list