You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following examples rely on at least one private API. They should be changed to not use the private API, or, if that's not possible, we should discuss how to make that API public.
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.
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...
Activity
jklymak commentedon Jan 16, 2019
For axes_grid I think we should consider how to make that a core functionality.
Avoid private API in some examples.
QuLogic commentedon 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 commentedon Jan 17, 2019
Perhaps that base class should be made public, if we want to support this kind of addition of BoxStyles.
timhoffm commentedon Aug 26, 2019
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 commentedon 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 commentedon 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...