Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
71c59a7
tob368849
Comparetight_bbox
andtight_layout
modulesThere 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.
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 commentedJan 6, 2022 • edited by timhoffm
Loading Uh oh!
There was an error while loading.Please reload this page.
edited by timhoffm
Uh oh!
There was an error while loading.Please reload this page.
Thanks! I had that question in#22133, so I'll fix both. |
I did a specific comment in#22133 as well. |
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. |
Uh oh!
There was an error while loading.Please reload this page.
timhoffm left a comment• edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
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.
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:
git mv tight_bbox.py _tight_bbox.py
and put this into a commit.- Create a new
tight_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.
Sure! Shouldn't be much work! (And clearly makes sense, although I didn't think about it before.) |
Uh oh!
There was an error while loading.Please reload this page.
PR Summary
Related to#16181
The modules
matplotlib.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
pytest
passes).flake8-docstrings
and runflake8 --docstring-convention=all
).Documentation
doc/users/next_whats_new/
(follow instructions in README.rst there).doc/api/next_api_changes/
(follow instructions in README.rst there).