Move cbook._check_in_list() to _api.check_in_list() by timhoffm · Pull Request #18494 · matplotlib/matplotlib · GitHub
Skip to content

Move cbook._check_in_list() to _api.check_in_list() - #18494

Merged
QuLogic merged 1 commit into
matplotlib:masterfrom
timhoffm:private-api
Sep 17, 2020
Merged

QuLogic merged 1 commit into
matplotlib:masterfrom
timhoffm:private-api

Conversation

@timhoffm

@timhoffm timhoffm commented Sep 15, 2020

Copy link
Copy Markdown
Member

PR Summary

Start addresses the following section of #16181:

Move all the internal cbook functions to (a/multiple) private module(s).

from matplotlib import _api

@_api.deprecated("3.2")
def compare_versions(a, b):

reads better than the current

from matplotlib import cbook

@cbook._deprecated("3.2")
def compare_versions(a, b):

and it does not pollute the namespace with the public package name.

This PR does:

  • Move cbook._check_in_list() to _api.check_in_list()

@timhoffm timhoffm added this to the v3.4.0 milestone Sep 15, 2020

@dopplershift dopplershift left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good. Just one minor nit.

Comment thread lib/matplotlib/lines.py Outdated
Comment thread lib/matplotlib/_api.py Outdated
@QuLogic

QuLogic commented Sep 16, 2020

Copy link
Copy Markdown
Member

@timhoffm

Copy link
Copy Markdown
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants