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

Removal of deprecated API cm#26965

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:mainfromUFEddy:deprecate-cm
Feb 8, 2024
Merged

Conversation

UFEddy
Copy link
Contributor

PR summary

PR addresses removal of deprecated API's referenced in issue#26865

Removals:

  • cm.register_cmap
  • cm.unregister_cmap
  • cm.get_cmap
  • pyplot.register_cmap

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

@QuLogicQuLogic left a comment

Choose a reason for hiding this comment

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

There are several documentation build failures, as these functions were referenced in old What's New? entries. These should be changed to code style, as noted in the original issue.

_colormaps.register(cmap, name=name, force=override_builtin)
_colormaps._allow_override_builtin = False


def _get_cmap(name=None, lut=None):
Copy link
Member

Choose a reason for hiding this comment

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

This code should be moved from here topyplot.py, as noted in their comments.

Copy link
Member

Choose a reason for hiding this comment

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

Also I don't see this one?

@QuLogicQuLogic added this to thev3.9.0 milestoneSep 30, 2023
@QuLogicQuLogic mentioned this pull requestSep 30, 2023
14 tasks
@QuLogic
Copy link
Member

Also, tests are failing because you didn't remove any tests that were for the old code.

@UFEddy
Copy link
ContributorAuthor

Thank you for reviewing the failures@QuLogic, I'll work on getting those updates in place.

@ksunden
Copy link
Member

Needs a rebase due to the build system change

- ``matplotlib.cm.get_cmap``; use ``matplotlib.colormaps[name]`` instead if you
have a `str`.

**Added 3.6.1** Use `matplotlib.cm.ColormapRegistry.get_cmap` if you
Copy link
Member

Choose a reason for hiding this comment

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

Don't need to keep theAdded 3.6.1 part.

_colormaps.register(cmap, name=name, force=override_builtin)
_colormaps._allow_override_builtin = False


def _get_cmap(name=None, lut=None):
Copy link
Member

Choose a reason for hiding this comment

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

Also I don't see this one?

@LiNk-NY
Copy link

LiNk-NY commentedOct 31, 2023
edited
Loading

@UFEddy Are you still working on this?
I can do the rebase and add the minor changes to the review.
So far, I havehttps://github.com/LiNk-NY/matplotlib/tree/deprecate-cm
comparison :main...LiNk-NY:matplotlib:deprecate-cm

@QuLogic
Copy link
Member

@LiNk-NY Since you've preserved the authorship there, I think maybe it should be alright to open a PR with your corrections.

@AkshitEP
Copy link

Hi, can i work on this issue for starting contributing in matplotlib

@QuLogic
Copy link
Member

In the interest of getting 3.9 finished, I've rebased this, squashed everything, and removed the duplicate_get_cmap.

LiNk-NY reacted with hooray emoji

- deprecated cm api removal documentation- Corrected formatting issues with documentation- Removed corresponding type sub in related cm.pyi file and exceptions in mypy-stubtest- Removed tests, updated documentation with code style for removed functions, moved code to pyplot from cm- Revert "Removed tests, updated documentation with code style for removed functions, moved code to pyplot from cm"  This reverts commita8a4f7f.- Documetation updates to match code style for deprecated api's- Removed tests for deprecated api's- Corrected documentation with full path and verbiage on removals- Removed handling of override builtin from ColorMaRegistry
@github-actionsgithub-actionsbot added the Documentation: examplesfiles in galleries/examples labelFeb 2, 2024
@timhoffmtimhoffm merged commit5fc82d1 intomatplotlib:mainFeb 8, 2024
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@QuLogicQuLogicQuLogic left review comments

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

@ksundenksundenksunden approved these changes

@timhoffmtimhoffmtimhoffm approved these changes

Assignees
No one assigned
Labels
Documentation: examplesfiles in galleries/examplesDocumentation: user guidefiles in galleries/users_explain or doc/usersMaintenancetopic: color/color & colormapstopic: pyplot API
Projects
Milestone
v3.9.0
Development

Successfully merging this pull request may close these issues.

6 participants
@UFEddy@QuLogic@ksunden@LiNk-NY@AkshitEP@timhoffm

[8]ページ先頭

©2009-2025 Movatter.jp