From d5a0985265e373cc3c6b05622f77b71f21acb6e7 Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Sat, 10 May 2008 03:14:32 +0000 Subject: The Canvas module has been deprecated for removal in 3.0. --- Lib/lib-tk/Canvas.py | 4 ++++ Lib/test/test_py3kwarn.py | 3 ++- Misc/NEWS | 2 ++ 3 files changed, 8 insertions(+), 1 deletion(-) 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. -- cgit v0.12