Skip to content
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 clash #282

Closed
davidedelvento opened this issue Jul 20, 2017 · 3 comments
Closed

name clash #282

davidedelvento opened this issue Jul 20, 2017 · 3 comments

Comments

@davidedelvento
Copy link

Thanks to this bug in pip, installing pyjwt and jwt at the same time causes a whole lot of issues with no warning whatsoever to the poor user. Please see pypa/pip#4625 and GehirnInc/python-jwt#9 for details.

And pretty please consider talk with the author of the other package and agree on a unique namespace.

@mark-adams
Copy link
Contributor

This is one of the unfortunate parts of working in Python and is rather hairy to deal with. I think it's difficult to solve because changing either library is a breaking change. I think the occurrence you're talking about is fairly rare though I'd be interested in seeing numbers of times projects require both libraries.

Because of the rarity, I don't really see how either project would see this as a big enough deal to actually make a change but I appreciate you bringing it up.

Thoughts @jpadilla ?

@davidedelvento
Copy link
Author

@mark-adams thanks for your consideration.

I understand why you don't want to make a breaking change, not even with a deprecation period during which both old and new name may be available, even though I think that in the long term this would be the most desirable outcome (in some environment people may want to use both packages).

Frankly, I have been seriously disappointed by the discussion about this issue in pip. As a workaround, would it be possible for you to add some logic in the install which pip executes? Something like

try:
    import the-other-jwt
    # success, bad: the-other-jwt is already installed
    abort install with a message explaining the situation
except ImportError:
    # good, other package is not present
    proceed with install

IMHO this will be great improvement compared to clobbering, and leave to the user the informed decision (i.e. picking one of the two packages, not installing or uninstalling the other), as opposed to a broken environment.

Thanks again!

@jpadilla
Copy link
Owner

jpadilla commented Sep 5, 2017

Agree with @mark-adams . Thanks for bringing this up, but will close for now.

@jpadilla jpadilla closed this as completed Sep 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants