-
Notifications
You must be signed in to change notification settings - Fork 1
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
name collision with matplotlib.pylab
#1
Comments
+1 for renaming/removing this package, we had users with the same issue. It is very tempting to do |
I'm sure this comes an annoyance to your project... I've been in a similar situation in the past for other things. Please do let us know if there's anything we can do to help with this... |
Renaming the project would be good. I got really confused looking through the dependencies for another project. For the name I propose With the @javipalanca, I'd be happy to prepare one or two PRs for that, just let me know! |
I'd be glad to receive a PR! |
Cool! Are you OK with the proposed |
Yes! It's ok for me! thanks! |
@javipalanca Did you manage to look into #4? This issue is a soft pre-requirement to fixing this bug. |
Sorry, had been out for a while. But the PR is now merged. Thanks! |
This is really annoying as it breaks any code that imports pylab e.g
or any other import from pylab I just helped a colleague who had this installed and was trying to get some legacy code using pylab running |
What still needs to happen before PyLab (this one, not a MatPlotLib one) is removed from the listing on PyPi? As long as it's hanging around there, it's going to continue causing namespace problems. |
Sorry, I was unable to continue to work on this and will be so for another few months (unless some unexpected spare time comes up). First things first: For backwards compatibility, it's probably not getting removed anytime soon from PyPI, unfortunately. Here's what I recommend to do:
Publishing and renaming the repo requires cooperation by @javipalanca, rest can be prepared and submitted as PRs. If I'm not getting to step 1 the next couple of days, feel free to take over. |
Sorry but the very existence of this package under that name on pypi causes a much larger backwards incompatibility issue. This package breaks any code that does
or any other pylab import since it replaces pylab from matplotlib with an empty package. That has been around for 10 years+ Consider the following realistic scenario. you have code that does
which fails. Naturally you assume that this is solved by doing
which does install matplotlib and numpy as you want but it also installs a pylab package that shadows the one from matplotlib. At the very least that package should be renamed to something else.
This can then be solved by:
|
fixed |
Thanks! The
Also, you marked the |
Thanks! |
@fbender done. |
pylab, though still used in many places - even within matplotlib gallery, it's not longer recommended: http://matplotlib.org/faq/usage_faq.html#matplotlib-pyplot-and-pylab-how-are-they-related also it's been removed in some editors that were loading that but default: https://support.enthought.com/hc/en-us/articles/206698863-Enthought-Training-on-Demand-pylab-mode-vs-explicit-imports Some people even created a pylab module, different than what the pylab used here and if people had such thing installed by `pip install pylab` then crashes with it. javipalanca/scibag#1 Thankfully now it's called `scibag` and the name conflict does not happen to new users, though many could have been "infected" by what was before.
The name
pylab
has been part of the matplotlib name space since 2004 (matplotlib/matplotlib@f210efb0a#diff-474f6c019adc7eda0f098ff1bd1af36e)
You should probably re-name your project and remove it from pypi as it as already causing confusion for users (http://stackoverflow.com/questions/30880407/pylab-does-not-have-any-attrs).
attn @mdboom @efiring
The text was updated successfully, but these errors were encountered: