mirror of
https://github.com/python/cpython.git
synced 2025-07-29 06:05:00 +00:00
Deprecate htmllib and sgmllib for 3.0.
This commit is contained in:
parent
681001e11b
commit
ac19d85e04
8 changed files with 26 additions and 8 deletions
|
@ -1,9 +1,12 @@
|
||||||
|
|
||||||
:mod:`htmllib` --- A parser for HTML documents
|
:mod:`htmllib` --- A parser for HTML documents
|
||||||
==============================================
|
==============================================
|
||||||
|
|
||||||
.. module:: htmllib
|
.. module:: htmllib
|
||||||
:synopsis: A parser for HTML documents.
|
:synopsis: A parser for HTML documents.
|
||||||
|
:deprecated:
|
||||||
|
|
||||||
|
.. deprecated:: 2.6
|
||||||
|
The :mod:`htmllib` module has been removed in Python 3.0.
|
||||||
|
|
||||||
|
|
||||||
.. index::
|
.. index::
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
|
|
||||||
:mod:`sgmllib` --- Simple SGML parser
|
:mod:`sgmllib` --- Simple SGML parser
|
||||||
=====================================
|
=====================================
|
||||||
|
|
||||||
.. module:: sgmllib
|
.. module:: sgmllib
|
||||||
:synopsis: Only as much of an SGML parser as needed to parse HTML.
|
:synopsis: Only as much of an SGML parser as needed to parse HTML.
|
||||||
|
:deprecated:
|
||||||
|
|
||||||
|
.. deprecated:: 2.6
|
||||||
|
The :mod:`sgmllib` module has been removed in Python 3.0.
|
||||||
|
|
||||||
.. index:: single: SGML
|
.. index:: single: SGML
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,11 @@ See the HTML 2.0 specification:
|
||||||
http://www.w3.org/hypertext/WWW/MarkUp/html-spec/html-spec_toc.html
|
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
|
import sgmllib
|
||||||
|
|
||||||
from formatter import AS_IS
|
from formatter import AS_IS
|
||||||
|
|
|
@ -9,6 +9,11 @@
|
||||||
# not supported at all.
|
# 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 markupbase
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import formatter
|
import formatter
|
||||||
import htmllib
|
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from test import test_support
|
from test import test_support
|
||||||
|
htmllib = test_support.import_module('htmllib', deprecated=True)
|
||||||
|
|
||||||
|
|
||||||
class AnchorCollector(htmllib.HTMLParser):
|
class AnchorCollector(htmllib.HTMLParser):
|
||||||
|
|
|
@ -137,7 +137,7 @@ class TestStdlibRemovals(unittest.TestCase):
|
||||||
# import side-effect.
|
# import side-effect.
|
||||||
all_platforms = ('audiodev', 'imputil', 'mutex', 'user', 'new', 'rexec',
|
all_platforms = ('audiodev', 'imputil', 'mutex', 'user', 'new', 'rexec',
|
||||||
'Bastion', 'compiler', 'dircache', 'fpformat',
|
'Bastion', 'compiler', 'dircache', 'fpformat',
|
||||||
'ihooks', 'mhlib', 'statvfs')
|
'ihooks', 'mhlib', 'statvfs', 'htmllib', 'sgmllib')
|
||||||
inclusive_platforms = {'irix' : ('pure', 'AL', 'al', 'CD', 'cd', 'cddb',
|
inclusive_platforms = {'irix' : ('pure', 'AL', 'al', 'CD', 'cd', 'cddb',
|
||||||
'cdplayer', 'CL', 'cl', 'DEVICE', 'GL',
|
'cdplayer', 'CL', 'cl', 'DEVICE', 'GL',
|
||||||
'gl', 'ERRNO', 'FILE', 'FL', 'flp', 'fl',
|
'gl', 'ERRNO', 'FILE', 'FL', 'flp', 'fl',
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import pprint
|
import pprint
|
||||||
import re
|
import re
|
||||||
import sgmllib
|
|
||||||
import unittest
|
import unittest
|
||||||
from test import test_support
|
from test import test_support
|
||||||
|
sgmllib = test_support.import_module('sgmllib', deprecated=True)
|
||||||
|
|
||||||
|
|
||||||
class EventCollector(sgmllib.SGMLParser):
|
class EventCollector(sgmllib.SGMLParser):
|
||||||
|
|
|
@ -70,8 +70,11 @@ Extension Modules
|
||||||
Library
|
Library
|
||||||
-------
|
-------
|
||||||
|
|
||||||
- Issue #3011: locale module alias table was updated to the latest version
|
- The sgmllib and htmllib modules have been deprecated for removal
|
||||||
from the X.org locale.alias file
|
in Python 3.0.
|
||||||
|
|
||||||
|
- Issue #3011: locale module alias table was updated to the latest
|
||||||
|
version from the X.org locale.alias file.
|
||||||
|
|
||||||
- Issue #1797 (partial fix): ctypes NULL function pointers have a
|
- Issue #1797 (partial fix): ctypes NULL function pointers have a
|
||||||
False boolean value now.
|
False boolean value now.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue