-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Removal of deprecated API cm #26965
Conversation
There was a problem hiding this 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.
There was a problem hiding this 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.
lib/matplotlib/cm.py
Outdated
_colormaps.register(cmap, name=name, force=override_builtin) | ||
_colormaps._allow_override_builtin = False | ||
|
||
|
||
def _get_cmap(name=None, lut=None): |
There was a problem hiding this comment.
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 to pyplot.py
, as noted in their comments.
There was a problem hiding this comment.
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?
Also, tests are failing because you didn't remove any tests that were for the old code. |
Thank you for reviewing the failures @QuLogic, I'll work on getting those updates in place. |
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 |
There was a problem hiding this comment.
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 the Added 3.6.1
part.
lib/matplotlib/cm.py
Outdated
_colormaps.register(cmap, name=name, force=override_builtin) | ||
_colormaps._allow_override_builtin = False | ||
|
||
|
||
def _get_cmap(name=None, lut=None): |
There was a problem hiding this comment.
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?
@UFEddy Are you still working on this? |
@LiNk-NY Since you've preserved the authorship there, I think maybe it should be alright to open a PR with your corrections. |
Hi, can i work on this issue for starting contributing in matplotlib |
In the interest of getting 3.9 finished, I've rebased this, squashed everything, and removed the duplicate |
- 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 commit a8a4f7f. - 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
PR summary
PR addresses removal of deprecated API's referenced in issue #26865
Removals:
PR checklist