MAINT: deprecate validCap, validJoin#18817
Conversation
b884fe9 to
c505b7b
Compare
QuLogic
left a comment
There was a problem hiding this comment.
We don't normally put a full version number with micro component.
|
I would also maybe wait until deprecation machinery is properly exposed from |
4f55d60 to
384d96a
Compare
Should be clean of any new references to |
384d96a to
d9674c3
Compare
|
@timhoffm Can you review whether this is the way you want |
|
Per the call, this should wait until I silence the deprecation warnings this emits in conf.py, specifically for autodoc. |
c6c3cd6 to
aed162f
Compare
|
Extra warnings have been quenched in |
lib/matplotlib/_api/deprecation.py
Outdated
|
|
||
| # has to be here (instead of cbook) to prevent circular import, since | ||
| # deprecation.deprecated is *used* during cbook's import | ||
| class _classproperty: |
There was a problem hiding this comment.
Since _api is already private.
| class _classproperty: | |
| class classproperty: |
Also, this isn't actually a deprecation; does it belong in this file, or in _api/__init__.py?
There was a problem hiding this comment.
Most of the functions in _api.deprecation are still underscore delimited for direct importing into cbook.deprecation, happy to fix this one as long as you guys (@timhoffm) are cool with me sending in another PR to do this to the rest of the methods in _api, since I would feel gross if we end up with some random combination of underscores and no underscores.
There was a problem hiding this comment.
Oh, almost missed your other question. It should be in __init__ now that deprecation isn't in cbook there's no more import-time circular stuff that can't be avoided by a local import.
lib/matplotlib/_api/deprecation.py
Outdated
| import warnings | ||
|
|
||
|
|
||
| # has to be here (instead of cbook) to prevent circular import, since |
There was a problem hiding this comment.
It will never be in cbook again; should this say _api, or is the comment now irrelevant?
There was a problem hiding this comment.
Yeah sorry, this comment was from before the _api changes, and should definitely read _api, not cbook.
ab249b4 to
46866fb
Compare
46866fb to
0b71fe0
Compare
PR Summary
Needed for #18544 (GSOD). Some new machinery was needed to add the deprecation while keeping the existing API (namely, the ability to access
validJoinas a class property directly, i.e.Line2D.validJoin), so I pulled the necessary code out into this PR.These properties already have long-existing comments marking them as "only there for backwards compatibility", and deprecation was initially suggested by @QuLogic.
PR Checklist
pytestpasses).flake8on changed files to check).flake8-docstringsand runflake8 --docstring-convention=all).doc/users/next_whats_new/(follow instructions in README.rst there).doc/api/next_api_changes/(follow instructions in README.rst there).