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

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

Merged

Conversation

jpgianfaldoni
Copy link
Contributor

@jpgianfaldonijpgianfaldoni commentedSep 25, 2023
edited
Loading

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-actionsgithub-actionsbot 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 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.

Copy link
Member

@ksundenksunden 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
ContributorAuthor

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.

Co-authored-by: Kyle Sunden <git@ksunden.space>
Copy link
Member

@rcomerrcomer 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!

Co-authored-by: Ruth Comer <10599679+rcomer@users.noreply.github.com>
Copy link
Member

@rcomerrcomer 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.

jpgianfaldoni reacted with hooray emoji
@QuLogic
Copy link
Member

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

jpgianfaldoni reacted with hooray emoji

This was referencedSep 25, 2023
@ksundenksunden added this to thev3.9.0 milestoneMar 21, 2024
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@github-actionsgithub-actions[bot]github-actions[bot] left review comments

@ksundenksundenksunden approved these changes

@rcomerrcomerrcomer approved these changes

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

Successfully merging this pull request may close these issues.

4 participants
@jpgianfaldoni@QuLogic@ksunden@rcomer

[8]ページ先頭

©2009-2025 Movatter.jp