[Pandas-dev] Avoiding Dependencies on Private Modules

Matthew Gidden matthew.gidden at gmail.com
Fri Jul 19 06:45:20 EDT 2019


Hi all,

I am one of the developers of a niche scientific library, pyam [1]. We
provide some standard plotting routines for users with our specific data
model, many of which are shims for pandas plotting. In order to keep track
of certain aspects of data-plot attributes, we utilize the
`_get_standard_colors()` [2]. Before pandas 0.25.0, this lived in
pandas.plotting._style. Now it lives in pandas.plotting._matplotlib.style.
Of course, this change breaks our package - we know this is our fault for
relying on a private module =).

Therefore - I wanted to ask the list whether there is a better way to get
this functionality that is provided in first-class public interfaces? For
now we can hotfix the issue, but we would like to try to guarantee
stability in the future.

Cheers,
Matt

[1] https://pyam-iamc.readthedocs.io/en/latest/
[2] https://github.com/IAMconsortium/pyam/blob/master/pyam/plotting.py#L37
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pandas-dev/attachments/20190719/f4f63c28/attachment.html>


More information about the Pandas-dev mailing list