8000 Deprecate dviread.Encoding. by anntzer · Pull Request #16596 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Deprecate dviread.Encoding. #16596

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 11, 2020
Merged

Deprecate dviread.Encoding. #16596

merged 2 commits into from
Mar 11, 2020

Conversation

anntzer
Copy link
Contributor
@anntzer anntzer commented Feb 28, 2020

PR Summary

In 2c0f5ec I found that dviread.Encoding was mostly broken (it didn't
correctly split entries in the encoding file and instead returned
everything concatenated as a single string) and introduced _parse_enc to
make usetex loading work in SVG. I didn't deprecate Encoding yet
because it appeared to work for the pdf backend.

As it turns out it "works" because the format needed by the pdf backend
is exactly the same as the one in enc files, so it doesn't mind the
failure to split the string. Still, using a proper parser (_parse_enc)
seems better... So deprecate the broken Encoding.


second commit is a minor style fix at the same place, and a small microoptimization of _parse_enc which is both slightly faster and shorter.

PR Checklist

  • Has Pytest style unit tests
  • Code is Flake 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

anntzer added 2 commits March 11, 2020 11:52
In 2c0f5ec I found that dviread.Encoding was mostly broken (it didn't
correctly split entries in the encoding file and instead returned
everything concatenated as a single string) and introduced _parse_enc to
make usetex loading work in SVG.  I didn't deprecate Encoding yet
because it appeared to work for the pdf backend.

As it turns out it "works" because the format needed by the pdf backend
is exactly the same as the one in enc files, so it doesn't mind the
failure to split the string.  Still, using a proper parser (_parse_enc)
seems better...  So deprecate the broken Encoding.
@anntzer
Copy link
Contributor Author
anntzer commented Mar 11, 2020

will selfmerge on ci success per #16231 (comment).

@timhoffm timhoffm merged commit 0abc553 into matplotlib:master Mar 11, 2020
@anntzer anntzer deleted the unenc branch March 11, 2020 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0