This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Remove deprecated html.parser.HTMLParser.unescape()
Type: enhancement Stage: resolved
Components: Library (Lib) Versions: Python 3.10, Python 3.9
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: Jim.Jewett, berker.peksag, ezio.melotti, iritkatriel, lukasz.langa, martin.panter, methane, orsenthil, r.david.murray, serhiy.storchaka, terry.reedy
Priority: normal Keywords: patch

Created on 2016-05-15 19:05 by serhiy.storchaka, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
html_parser_remove_deprecated.patch serhiy.storchaka, 2016-05-15 19:05 review
Pull Requests
URL Status Linked Edit
PR 22288 merged serhiy.storchaka, 2020-09-17 07:29
PR 22293 merged terry.reedy, 2020-09-18 00:10
Messages (14)
msg265643 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2016-05-15 19:05
Proposed patch removes the unescape() method in the html.parser.HTMLParser class. This was deprecated since Python 3.4 (issue19688).
msg266150 - (view) Author: Jim Jewett (Jim.Jewett) * (Python triager) Date: 2016-05-23 13:58
Looks Good To Me
msg266326 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2016-05-25 09:40
I wonder if removing HTMLParser().unescape() would hurt Python 2 → 3 compatibility. This was mentioned in Ezio’s draft deprecation policy PEP <https://mail.python.org/pipermail/python-committers/2016-January/003706.html>: “nothing that is available and not deprecated in 2.7 should be removed from Python 3 as long as 2.7 is officially supported”.

Is there any pressing need to get rid of the method? Maybe just fix the reference to Python 3.5 for the time being.
msg266338 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2016-05-25 12:34
Good point. Maybe the deprecation period of HTMLParser.unescape() should be prolonged.

On other side, this method is not documented, nor in 2.7, nor in 3.x. It is not a part of official API.
msg266350 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2016-05-25 13:34
Nevertheless, our current standing policy is to not remove anything until after 2.7 goes out of maintenance entirely.
msg266351 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2016-05-25 13:35
It was removed before and added back with a deprecation warning (because someone was using it).

A little bit off-topic, but it would be great to have a "deprecated APIs in Python 3" list somewhere in the Python documentation (see https://docs.djangoproject.com/en/dev/internals/deprecation/ for an example).
msg377030 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2020-09-16 22:45
This was pending Python 2 EOL, so should be ok to do now, right?
msg377031 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2020-09-16 22:49
Irit, yes. Serhiy's patch could be converted to a GitHub PR and it can be merged.
msg377036 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2020-09-17 07:31
It was already removed in issue37328. The only not applied part of the patch is adding a What's New entry.
msg377046 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2020-09-17 08:49
New changeset a33f2c2bae759fc9d06e1c032fd2026135f2df45 by Serhiy Storchaka in branch 'master':
bpo-27032, bpo-37328: Document removing HTMLParser.unescape(). (GH-22288)
https://github.com/python/cpython/commit/a33f2c2bae759fc9d06e1c032fd2026135f2df45
msg377056 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2020-09-17 12:00
This issue can be closed now.
msg377075 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2020-09-17 23:41
The backport to 3.9 is still pending.  The bot claims that there is a merge conflict.  This should not happen because What's New in 3.9 should be identical in master and 3.9.  My guess is that someone only changed it in 3.9, though another change in master might not have been backported.  I will try to determine the problem.
msg377079 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2020-09-18 00:47
New changeset 4daeb9eec294f73a5811ef6ab3a0f8e61174a24c by Terry Jan Reedy in branch '3.9':
[3.9] bpo-27032, bpo-37328: Document removing HTMLParser.unescape() (GH-22288)
https://github.com/python/cpython/commit/4daeb9eec294f73a5811ef6ab3a0f8e61174a24c
msg378047 - (view) Author: Łukasz Langa (lukasz.langa) * (Python committer) Date: 2020-10-05 16:10
New changeset 8dd430265ccd4d34b74c841d6bcc8f58aa93ad94 by Łukasz Langa (Terry Jan Reedy) in branch '3.9':
[3.9] bpo-27032, bpo-37328: Document removing HTMLParser.unescape() (GH-22288)
https://github.com/python/cpython/commit/8dd430265ccd4d34b74c841d6bcc8f58aa93ad94
History
Date User Action Args
2022-04-11 14:58:31adminsetgithub: 71219
2020-10-05 16:10:19lukasz.langasetnosy: + lukasz.langa
messages: + msg378047
2020-09-18 00:48:26terry.reedysetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2020-09-18 00:47:43terry.reedysetmessages: + msg377079
2020-09-18 00:10:58terry.reedysetpull_requests: + pull_request21344
2020-09-17 23:41:28terry.reedysetnosy: + terry.reedy
messages: + msg377075
2020-09-17 12:00:23iritkatrielsetmessages: + msg377056
2020-09-17 08:49:06serhiy.storchakasetmessages: + msg377046
2020-09-17 07:31:41serhiy.storchakasetversions: + Python 3.9, Python 3.10, - Python 3.6
2020-09-17 07:31:19serhiy.storchakasetnosy: + methane
messages: + msg377036
2020-09-17 07:29:00serhiy.storchakasetpull_requests: + pull_request21340
2020-09-16 22:49:02orsenthilsetnosy: + orsenthil
messages: + msg377031
2020-09-16 22:45:44iritkatrielsetnosy: + iritkatriel
messages: + msg377030
2016-05-25 13:35:17berker.peksagsetnosy: + berker.peksag
messages: + msg266351
2016-05-25 13:34:07r.david.murraysetnosy: + r.david.murray
messages: + msg266350
2016-05-25 12:34:10serhiy.storchakasetmessages: + msg266338
2016-05-25 09:40:54martin.pantersetnosy: + martin.panter
messages: + msg266326
2016-05-23 13:58:38Jim.Jewettsetnosy: + Jim.Jewett
messages: + msg266150
2016-05-15 19:05:46serhiy.storchakacreate