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: pip install now fails with 'HTMLParser' object has no attribute 'unescape'
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: ezio.melotti Nosy List: ezio.melotti, larry, ned.deily, python-dev, vinay.sajip
Priority: release blocker Keywords: patch

Created on 2013-11-22 02:20 by ned.deily, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
issue19688.diff ezio.melotti, 2013-11-22 03:05 review
Messages (6)
msg203712 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2013-11-22 02:19
7b9235852b3b for Issue2927 moved and documents the previously undocumented unescape function.  Unfortunately, at least one third-party module, distlib, depends on it.  And distlib is now used by pip and needed for the ensurepip feature of 3.4.

$ python3.4 get-pip.py
Traceback (most recent call last):
  File "get-pip.py", line 7269, in <module>
    do_exec(entry, locals())
  File "<string>", line 1, in do_exec
  File "<string>", line 9, in <module>
  File "/var/folders/fm/9wjgctqx61n796zt88qmmnxc0000gn/T/unpacker-1kz7n2dh-scratchdir/pip/__init__.py", line 10, in <module>
  File "/var/folders/fm/9wjgctqx61n796zt88qmmnxc0000gn/T/unpacker-1kz7n2dh-scratchdir/pip/util.py", line 17, in <module>
  File "/var/folders/fm/9wjgctqx61n796zt88qmmnxc0000gn/T/unpacker-1kz7n2dh-scratchdir/pip/vendor/distlib/version.py", line 13, in <module>
  File "/var/folders/fm/9wjgctqx61n796zt88qmmnxc0000gn/T/unpacker-1kz7n2dh-scratchdir/pip/vendor/distlib/compat.py", line 343, in <module>
AttributeError: 'HTMLParser' object has no attribute 'unescape'
msg203714 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2013-11-22 02:41
A distlib issue has also been opened.

https://bitbucket.org/pypa/distlib/issue/36/distlib-uses-undocumented-and-deprecated
msg203716 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2013-11-22 03:05
Here is a patch that adds HTMLParser.unescape() back with a DeprecationWarning.
msg203720 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2013-11-22 03:34
LGTM, thanks!
msg203721 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-11-22 03:49
New changeset 0534b882f9ce by Ezio Melotti in branch 'default':
#19688: add back and deprecate the internal HTMLParser.unescape() method.
http://hg.python.org/cpython/rev/0534b882f9ce
msg203722 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2013-11-22 03:50
Fixed, thanks for the report!
History
Date User Action Args
2022-04-11 14:57:53adminsetgithub: 63887
2013-11-22 03:50:20ezio.melottisetstatus: open -> closed
resolution: fixed
messages: + msg203722

stage: commit review -> resolved
2013-11-22 03:49:42python-devsetnosy: + python-dev
messages: + msg203721
2013-11-22 03:34:51ned.deilysetmessages: + msg203720
stage: patch review -> commit review
2013-11-22 03:05:14ezio.melottisetfiles: + issue19688.diff
messages: + msg203716

keywords: + patch
type: behavior
stage: patch review
2013-11-22 02:41:53ned.deilysetnosy: + vinay.sajip
messages: + msg203714
2013-11-22 02:20:00ned.deilycreate