ietf-tools / xml2rfc

Generate RFCs and IETF drafts from document source in XML according to the IETF xml2rfc v2 and v3 vocabularies
https://ietf-tools.github.io/xml2rfc/
BSD 3-Clause "New" or "Revised" License
71 stars 39 forks source link

xml2rfc source: uses-deprecated-python-stdlib cgi (deprecated in Python 3.11, removed in Python 3.13) #1153

Closed kitterma closed 1 week ago

kitterma commented 3 months ago

Describe the issue

It's used on line 17 of xml2rfc/writers/legacy_html.py as a fallback, so it won't actually cause a problem, but OTOH, this is old enough that I would guess it can go away.

Code of Conduct

kesara commented 3 months ago

Yes, it's a fallback for html.escape ^1. html.escape has been available since Python 3.2 ^2 so the import of cgi.escape can go away.

  try:
      from html import escape
  except ImportError:
      from cgi import escape