diff options
author | Georg Brandl <georg@python.org> | 2008-06-01 21:19:14 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2008-06-01 21:19:14 (GMT) |
commit | ac19d85e04855642a856473b91f3d621e844ad52 (patch) | |
tree | 63a44aba6093a578462f2ec5f5c4b1d7ecf767bb /Lib | |
parent | 681001e11ba164c67a42251bd2bcee2b260188c3 (diff) | |
download | cpython-ac19d85e04855642a856473b91f3d621e844ad52.zip cpython-ac19d85e04855642a856473b91f3d621e844ad52.tar.gz cpython-ac19d85e04855642a856473b91f3d621e844ad52.tar.bz2 |
Deprecate htmllib and sgmllib for 3.0.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/htmllib.py | 5 | ||||
-rw-r--r-- | Lib/sgmllib.py | 5 | ||||
-rw-r--r-- | Lib/test/test_htmllib.py | 2 | ||||
-rw-r--r-- | Lib/test/test_py3kwarn.py | 2 | ||||
-rw-r--r-- | Lib/test/test_sgmllib.py | 2 |
5 files changed, 13 insertions, 3 deletions
diff --git a/Lib/htmllib.py b/Lib/htmllib.py index 24a2e2f..44647db 100644 --- a/Lib/htmllib.py +++ b/Lib/htmllib.py @@ -4,6 +4,11 @@ See the HTML 2.0 specification: http://www.w3.org/hypertext/WWW/MarkUp/html-spec/html-spec_toc.html """ +from warnings import warnpy3k +warnpy3k("the htmllib module has been removed in Python 3.0", + stacklevel=2) +del warnpy3k + import sgmllib from formatter import AS_IS diff --git a/Lib/sgmllib.py b/Lib/sgmllib.py index b68eb7a..e5fbd32 100644 --- a/Lib/sgmllib.py +++ b/Lib/sgmllib.py @@ -9,6 +9,11 @@ # not supported at all. +from warnings import warnpy3k +warnpy3k("the sgmllib module has been removed in Python 3.0", + stacklevel=2) +del warnpy3k + import markupbase import re diff --git a/Lib/test/test_htmllib.py b/Lib/test/test_htmllib.py index a20f43b..e1f4334 100644 --- a/Lib/test/test_htmllib.py +++ b/Lib/test/test_htmllib.py @@ -1,8 +1,8 @@ import formatter -import htmllib import unittest from test import test_support +htmllib = test_support.import_module('htmllib', deprecated=True) class AnchorCollector(htmllib.HTMLParser): diff --git a/Lib/test/test_py3kwarn.py b/Lib/test/test_py3kwarn.py index eed46d1..664df44 100644 --- a/Lib/test/test_py3kwarn.py +++ b/Lib/test/test_py3kwarn.py @@ -137,7 +137,7 @@ class TestStdlibRemovals(unittest.TestCase): # import side-effect. all_platforms = ('audiodev', 'imputil', 'mutex', 'user', 'new', 'rexec', 'Bastion', 'compiler', 'dircache', 'fpformat', - 'ihooks', 'mhlib', 'statvfs') + 'ihooks', 'mhlib', 'statvfs', 'htmllib', 'sgmllib') inclusive_platforms = {'irix' : ('pure', 'AL', 'al', 'CD', 'cd', 'cddb', 'cdplayer', 'CL', 'cl', 'DEVICE', 'GL', 'gl', 'ERRNO', 'FILE', 'FL', 'flp', 'fl', diff --git a/Lib/test/test_sgmllib.py b/Lib/test/test_sgmllib.py index d9c9ddc..34fd7f0 100644 --- a/Lib/test/test_sgmllib.py +++ b/Lib/test/test_sgmllib.py @@ -1,8 +1,8 @@ import pprint import re -import sgmllib import unittest from test import test_support +sgmllib = test_support.import_module('sgmllib', deprecated=True) class EventCollector(sgmllib.SGMLParser): |