1. PyPA
  2. Python Packaging Authority Projects
  3. distlib

Commits

Ezio Melotti  committed 273b472

Issue #36: use html.unescape with Python 3.4+.

  • Participants
  • Parent commits 63033e4
  • Branches default

Comments (0)

Files changed (1)

File distlib/compat.py

View file
  • Ignore whitespace
     from html import escape
 except ImportError:
     from cgi import escape
-unescape = HTMLParser().unescape
+if sys.version_info[:2] < (3, 4):
+    unescape = HTMLParser().unescape
+else:
+    from html import unescape
 
 try:
     from collections import ChainMap