You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Update html.entities.html5 dictionary and parseentities.py #60449
A JSON file containing all the HTML5 entities is now available at http://dev.w3.org/html5/spec/entities.json.
I tested from the interpreter to see if it matches the values in html.entities.html5 and there are a dozen of entities that need to be updated:
The Tools/scripts/parseentities.py script should also be updated (or possibly a new, separate script should be added), so it can be used to generate the html5 dict. I'm setting this as release blocker so that the update gets done before the release (other values might change in the meanwhile).
I think it's ok to have a separate file rather than patching the existing one (see attached patch). If the old script is not used anymore it could be removed, otherwise we could just leave it there.
I run Tools/scripts/parse_html5_entities.py and it says that "The current dictionary is updated.". We should check this again, and eventually close the issue, when 3.4 is released.
Activity
ezio-melotti commentedon Oct 16, 2012
A JSON file containing all the HTML5 entities is now available at http://dev.w3.org/html5/spec/entities.json.
I tested from the interpreter to see if it matches the values in html.entities.html5 and there are a dozen of entities that need to be updated:
The Tools/scripts/parseentities.py script should also be updated (or possibly a new, separate script should be added), so it can be used to generate the html5 dict. I'm setting this as release blocker so that the update gets done before the release (other values might change in the meanwhile).
merwok commentedon Oct 19, 2012
I say replace the code. HTML 4.01 won’t be updated.
ezio-melotti commentedon Oct 23, 2012
I think it's ok to have a separate file rather than patching the existing one (see attached patch). If the old script is not used anymore it could be removed, otherwise we could just leave it there.
iuliiaproskurnia commentedon Oct 23, 2012
Version with --patch to modify Lib/html/entities.py automatically
python-dev commentedon Oct 23, 2012
New changeset dd8b969d7459 by Ezio Melotti in branch 'default':
bpo-16245: add a script to generate the html.entities.html5 dict.
http://hg.python.org/cpython/rev/dd8b969d7459
python-dev commentedon Oct 23, 2012
New changeset 1eb1c6942ac8 by Ezio Melotti in branch '3.3':
bpo-16245: Fix the value of a few entities in html.entities.html5.
http://hg.python.org/cpython/rev/1eb1c6942ac8
New changeset 70fab10cd542 by Ezio Melotti in branch 'default':
bpo-16245: merge with 3.3.
http://hg.python.org/cpython/rev/70fab10cd542
python-dev commentedon Oct 23, 2012
New changeset fb80df16c4ff by Ezio Melotti in branch 'default':
Add Misc/NEWS entry for dd8b969d7459/bpo-16245.
http://hg.python.org/cpython/rev/fb80df16c4ff
ezio-melotti commentedon Oct 23, 2012
I now committed an improved version of the script (thanks Iuliia!) and updated the html.entities.html5 dictionary accordingly.
I'm leaving this open because we will have to check if the dictionary is still updated before the release of Python 3.4.
RamchandraApte commentedon Feb 20, 2013
Shouldn't this be deferred blocker?
larryhastings commentedon Jul 31, 2013
This is still marked as a release blocker. I guess this is a "tickler" for Ezio to go check and see if there's a new entities file.
Ezio: can you get this issue closed or downgraded in the next two days?
larryhastings commentedon Aug 1, 2013
I'm downgrading this to "deferred blocker". We'll make sure it happens before Python 3.4.0, but there's no need to hold up Python 3.4a1 for this.
ezio-melotti commentedon Aug 6, 2013
I run Tools/scripts/parse_html5_entities.py and it says that "The current dictionary is updated.". We should check this again, and eventually close the issue, when 3.4 is released.
larryhastings commentedon Mar 16, 2014
Was this done? I'm tagging 3.4.0 final soon.
merwok commentedon Mar 16, 2014
I just ran the script:
This is done :‑)
merwok commentedon Mar 16, 2014
BTW this message does not mean that the dictionary was just updated, but that is was already up to date.
terryjreedy commentedon Nov 9, 2019
According to git blame, the html5 dict in https://github.com/python/cpython/blob/master/Lib/html/entities.py has changed in 7 years. On the other hand, the standard on which it is based, https://html.spec.whatwg.org/multipage/named-characters.html, was last revised yesterday, and I presume several other times since. On the third hand, I just ran the update script and there was no change to entities.py, so maybe is has been run with every release.
Should a comment be added to the file listing the unicode source and the update script?