8000 Automatic API deprecations generator. by anntzer · Pull Request #15246 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Automatic API deprecations generator. #15246

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

Closed
wants to merge 1 commit into from

Conversation

anntzer
Copy link
Contributor
@anntzer anntzer commented Sep 11, 2019

PR Summary

Just a prototype (proposed during the dev call), written to perhaps alleviate the problems in #15158 (documentation of api changes is a pain). Perhaps not to be taken too seriously... dunno.

Run tools/api_changes_generator.py.

Collection of @deprecated basically works.
Collection of warn_deprecated has some rough spots.
Collection of @_delete_parameter, @_rename_parameter,
@_make_keyword_only is not implemented yet but should be easy to do.

Goes on top of #15245, which were caught by this...

PR Checklist

  • Has Pytest style unit tests
  • Code is Flake 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

Run tools/api_changes_generator.py.

Collection of `@deprecated` basically works.
Collection of `warn_deprecated` has some rough spots.
Collection of `@_delete_parameter`, `@_rename_parameter`,
`@_make_keyword_only` is not implemented yet but should be easy to do.
@jklymak
Copy link
Member
jklymak commented Sep 11, 2019

Seems useful but is it enough to say something has been deprecated? Usually we explain why as well? I guess I’d be ok w the decorator containing that info though it’s a bit verbose. Ie a reason kwarg that doesn’t get printed as the message but still lives in the source code?

@anntzer
Copy link
Contributor Author
anntzer commented Sep 11, 2019

In general we don't have more than that in the handwritten API notes either -- and the automated approach scrapes the message argument anyways.

@anntzer
Copy link
Contributor Author
anntzer commented Jul 5, 2022

Closing as inactive; we can always reopen if we want to revisit.

@anntzer anntzer closed this Jul 5, 2022
@anntzer anntzer deleted the autodeprecations branch July 5, 2022 21:16
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.

2 participants
0