Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Removed the deprecated code from offsetbox.py#26910
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
Removed the deprecated code from offsetbox.py#26910
Uh oh!
There was an error while loading.Please reload this page.
Conversation
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.
Thank you for opening your first PR into Matplotlib!
If you have not heard from us in a week or so, please leave a new comment below and that should bring it to our attention. Most of our reviewers are volunteers and sometimes things fall through the cracks.
You can also join uson gitter for real-time discussion.
For details on testing, writing docs, and our review process, please seethe developer guide
We strive to be a welcoming and open project. Please follow ourCode of Conduct.
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.
Just a bit of an adjustment to the release note,
These methods have alternatives that should be mentioned here, though you can largely copy/paste from the deprecation notice, just reflecting that they are removed rather than deprecated
``bbox_artist`` | ||
~~~~~~~~~~~~~~~~ | ||
... of `matplotlib.offsetbox` is removed without replacements. | ||
``get_extent_offsets`` | ||
~~~~~~~~~~~~~~~~~~~~~~~ | ||
... of `matplotlib.offsetbox` is removed without replacements. | ||
``get_extent`` | ||
~~~~~~~~~~~~~~~ | ||
... of `matplotlib.offsetbox` is removed without replacements. |
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.
All of these have alternatives that are mentioned in the deprecation decorator, so they are not removed "without replacements"
See the deprecation note, which can be modified to reflect the "removed" rather than "deprecated":
matplotlib/doc/api/prev_api_changes/api_changes_3.7.0/deprecations.rst
Lines 211 to 215 in6028039
``offsetbox.bbox_artist`` | |
~~~~~~~~~~~~~~~~~~~~~~~~~ | |
... is deprecated. This is just a wrapper to call `.patches.bbox_artist` if a | |
flag is set in the file, so use that directly if you need the behavior. |
matplotlib/doc/api/prev_api_changes/api_changes_3.7.0/deprecations.rst
Lines 191 to 201 in6028039
``OffsetBox.get_extent_offsets`` and ``OffsetBox.get_extent`` | |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
... are deprecated; these methods are also deprecated on all subclasses of | |
`.OffsetBox`. | |
To get the offsetbox extents, instead of ``get_extent``, use | |
`.OffsetBox.get_bbox`, which directly returns a `.Bbox` instance. | |
To also get the child offsets, instead of ``get_extent_offsets``, separately | |
call `~.OffsetBox.get_offset` on each children after triggering a draw. |
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.
@ksunden changed the rst file to reflect the requested changes. Please let me know if any more modifications are needed.
Uh oh!
There was an error while loading.Please reload this page.
Co-authored-by: Kyle Sunden <git@ksunden.space>
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.
Just a couple of very minor things!
Uh oh!
There was an error while loading.Please reload this page.
Co-authored-by: Ruth Comer <10599679+rcomer@users.noreply.github.com>
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.
Thanks@jpgianfaldoni! This can be merged once the checks pass again.
Thanks@jpgianfaldoni! Congratulations on your first PR to Matplotlib 🎉 We hope to hear from you again. |
Uh oh!
There was an error while loading.Please reload this page.
PR summary
This PR removes the deprecated code during the version 3.7 from lib/matplotlib/offsetbox.py which is a sub issue in the parent issues here:#26865
-->
PR checklist