Skip to content

backends: declare public API#4486

Closed
KelvinLi wants to merge 2 commits into
matplotlib:masterfrom
KelvinLi:mark-api
Closed

backends: declare public API#4486
KelvinLi wants to merge 2 commits into
matplotlib:masterfrom
KelvinLi:mark-api

Conversation

@KelvinLi
Copy link
Copy Markdown

This is a successor request to #4363. It was decided that removing unused imports from the backends was bad for backwards compatibility. This time, we simply declare the public API via the __all__ module constant.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why did this get removed?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I thought that cmd_split wasn't used anywhere. But I'm probably wrong in trying to do too many things in this pull request. Maybe it's possible that users are depending on it?

@tacaswell
Copy link
Copy Markdown
Member

The __all__ lists are not consistent across backends which I thought was the point (to make the public API consistent across all of the backends).

@tacaswell tacaswell added this to the proposed next point release milestone May 30, 2015
@fariza
Copy link
Copy Markdown
Member

fariza commented Jun 8, 2015

Maybe I'm misunderstanding this issue. We have forced every backend to declare Normalized names

....
FigureCanvas = FigureCanvasGTK3
FigureManager = FigureManagerGTK3
...

Why don't just expose those "mandatory" names as public API instead of exposing each backend specific names?

@tacaswell
Copy link
Copy Markdown
Member

@fariza That is what I am thinking. The backend-specific backends will still be available via from backend import FigureCanvasSnowflake, you just won't get it from from backend import *.

This will probably will break a fair amount of code, but I can't see how to warn people that are currently doing from bulk imports that are looking for backend specific classes.

@tacaswell tacaswell modified the milestones: 2.1 (next point release), 2.2 (next next feature release) Sep 24, 2017
@jklymak
Copy link
Copy Markdown
Member

jklymak commented May 9, 2018

This PR looks to be moot now? Closing, but feel free to re-open if I'm in error....

@jklymak jklymak closed this May 9, 2018
@story645 story645 removed this from the future releases milestone Oct 6, 2022
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.

7 participants