Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Tweak argument checking in tripcolor(). #22883

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

Merged
merged 1 commit into from
Apr 24, 2022
Merged

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Apr 23, 2022

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

  • Has pytest style unit tests (and pytest passes).
  • Is Flake 8 compliant (install flake8-docstrings and run flake8 --docstring-convention=all).

Documentation

  • New features are documented, with examples if plot related.
  • New features have an entry in doc/users/next_whats_new/ (follow instructions in README.rst there).
  • API changes documented in doc/api/next_api_changes/ (follow instructions in README.rst there).
  • Documentation is sphinx and numpydoc compliant (the docs should build without error).

@anntzer anntzer added this to the v3.6.0 milestone Apr 23, 2022
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.
Copy link
Member

@oscargus oscargus left a comment

Choose a reason for hiding this comment

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

Should we merge #22884 for 3.5.2 and this for 3.6.0?

(Feel free to merge once decided.)

@anntzer
Copy link
Contributor Author

anntzer commented Apr 24, 2022

No, because #22356 was targeted to 3.6 to start with.

@oscargus
Copy link
Member

Ahh, good point! Just noted that #22884 was marked as 3.5.2, but then that is not a good idea!

@oscargus oscargus merged commit e142894 into matplotlib:main Apr 24, 2022
@anntzer anntzer deleted the tca branch April 24, 2022 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing f prefix on f-strings
3 participants