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

MNT: make layout deprecations pending#22345

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

Conversation

jklymak
Copy link
Member

PR Summary

Closes#22343

As noted there, deprecating immediately emits a DeprecationWarning, whereas this will emit a PendingDeprecationWarning.

PR Checklist

Tests and Styling

  • Has pytest style unit tests (andpytest passes).
  • IsFlake 8 compliant (installflake8-docstrings and runflake8 --docstring-convention=all).

Documentation

  • New features are documented, with examples if plot related.
  • 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).

@jklymakjklymakforce-pushed themnt-make-layout-deprecations-pending branch from30fef49 to0f77ba9CompareJanuary 28, 2022 14:48
@jklymakjklymak added this to thev3.6.0 milestoneJan 28, 2022
@anntzer
Copy link
Contributor

Thanks!

@timhoffm
Copy link
Member

Should the api change now be adapted as well?

@jklymak
Copy link
MemberAuthor

Hmmm, I don't think I put in an API change note for the original deprecation, which was an oversight.

@jklymak
Copy link
MemberAuthor

So now that I think about this a bit more, do wereally want to get rid offigure.set_tight_layout()? That is used massively in the wild.

@timhoffm
Copy link
Member

I'd definitively get rid ofget/set_constrained_layout_pads(). That's too specific for a figure method. But we're not in a hurry let's go an normal deprecation cycle here, including a pending round.

set_tight_layout/set_constrained_layout: In the very long run, we want to get rid of it because of the duplicate API. But there are 7.5k usages on GitHub, so I think a deprecation would be too annoying. I think we have to give a long lead to let it grow out to some extent.

  • This should be marked as 'discouraged' like we did withfigure(tight_layout=True).
  • Maybe we want to set a PendingDeprecationWarning but without a timeline for the actual deprecation. The pending warning will usually only affect downstream libraries but not end-users. It's good if at least libraries have moved away from it, so that we can actually deprecate if we choose to without downstream libs annoying users with non-actionable deprecation warnings.

@jklymak
Copy link
MemberAuthor

OK, so left the pending deprecations in, but changed the deprecation note to say that set_tight/constrained_layout are discouraged rather than that they will be deprecated.

@timhoffmtimhoffm merged commitdec1e13 intomatplotlib:mainFeb 2, 2022
@jklymakjklymak mentioned this pull requestFeb 3, 2022
6 tasks
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

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

[MNT]: Delay (or make pending) the deprecation of set_constrained_layout/set_tight_layout
3 participants
@jklymak@anntzer@timhoffm

[8]ページ先頭

©2009-2025 Movatter.jp