-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Rely more on lru_cache rather than custom caching. #9677
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
Conversation
No, but I noticed the possibility of this improvement while reviewing your PR. |
af8eb12
to
2bc62b7
Compare
lib/matplotlib/font_manager.py
Outdated
return result | ||
return False | ||
with open(filename, 'rb') as fd: | ||
tag = fd.read(4) |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return fd.read(4) == b'OTTO'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
lib/matplotlib/font_manager.py
Outdated
prop, fontext, directory, fallback_to_default, rebuild_if_missing, | ||
tuple(tuple(rcParams[key]) for key in [ | ||
"font.serif", "font.sans-serif", "font.cursive", | ||
"font.fantasy", "font.monospace"])) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This inlining...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
deinlined :)
2bc62b7
to
e300d80
Compare
e300d80
to
a7d146e
Compare
This reverts commit 5730794, reversing changes made to 1ca3d1a. Fixes matplotlib#10740 by avoiding suspected bugs in backports.lru_cache
PR Summary
All's in the title.
PR Checklist