API: Add entrypoint for plotting by TomAugspurger · Pull Request #27488 · pandas-dev/pandas (original) (raw)
it does couple the api of the package to pandas directly, meaning we then need to make an update in pandas to actually use a new package / api.
I may be misunderstanding, but I don't see how the change to use entrypoints affects that. If you're saying that we'll need to update pandas so that set_option('plotting.backend', 'altair')
works, then that's not correct. The only change required after this is that altair (or pdvega, whatever package) adds an EntryPoint for pandas_plotting_backends
in its setup.py.
Basically, pandas adds an EntryPoint "group" in our setup.py. And third party libraries add items to that group in their setup.pys. Pandas and the library don't need to talk to each other directly to register a backend. We talk through pkg_resources
.
So this is nice, I would then also allow a fully qualified module.function call to succeed
We do allow that (see test_register_import
).