[Python-checkins] r62985 - in python/trunk: Lib/lib-tk/Canvas.py Lib/test/test_py3kwarn.py Misc/NEWS

brett.cannon python-checkins at python.org
Sat May 10 05:14:32 CEST 2008


Author: brett.cannon
Date: Sat May 10 05:14:32 2008
New Revision: 62985

Log:
The Canvas module has been deprecated for removal in 3.0.


Modified:
   python/trunk/Lib/lib-tk/Canvas.py
   python/trunk/Lib/test/test_py3kwarn.py
   python/trunk/Misc/NEWS

Modified: python/trunk/Lib/lib-tk/Canvas.py
==============================================================================
--- python/trunk/Lib/lib-tk/Canvas.py	(original)
+++ python/trunk/Lib/lib-tk/Canvas.py	Sat May 10 05:14:32 2008
@@ -3,6 +3,10 @@
 # NOTE: This module was an experiment and is now obsolete.
 # It's best to use the Tkinter.Canvas class directly.
 
+from warnings import warnpy3k
+warnpy3k("the Canvas module has been removed in Python 3.0", stacklevel=2)
+del warnpy3k
+
 from Tkinter import Canvas, _cnfmerge, _flatten
 
 

Modified: python/trunk/Lib/test/test_py3kwarn.py
==============================================================================
--- python/trunk/Lib/test/test_py3kwarn.py	(original)
+++ python/trunk/Lib/test/test_py3kwarn.py	Sat May 10 05:14:32 2008
@@ -131,7 +131,8 @@
     all_platforms = ('audiodev', 'imputil', 'mutex', 'user', 'new', 'rexec',
                         'Bastion', 'compiler')
     inclusive_platforms = {'irix':('pure',)}
-    optional_modules = ('bsddb185',)
+    # XXX Don't know if lib-tk is only installed if _tkinter is built.
+    optional_modules = ('bsddb185', 'Canvas')
 
     def check_removal(self, module_name, optional=False):
         """Make sure the specified module, when imported, raises a

Modified: python/trunk/Misc/NEWS
==============================================================================
--- python/trunk/Misc/NEWS	(original)
+++ python/trunk/Misc/NEWS	Sat May 10 05:14:32 2008
@@ -23,6 +23,8 @@
 Library
 -------
 
+- The Canvas module has been deprecated for removal in Python 3.0.
+
 - The compiler package has been deprecated for removal in Python 3.0.
 
 - The Bastion and rexec modules have been deprecated for removal in Python 3.0.


More information about the Python-checkins mailing list