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

Appearance settings

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Sep 25, 2023

Conversation

jpgianfaldoni
Copy link
Contributor

@jpgianfaldoni jpgianfaldoni commented Sep 25, 2023

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

Copy link

@github-actions github-actions bot left a 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 us on gitter for real-time discussion.

For details on testing, writing docs, and our review process, please see the developer guide

We strive to be a welcoming and open project. Please follow our Code of Conduct.

Copy link
Member

@ksunden ksunden left a 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

Comment on lines 1 to 10
``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.
Copy link
Member

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":

``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.

``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.

Copy link
Contributor Author

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.

doc/api/next_api_changes/removals/26910-JP.rst Outdated Show resolved Hide resolved
Co-authored-by: Kyle Sunden <git@ksunden.space>
Copy link
Member

@rcomer rcomer left a 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!

doc/api/next_api_changes/removals/26910-JP.rst Outdated Show resolved Hide resolved
Co-authored-by: Ruth Comer <10599679+rcomer@users.noreply.github.com>
Copy link
Member

@rcomer rcomer left a 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.

@QuLogic
Copy link
Member

QuLogic commented Sep 25, 2023

Thanks @jpgianfaldoni! Congratulations on your first PR to Matplotlib 🎉 We hope to hear from you again.

@ksunden ksunden added this to the v3.9.0 milestone Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.