Skip to content

Migrate from Genshi to defusedxml - #29

Merged
micolous merged 1 commit into
masterfrom
remove-genshi
Nov 5, 2020
Merged

Migrate from Genshi to defusedxml#29
micolous merged 1 commit into
masterfrom
remove-genshi

Conversation

@micolous

@micolous micolous commented Nov 5, 2020

Copy link
Copy Markdown
Collaborator

Migrate from Genshi to defusedxml in update_win32tz_map.py:

  • Add defusedxml to install_requires. Genshi was never listed, although
    it was only a requirement for building sdist.

  • Removed support for copying comments from CLDR XML. This would be
    difficult without a DOM parser, but the source file contains a local DTD
    reference which is banned in defusedxml.

  • Switch create_win32tz_map to a mostly-functional processing model, by
    yielding earlier, instead of building complete dicts and yielding
    after-the-fact. This causes output to be no longer sorted alphabetically.

  • Move special handling of territory=001 into create_win32tz_map.

Tested that generated content is identical, although the ordering will
differ.

Google-internal bug: 160436149

* Add `defusedxml` to `install_requires`.  Genshi was never listed, although
  it was only a requirement for building sdist.

* Removed support for copying comments from CLDR XML.  This would be
  difficult without a DOM parser, but the source file contains a local DTD
  reference which is banned in defusedxml.

* Switch `create_win32tz_map` to a mostly-functional processing model, by
  `yield`ing earlier, instead of building complete dicts and `yield`ing
  after-the-fact.  This causes output to be no longer sorted alphabetically.

* Move special handling of `territory=001` into `create_win32tz_map`.

Tested that generated content is identical, although the ordering will
differ.

Google-internal bug: 160436149
@auto-labeler auto-labeler Bot added the bug label Nov 5, 2020
@auto-labeler

auto-labeler Bot commented Nov 5, 2020

Copy link
Copy Markdown

Thanks for opening this issue! I have applied any relevant labels.

@micolous
micolous merged commit 3702a69 into master Nov 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant