Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Use json for the font cache instead of pickle#5021

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
mdboom merged 2 commits intomatplotlib:masterfromjkseppan:json-font-cache
Oct 6, 2015

Conversation

jkseppan
Copy link
Member

See discussion at#4756.

@tacaswelltacaswell added this to theproposed next point release milestoneSep 3, 2015
@WeatherGod
Copy link
Member

Do we even have any unit tests for font caching? The problem with Travis here is that the font cache isn't used there at all, I don't think.

@mdboom
Copy link
Member

The font cache is always used to draw text, and the test suite draws text. On Travis, the font cache is rebuilt from scratch each time. What wedon't have is a test of saving to disk and loading it again. But that should be easy enough to write by calling the various functions in font_manager.py directly from a unit test.

@jkseppan
Copy link
MemberAuthor

One problem with testing this class is that it searches the filesystem when you call__init__. But I guess we can work around that.

@mdboom
Copy link
Member

I think it's probably good enough to just save and reload the existing singleton (font_manager.py:fontManager) to a temp file. Thatshouldn't do a lot of file I/O (other than the tempfile). The generation of the cache itself from the font files on the system is already tested (or at least covered) by the existing unit test suite.

@mdboom
Copy link
Member

@jkseppan: Do you consider this ready to merge? Looks good to me.

@jkseppan
Copy link
MemberAuthor

I think it should be ready to merge to master, but it's probably too large of a change to add to 1.5.x in the release-candidate phase.

@mdboom
Copy link
Member

Yes -- definitely not for 1.5.

@tacaswell
Copy link
Member

Master is fair game for 2.1 code.

mdboom added a commit that referenced this pull requestOct 6, 2015
Use json for the font cache instead of pickle
@mdboommdboom merged commitfef412e intomatplotlib:masterOct 6, 2015
@jkseppanjkseppan deleted the json-font-cache branchOctober 8, 2015 15:22
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
v2.1
Development

Successfully merging this pull request may close these issues.

4 participants
@jkseppan@WeatherGod@mdboom@tacaswell

[8]ページ先頭

©2009-2025 Movatter.jp