Skip to content
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

Remove python 2 compatibility code from dviread #10481

Merged
merged 2 commits into from Feb 16, 2018

Conversation

Projects
None yet
3 participants
@jkseppan
Copy link
Member

commented Feb 15, 2018

PR Summary

Simplify dviread.py and test_dviread.py now that we don't support Python 2.7 on master. Python's issue 12493 was fixed in Python 3.3 and some fairly late release of 2.7, so since we support 3.5+ we don't need that workaround any more.

PR Checklist

  • Has Pytest style unit tests
  • Code is PEP 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

@jkseppan jkseppan added this to the v3.0 milestone Feb 15, 2018

@efiring
Copy link
Member

left a comment

Looks good. Just a minor suggestion not related to the py2 stripping, but in the neighborhood.

@@ -194,7 +180,7 @@ class Dvi(object):
>>> print(''.join(unichr(t.glyph) for t in page.text))
"""
# dispatch table
_dtable = [None for _ in xrange(256)]
_dtable = [None for _ in range(256)]

This comment has been minimized.

Copy link
@efiring

efiring Feb 16, 2018

Member

Slightly out of scope, but this would be simpler and faster as [None] * 256, wouldn't it?

@jkseppan jkseppan merged commit 2bd942c into matplotlib:master Feb 16, 2018

7 of 8 checks passed

codecov/project/tests 98.39% (-0.01%) compared to 78c484e
Details
ci/circleci: docs-python35 Your tests passed on CircleCI!
Details
ci/circleci: docs-python36 Your tests passed on CircleCI!
Details
codecov/patch 86.66% of diff hit (target 50%)
Details
codecov/project/library 66.96% (target 50%)
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
lgtm analysis: Python No alert changes
Details

@jkseppan jkseppan deleted the jkseppan:dviread-python3 branch Feb 16, 2018

@QuLogic QuLogic added the Py3k label Feb 18, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.