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

Doc: document pending deprecation procedure#29375

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
timhoffm merged 1 commit intomatplotlib:mainfromstory645:api-change
Jan 22, 2025

Conversation

story645
Copy link
Member

PR summary

In#29152 (comment)@rcomer flagged that the pending deprecation procedure wasn't documented, so I tried to write up what I inferred from her comment to be the procedure.

PR checklist

@github-actionsgithub-actionsbot added the Documentation: devdocsfiles in doc/devel labelDec 23, 2024
@story645story645force-pushed theapi-change branch 2 times, most recently from1b37fdf to8e95d75CompareDecember 23, 2024 03:30
Copy link
Member

@timhoffmtimhoffm left a comment
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I believe we’re mixing two aspects here.

  • when doing an API migration (“use this instead of that”) it can be helpful to have a version in which both APIs exists without without warning. This helps to write code that does not emit warnings and supports multiple versions without explicit version gating. It’s primarily helping downstream libraries who can’t aggressively pin matplotlib to recent releases.
  • pending deprecations are specifically about heads-up notifications to downstream libraries, so that they can update their cod. A user should typically not see a deprecation from a library, because they cannot fix it (other than updating to a new library version, which requires the library author to know about the deprecation before it’s regularly raised.)

There’s an overlap between the two, but they are not identical. For example, one could/should raise a pending depreciation warning for API removals.

Overall, the question of pending depreciations and migrations with a non-raising intermediate version is a trade off between how smooth the transition should be and how much effort and migration time we want to invest.

I haven’t completely thought this through. Some aspects to consider:

  • Nightly builds are an alternative way to give an heads-up. They can party replace pending depreciations. But that’s something typically only larger projects do. Also with that mechanism, changes should not be introduced in right before a release, because that reduces reaction time.
  • Sometimes we may just/or additionally notify “known users” if they are limited. Think: projections -> cartopy or rarely used APO -> GitHub code search results
  • The procedure may also depend on the expected frequency of use. It may be ok if users see a warning from a not—commonly used function in seaborn, but it’s not ok if we make every function of the current seaborne release emit a warning.
  • It can also depend on whether it’s just a cleanup (longer transitions are feasible) or it’s an enabler for upcoming changes (we don’t want to wait too long to introduce them)
  • I’ve not competently thought through all migration aspects for downstream libs: How does their release schedules and matplotlib version requirements strategy interplay with above deprecation strategies? Does the combination still deliver on the intended goals?

This has to be thought through carefully, otherwise we may complicate and delay our depreciations and thus the ability to improve without adding substantial benefit.

Overall, our current way of working seems not too bad. At least I’m not aware of complaints. We’re doing transition versions and pending depreciations on a case-by-case basis. It’s reasonable to document that they exist and what they are for, with a suggestion when to use them. But roughly, I don’t have the feeling we need to use them more often.

@rcomer
Copy link
Member

I’ve not competently thought through all migration aspects for downstream libs: How does their release schedules and matplotlib version requirements strategy interplay with above deprecation strategies?

In Cartopy we followSPEC0 so I think the new API would need to be around for a couple of years for us to transition without version gating. Having said that, I think most of the recentversion gates in Cartopy are either for things that MPL can’t reasonably provided a transition pathway for (e.g new structure ofContourSet) or code that takes advantage of new MPL features. So perhaps the Cartopy experience is not so relevant here.

@timhoffm
Copy link
Member

Yes this is one of the aspects to consider. In such cases, you typically can’t completely circumvent version gating. Nevertheless it may help to give downstream libs more time to implement the version gating.

rcomer reacted with thumbs up emoji

@timhoffmtimhoffm added the status: needs comment/discussionneeds consensus on next step labelJan 20, 2025
Copy link
Member

@timhoffmtimhoffm left a comment
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

When exactly to use pending deprecations is a complex topic, see#29375 (review). To move forward and not get stuck on details, I suggest to leave out the exact definition on when we apply pending deprecations for now.

Co-authored-by: Ruth Comer <10599679+rcomer@users.noreply.github.com>Co-authored-by: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com>
@story645
Copy link
MemberAuthor

Also added mini blurbs to introduce and expire to match the blurb for pending

@timhoffmtimhoffm removed the status: needs comment/discussionneeds consensus on next step labelJan 22, 2025
@timhoffmtimhoffm added this to thev3.11.0 milestoneJan 22, 2025
@timhoffmtimhoffm merged commit3703110 intomatplotlib:mainJan 22, 2025
22 of 23 checks passed
@story645story645 deleted the api-change branchJanuary 22, 2025 02:33
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@timhoffmtimhoffmtimhoffm approved these changes

Assignees
No one assigned
Labels
Documentation: devdocsfiles in doc/devel
Projects
None yet
Milestone
v3.11.0
Development

Successfully merging this pull request may close these issues.

3 participants
@story645@rcomer@timhoffm

[8]ページ先頭

©2009-2025 Movatter.jp