Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

MAINT: deprecate validCap, validJoin#18817

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

brunobeltran
Copy link
Contributor

@brunobeltranbrunobeltran commentedOct 26, 2020
edited
Loading

PR Summary

Needed for#18544 (GSOD). Some new machinery was needed to add the deprecation while keeping the existing API (namely, the ability to accessvalidJoin as 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

  • Has pytest style unit tests (andpytest passes).
  • IsFlake 8 compliant (runflake8 on changed files to check).
  • [N/A] New features are documented, with examples if plot related.
  • Documentation is sphinx and numpydoc compliant (the docs shouldbuild without error).
  • Conforms to Matplotlib style conventions (installflake8-docstrings and runflake8 --docstring-convention=all).
  • [N/A] New features have an entry indoc/users/next_whats_new/ (follow instructions in README.rst there).
  • API changes documented indoc/api/next_api_changes/ (follow instructions in README.rst there).

Copy link
Member

@QuLogicQuLogic left a comment

Choose a reason for hiding this comment

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

We don't normally put a full version number with micro component.

@QuLogic
Copy link
Member

I would also maybe wait until deprecation machinery is properly exposed from_api, so as to not introduce morecbook usage.

brunobeltran reacted with thumbs up emoji

@brunobeltranbrunobeltranforce-pushed thedeprecate_valid_joincap branch 3 times, most recently from4f55d60 to384d96aCompareOctober 27, 2020 20:41
@brunobeltran
Copy link
ContributorAuthor

I would also maybe wait until deprecation machinery is properly exposed from_api, so as to not introduce morecbook usage.

Should be clean of any new references tocbook now.

@QuLogic
Copy link
Member

Based on#18823, I'm not sure that's the way@timhoffm wants to go, but it's still not ready yet.

@brunobeltran
Copy link
ContributorAuthor

brunobeltran commentedNov 3, 2020
edited
Loading

@timhoffm Can you review whether this is the way you want_api.deprecation to be used moving forward? It sounds like otherwise,this might be ready?

@brunobeltran
Copy link
ContributorAuthor

Per the call, this should wait until I silence the deprecation warnings this emits in conf.py, specifically for autodoc.

@brunobeltranbrunobeltranforce-pushed thedeprecate_valid_joincap branch 2 times, most recently fromc6c3cd6 toaed162fCompareNovember 5, 2020 01:16
@brunobeltran
Copy link
ContributorAuthor

Extra warnings have been quenched inconf.py. Thankfullywarnings allows enough specificity to explicit ask it to ignorejustMatplotlibDeprecationWarnings coming specifically from thesphinx.util.inspect module.

@@ -16,6 +16,42 @@
import warnings


# has to be here (instead of cbook) to prevent circular import, since
# deprecation.deprecated is *used* during cbook's import
class _classproperty:
Copy link
Member

Choose a reason for hiding this comment

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

Since_api is already private.

Suggested change
class_classproperty:
classclassproperty:

Also, this isn't actually a deprecation; does it belong in this file, or in_api/__init__.py?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Most of the functions in_api.deprecation are still underscore delimited for direct importing intocbook.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.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Oh, almost missed your other question. It should be in__init__ now thatdeprecation isn't incbook there's no more import-time circular stuff that can't be avoided by a local import.

@@ -16,6 +16,42 @@
import warnings


# has to be here (instead of cbook) to prevent circular import, since
Copy link
Member

Choose a reason for hiding this comment

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

It will never be incbook again; should this say_api, or is the comment now irrelevant?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Yeah sorry, this comment was from before the_api changes, and should definitely read_api, not cbook.

@brunobeltranbrunobeltranforce-pushed thedeprecate_valid_joincap branch 4 times, most recently fromab249b4 to46866fbCompareNovember 5, 2020 15:11
Copy link
Member

@QuLogicQuLogic left a comment

Choose a reason for hiding this comment

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

Small docstring typo.

@QuLogicQuLogic added this to thev3.4.0 milestoneNov 7, 2020
@QuLogicQuLogic merged commit97115ae intomatplotlib:masterNov 7, 2020
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@QuLogicQuLogicQuLogic approved these changes

@timhoffmtimhoffmtimhoffm approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
v3.4.0
Development

Successfully merging this pull request may close these issues.

3 participants
@brunobeltran@QuLogic@timhoffm

[8]ページ先頭

©2009-2025 Movatter.jp