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

Deprecatedtight_bbox andtight_layout modules#22134

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_tight
Jan 9, 2022

Conversation

oscargus
Copy link
Member

@oscargusoscargus commentedJan 6, 2022
edited
Loading

PR Summary

Related to#16181

The modulesmatplotlib.tight_bbox andmatplotlib.tight_layout are deprecated.

Will add release notes once the tests pass (and I have 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:42
@oscargusoscargusforce-pushed thedeprecate_tight branch 3 times, most recently from71c59a7 tob368849CompareJanuary 6, 2022 18:35
@oscargusoscargus changed the titleDeprecated tight_bbox and tight_layout modulesDeprecatedtight_bbox andtight_layout modulesJan 6, 2022
Copy link
Member

@timhoffmtimhoffm left a comment

Choose a reason for hiding this comment

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

The doc build still fails with

/home/circleci/project/doc/api/prev_api_changes/api_changes_1.4.x.rst:152: WARNING: py:obj reference target not found: tight_bbox.adjust_bbox/home/circleci/project/doc/api/prev_api_changes/api_changes_1.4.x.rst:152: WARNING: py:obj reference target not found: tight_bbox.process_figure_for_rasterizing/home/circleci/project/doc/api/prev_api_changes/api_changes_2.2.0.rst:162: WARNING: py:obj reference target not found: tight_layout.auto_adjust_subplotpars/home/circleci/project/doc/api/prev_api_changes/api_changes_3.0.1.rst:4: WARNING: py:obj reference target not found: tight_layout.auto_adjust_subplotpars/home/circleci/project/doc/api/prev_api_changes/api_changes_3.0.1.rst:4: WARNING: py:obj reference target not found: tight_layout.get_tight_layout_figure

These historic API change notes reference the now non-public API. The way to handle this is to change the links to verbatim as that API is no longer public and available in the docs. E.g. for the first one, change

`.tight_bbox.adjust_bbox`

to

``matplotlib.tight_bbox.adjust_bbox``

@oscargus
Copy link
MemberAuthor

oscargus commentedJan 6, 2022
edited by timhoffm
Loading

Thanks! I had that question in#22133, so I'll fix both.

@timhoffm
Copy link
Member

I did a specific comment in#22133 as well.

@oscargus
Copy link
MemberAuthor

Thanks@timhoffm !

I've updated both and will set them to be ready when the tests pass.

I decided to not put links in the deprecation notices to not have to edit them when the modules actually are removed.

@oscargusoscargus marked this pull request as ready for reviewJanuary 7, 2022 19:43
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.

It just occured to me that we can an should keep the history for git blame. If you create a new_tight_bbox.py, copy everything over and add the stub intight_bbox.py, then all of_tight_bbox.py will be marked as your change and not have any history behind that.

To preserve the history:

  1. git mv tight_bbox.py _tight_bbox.py and put this into a commit.
  2. Create a newtight_bbox.py with the deprecation and put this into a second commit.

It's important that the move is in a separate commit. Otherwise git assumes you created_tight_bbox.py and modifiedtight_bbox.py. However, you can have the moves of both files in one commit and both deprecations in the second.

Sorry to bring this in at a quite late review stage, but it's really important for us to be able to easily dig into the code history.

@oscargus
Copy link
MemberAuthor

Sure! Shouldn't be much work! (And clearly makes sense, although I didn't think about it before.)

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.

3 participants
@oscargus@timhoffm@jklymak

[8]ページ先頭

©2009-2025 Movatter.jp