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

Deprecatedafm,fontconfig_pattern, andtype1font#22133

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
jklymak merged 2 commits intomatplotlib:mainfromoscargus:deprecate_type1font
Jan 17, 2022

Conversation

oscargus
Copy link
Member

@oscargusoscargus commentedJan 6, 2022
edited
Loading

PR Summary

Related to#16181.

Will update with release notes once the tests pass (and I get a PR-number...)

PR Checklist

Tests and Styling

  • [N/A] Has pytest style unit tests (andpytest passes).
  • IsFlake 8 compliant (installflake8-docstrings and runflake8 --docstring-convention=all).

Documentation

  • [N/A] New features are documented, with examples if plot related.
  • [N/A] New features have an entry indoc/users/next_whats_new/ (follow instructions in README.rst there).
  • API changes documented indoc/api/next_api_changes/ (follow instructions in README.rst there).
  • Documentation is sphinx and numpydoc compliant (the docs shouldbuild without error).

@oscargusoscargus marked this pull request as draftJanuary 6, 2022 17:20
@oscargusoscargusforce-pushed thedeprecate_type1font branch 3 times, most recently from392b49d to7ed5b69CompareJanuary 6, 2022 18:31
@oscargusoscargus changed the titleDeprecatedtype1fontDeprecatedafm,fontconfig_pattern, andtype1fontJan 6, 2022
@oscargus
Copy link
MemberAuthor

oscargus commentedJan 6, 2022
edited
Loading

How should one deal with these issues:

/home/circleci/project/lib/matplotlib/font_manager.py:docstring of matplotlib.font_manager.afmFontProperty:8: WARNING: py:obj reference target not found: AFM/home/circleci/project/doc/api/next_api_changes/behavior/20715-JKS.rst:4: WARNING: py:obj reference target not found: type1font.Type1Font.prop/home/circleci/project/doc/api/next_api_changes/behavior/20715-JKS.rst:4: WARNING: py:obj reference target not found: type1font.Type1Font.transform/home/circleci/project/doc/api/prev_api_changes/api_changes_0.91.0.rst:39: WARNING: py:class reference target not found: AFM/home/circleci/project/doc/api/prev_api_changes/api_changes_0.98.x.rst:66: WARNING: py:meth reference target not found: matplotlib.afm.AFM.get_fullname/home/circleci/project/doc/api/prev_api_changes/api_changes_0.98.x.rst:66: WARNING: py:meth reference target not found: matplotlib.afm.AFM.get_familynameapi/prev_api_changes/api_changes_3.5.0/behaviour.rst:230: WARNING: py:obj reference target not found: type1font.Type1Font

Should one change the previous links to point to the new one? Reformat them to not be a link? Import the required classes/functions explicitly in the to-be-removed file?

Especially: there is a PR#20715 that changes the now deprecated methods/classes. Should this be dealt with in a special way? Since it is now deprecated/private.

@timhoffm
Copy link
Member

timhoffm commentedJan 6, 2022
edited
Loading

Please change the links in API changes to code literals using fully qualified names, e.g.

`~.type1font.Type1Font`

to

``matplotlib.type1font.Type1Font``

The API changes are historic documents for that point in time and we should not change their meaning. We can't reference with links in the current docs so the best option is literals. This is also true for the unreleasednext_api_changes.

Concerning the first one, change`.AFM` to plain text for now. We currently don't build the docs for the new private modules. - I still have to decide if we want that. There are pros and cons for building docs for private parts. Anyway, for now there is nothing to link to. It might well be thatfont_manager.afmFontProperty() will become private as well. At least, it requiresAFM as input, which is now private. But I have to have a closer look at this.

@oscargus
Copy link
MemberAuthor

It might well be thatfont_manager.afmFontProperty() will become private as well.

It is only used (in the matplotlib codebase) inFontManager.addfont(), so would probably make sense. Let me know and I can do it here.

For consistency, one may also consider makingttfFontProperty private. However, that is directly used in both the cairo and svg backends, so may indicate that it maybe should stay.

@oscargusoscargusforce-pushed thedeprecate_type1font branch 2 times, most recently from08c4ed7 tofd6b5b9CompareJanuary 7, 2022 18:18
@oscargusoscargus marked this pull request as ready for reviewJanuary 7, 2022 19:44
@tacaswelltacaswell added this to thev3.6.0 milestoneJan 7, 2022
Copy link
Member

@timhoffmtimhoffm left a comment
edited
Loading

Choose a reason for hiding this comment

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

Please switch to the two-commit solution as described in#22134 (review) to preserve history here as well.

@oscargus
Copy link
MemberAuthor

Imports are slightly improved here as well.

timhoffm reacted with thumbs up emoji

@jklymakjklymak merged commit76012ae intomatplotlib:mainJan 17, 2022
@oscargusoscargus deleted the deprecate_type1font branchJanuary 17, 2022 13:22
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@jklymakjklymakjklymak approved these changes

@timhoffmtimhoffmtimhoffm approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
v3.6.0
Development

Successfully merging this pull request may close these issues.

4 participants
@oscargus@timhoffm@jklymak@tacaswell

[8]ページ先頭

©2009-2025 Movatter.jp