Skip to content

Pathlibify font_manager (only internally, doesn't change the API). #10435

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 1 commit into from
Apr 11, 2018

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Feb 12, 2018

PR Summary

EDIT: also rely on winreg context-managing, https://docs.python.org/3.4/library/winreg.html#registry-handle-objects

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

@anntzer anntzer added this to the v3.0 milestone Feb 12, 2018
@QuLogic
Copy link
Member

QuLogic commented Feb 17, 2018

Everything is failing...

@anntzer anntzer force-pushed the pathlib-font_manager branch from 0c30ccc to 18ff095 Compare February 17, 2018 08:19
@anntzer
Copy link
Contributor Author

anntzer commented Feb 17, 2018

should hopefully work better now...

@anntzer anntzer force-pushed the pathlib-font_manager branch 2 times, most recently from cc2a1a4 to 8616d51 Compare February 17, 2018 16:38
@QuLogic QuLogic added the Py3k label Feb 18, 2018
return [str(path)
for ext in extensions
for path in filter(Path.is_file,
Path(directory).rglob("*.{}".format(ext)))]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This walks the directory tree as many times as there are extensions instead of just once.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@anntzer anntzer force-pushed the pathlib-font_manager branch from 8616d51 to 0faaded Compare February 18, 2018 08:46
@anntzer anntzer mentioned this pull request Feb 18, 2018
6 tasks
@anntzer anntzer force-pushed the pathlib-font_manager branch from 0faaded to 5cad00a Compare February 26, 2018 19:59
@anntzer anntzer force-pushed the pathlib-font_manager branch 2 times, most recently from a5b164c to 0e2c60e Compare March 29, 2018 07:59
@anntzer anntzer force-pushed the pathlib-font_manager branch from 0e2c60e to 898998c Compare March 29, 2018 08:05
@timhoffm timhoffm merged commit 77153b8 into matplotlib:master Apr 11, 2018
@anntzer anntzer deleted the pathlib-font_manager branch April 26, 2018 22:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants