Skip to content

Various fixes to deprecated and warn_deprecated. #11395

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
Jun 25, 2018

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Jun 7, 2018

  • Make pending=True actually emit a PendingDeprecationWarning, as
    advertised, and make it incompatible with removal, which seems
    semantically reasonable (removal itself is a new API in 3.0 so
    that's not an API break).

  • Restore use of %-formatting instead of .format for the message
    formatting, to restore accidentally broken backcompat (which was
    never released).

  • Restore support for the addendum kwarg, whose effect had
    accidentally been removed.

  • The @deprecated decorator has always ignored obj_type (forcefully
    overwriting it with the type of whatever is actually being decorated)
    so we may as well make it not support obj_type at all.

  • Remove a Py2 branch.

(I noticed that @timhoffm just beat me to it in #11394 but this PR does a lot more.)
See #11387 (comment).

PR Summary

PR Checklist

  • Has Pytest style unit tests
  • Code is PEP 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

- Make `pending=True` actually emit a PendingDeprecationWarning, as
  advertised, and make it incompatible with `removal`, which seems
  semantically reasonable (`removal` itself is a new API in 3.0 so
  that's not an API break).

- Restore use of %-formatting instead of .format for the message
  formatting, to restore accidentally broken backcompat (which was
  never released).

- Restore support for the `addendum` kwarg, whose effect had
  accidentally been removed.

- The `@deprecated` decorator has always ignored `obj_type` (forcefully
  overwriting it with the type of whatever is actually being decorated)
  so we may as well make it not support `obj_type` at all.

- Remove a Py2 branch.
@jklymak jklymak closed this Jun 24, 2018
@jklymak jklymak reopened this Jun 24, 2018
@QuLogic QuLogic merged commit ca07df4 into matplotlib:master Jun 25, 2018
@anntzer anntzer deleted the deprecations branch June 25, 2018 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants