]> granicus.if.org Git - python/commitdiff
The Canvas module has been deprecated for removal in 3.0.
authorBrett Cannon <bcannon@gmail.com>
Sat, 10 May 2008 03:14:32 +0000 (03:14 +0000)
committerBrett Cannon <bcannon@gmail.com>
Sat, 10 May 2008 03:14:32 +0000 (03:14 +0000)
Lib/lib-tk/Canvas.py
Lib/test/test_py3kwarn.py
Misc/NEWS

index 83d7bba7463c9cb560325488e68a52a468aa520f..34464ab979fbbc9f9e8e63a290a5800f724fd18e 100644 (file)
@@ -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
 
 
index ee7900088bb4e55b1271143d9a2741184798e311..77b0d7d621749de460426ede8b3623885d4985a3 100644 (file)
@@ -131,7 +131,8 @@ class TestStdlibRemovals(unittest.TestCase):
     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
index 2aa7576aa6a990942ae139875ae71637d4059d2b..365485584d78248067f60a2258d75af1d8275e9c 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -23,6 +23,8 @@ Extension Modules
 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.