Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
fae0ed50
Commit
fae0ed50
authored
Aug 27, 2019
by
Inada Naoki
Committed by
GitHub
Aug 27, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo-37328: remove deprecated HTMLParser.unescape (GH-14186)
It is deprecated since Python 3.4.
parent
9a943b4c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
15 deletions
+2
-15
Lib/html/parser.py
Lib/html/parser.py
+0
-8
Lib/test/test_htmlparser.py
Lib/test/test_htmlparser.py
+0
-7
Misc/NEWS.d/next/Library/2019-06-18-15-31-33.bpo-37328.2PW1-l.rst
...S.d/next/Library/2019-06-18-15-31-33.bpo-37328.2PW1-l.rst
+2
-0
No files found.
Lib/html/parser.py
View file @
fae0ed50
...
@@ -9,7 +9,6 @@
...
@@ -9,7 +9,6 @@
import
re
import
re
import
warnings
import
_markupbase
import
_markupbase
from
html
import
unescape
from
html
import
unescape
...
@@ -461,10 +460,3 @@ class HTMLParser(_markupbase.ParserBase):
...
@@ -461,10 +460,3 @@ class HTMLParser(_markupbase.ParserBase):
def
unknown_decl
(
self
,
data
):
def
unknown_decl
(
self
,
data
):
pass
pass
# Internal -- helper to remove special character quoting
def
unescape
(
self
,
s
):
warnings
.
warn
(
'The unescape method is deprecated and will be removed '
'in 3.5, use html.unescape() instead.'
,
DeprecationWarning
,
stacklevel
=
2
)
return
unescape
(
s
)
Lib/test/test_htmlparser.py
View file @
fae0ed50
...
@@ -573,13 +573,6 @@ text
...
@@ -573,13 +573,6 @@ text
for
html
,
expected
in
data
:
for
html
,
expected
in
data
:
self
.
_run_check
(
html
,
expected
)
self
.
_run_check
(
html
,
expected
)
def
test_unescape_method
(
self
):
from
html
import
unescape
p
=
self
.
get_collector
()
with
self
.
assertWarns
(
DeprecationWarning
):
s
=
'""""""&#bad;'
self
.
assertEqual
(
p
.
unescape
(
s
),
unescape
(
s
))
def
test_broken_comments
(
self
):
def
test_broken_comments
(
self
):
html
=
(
'<! not really a comment >'
html
=
(
'<! not really a comment >'
'<! not a comment either -->'
'<! not a comment either -->'
...
...
Misc/NEWS.d/next/Library/2019-06-18-15-31-33.bpo-37328.2PW1-l.rst
0 → 100644
View file @
fae0ed50
``HTMLParser.unescape`` is removed. It was undocumented and deprecated
since Python 3.4.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment