You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make arguments to @deprecated/warn_deprecated keyword-only.
(except for the deprecated-since version)
In 2.2 there were quite a few deprecation warnings of the form
```
warn_deprecated("2.2", "name-of-the-deprecated-API")
```
(e.g. passing 'box-forced' to set_adjustable, or the 'fig' kwarg to
get_subplot_params).
Such warnings would just display the name of the deprecated API when
triggered, without actually including a deprecation message or the
deprecated-since version. This is because the correct call would have
been
```
warn_deprecated("2.2", name="name-of-the-deprecated-API")
```
(leaving `message` -- the first arg -- to None, and getting an
autogenerated message).
To avoid this, make all args to `warn_deprecated` and `@deprecated`
keyword-only (except the deprecated-since version).
There is no deprecation period on the old signature of these deprecator
functions(!) because they are clearly intended for internal use, because
handling signature changes is a bit of a pain and because deprecations
on the deprecation machinery is a bit too meta.
0 commit comments