summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrett Cannon <bcannon@gmail.com>2008-05-10 03:14:32 (GMT)
committerBrett Cannon <bcannon@gmail.com>2008-05-10 03:14:32 (GMT)
commitd5a0985265e373cc3c6b05622f77b71f21acb6e7 (patch)
treeb45888cd85b85912e18a87e8adeba9c5b16539db
parent756bc0b7229f6a006af50d6817aebd2b185138d0 (diff)
downloadcpython-d5a0985265e373cc3c6b05622f77b71f21acb6e7.zip
cpython-d5a0985265e373cc3c6b05622f77b71f21acb6e7.tar.gz
cpython-d5a0985265e373cc3c6b05622f77b71f21acb6e7.tar.bz2
The Canvas module has been deprecated for removal in 3.0.
-rw-r--r--Lib/lib-tk/Canvas.py4
-rw-r--r--Lib/test/test_py3kwarn.py3
-rw-r--r--Misc/NEWS2
3 files changed, 8 insertions, 1 deletions
diff --git a/Lib/lib-tk/Canvas.py b/Lib/lib-tk/Canvas.py
index 83d7bba..34464ab 100644
--- a/Lib/lib-tk/Canvas.py
+++ b/Lib/lib-tk/Canvas.py
@@ -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
diff --git a/Lib/test/test_py3kwarn.py b/Lib/test/test_py3kwarn.py
index ee79000..77b0d7d 100644
--- a/Lib/test/test_py3kwarn.py
+++ b/Lib/test/test_py3kwarn.py
@@ -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
diff --git a/Misc/NEWS b/Misc/NEWS
index 2aa7576..3654855 100644
--- 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.