Tweak argument checking in tripcolor().#22883
Merged
oscargus merged 1 commit intomatplotlib:mainfrom Apr 24, 2022
Merged
Conversation
For incorrect number of parameters, switch to raising a (standard) TypeError and use a standard-ish signature mismatch error message. Note that exception type stability was already broken in 3.6 because it was previously an IndexError (that was triggered later) and 703b574 changed that to a ValueError. Also deprecate support for passing extra parameters (as we now tend to do for all such overly accepting APIs). Note that the changelog entry states that such parameters were previously silently ignored, even though the patch replaces a warn_external() by a warn_deprecated(); this is simply because the warn_external() wasn't present yet in the last released version.
tacaswell
approved these changes
Apr 24, 2022
Contributor
Author
|
No, because #22356 was targeted to 3.6 to start with. |
Member
|
Ahh, good point! Just noted that #22884 was marked as 3.5.2, but then that is not a good idea! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For incorrect number of parameters, switch to raising a (standard)
TypeError and use a standard-ish signature mismatch error message. Note
that exception type stability was already broken in 3.6 because it was
previously an IndexError (that was triggered later) and 703b574 changed
that to a ValueError.
Also deprecate support for passing extra parameters (as we now tend to
do for all such overly accepting APIs). Note that the changelog entry
states that such parameters were previously silently ignored, even
though the patch replaces a warn_external() by a warn_deprecated(); this
is simply because the warn_external() wasn't present yet in the last
released version.
Also closes #22882.
PR Summary
PR Checklist
Tests and Styling
pytestpasses).flake8-docstringsand runflake8 --docstring-convention=all).Documentation
doc/users/next_whats_new/(follow instructions in README.rst there).doc/api/next_api_changes/(follow instructions in README.rst there).