Skip to content

Examples that use private APIs #13199

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
anntzer opened this issue Jan 16, 2019 · 6 comments · Fixed by #17737
Closed

Examples that use private APIs #13199

anntzer opened this issue Jan 16, 2019 · 6 comments · Fixed by #17737
Milestone

Comments

@anntzer
Copy link
Contributor

anntzer commented Jan 16, 2019

@jklymak
Copy link
Member

jklymak commented Jan 16, 2019

For axes_grid I think we should consider how to make that a core functionality.

@tacaswell tacaswell added this to the v3.1 milestone Jan 16, 2019
QuLogic added a commit to QuLogic/matplotlib that referenced this issue Jan 17, 2019
Refs matplotlib#13199; all but the last are fixed.
@QuLogic
Copy link
Member

QuLogic commented Jan 17, 2019

The last example seems to exist solely to derive from that private API, so I don't know what to do about it.

@anntzer
Copy link
Contributor Author

anntzer commented Jan 17, 2019

Perhaps that base class should be made public, if we want to support this kind of addition of BoxStyles.

@timhoffm timhoffm modified the milestones: v3.1.0, v3.2.0 Feb 15, 2019
@timhoffm timhoffm modified the milestones: v3.2.0, v3.3.0 Aug 26, 2019
@timhoffm
Copy link
Member

As written elsewhere, I have doubts that private base classes are a reasonable approach. Their code leaks into the child classes, which is intended, but OTOH confusing because you're not seeing the base class. This also messes up sphinx because the inherited methods are not documented and cannot be linked.

Generally, I cannot remember to have seen private base classes anywhere else. I feel it's better to make the base class public, but some of it's members private or abstract.

@QuLogic
Copy link
Member

QuLogic commented Jun 20, 2020

Note, as part of #16615, the last example was merged into https://github.com/matplotlib/matplotlib/blob/master/examples/userdemo/custom_boxstyle01.py though the private API is still used.

@anntzer
Copy link
Contributor Author

anntzer commented Jun 20, 2020

I have an idea of how to get rid of that private base class (essentially, move the mutation aspect handling out of __call__ and into the (only) call site, but as usual this will require ginormous amounts of deprecation machinery. I'll work on it at some point...

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

Successfully merging a pull request may close this issue.

5 participants