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

[Bug] Cannot install elephant with new Neo 0.7.2 #236

Closed
jpgill86 opened this issue Jul 10, 2019 · 6 comments
Closed

[Bug] Cannot install elephant with new Neo 0.7.2 #236

jpgill86 opened this issue Jul 10, 2019 · 6 comments

Comments

@jpgill86
Copy link
Contributor

jpgill86 commented Jul 10, 2019

Neo 0.7.2 was just released today (NeuralEnsemble/python-neo#687). However, until the typo that was fixed in #218 makes it onto PyPI in a new version of elephant, pip cannot resolve dependencies that include

neo>=0.7.2
elephant>=0.6.2

To fix this, elephant 0.6.3 (or 0.6.2.1) would need to be released including the fix from #218.

@jpgill86
Copy link
Contributor Author

jpgill86 commented Jul 10, 2019

As an aside, I find the current requirement neo<0.8.0 for elephant to be very annoying.

I understand it's motivated by the intention to provide paired releases between elephant and Neo. However, if I have the development version of Neo installed, pip sees my Neo version as 0.8.0.dev, which violates the requirement neo<0.8.0, and pip automatically replaces it with an old version. Very obnoxious. When I manually reinstall Neo dev, I get this warning, though I can ignore it:

elephant 0.6.2 has requirement neo<0.8.0,>=0.7.1, but you'll have neo 0.8.0.dev0 which is incompatible.

EDIT: Interestingly, if the upper bound was changed from neo<0.8.0 to neo<0.8.0a, this particular conflict would go away. Anyway, I'm derailing my own issue... 🤣

@jpgill86
Copy link
Contributor Author

jpgill86 commented Jul 17, 2019

Is anyone with the appropriate privileges willing to create a maintenance branch called "0.6.x" starting at the "v0.6.2" tag?

Once that is done, I can create a pull request against that branch that backports a67b33f into it. After it is merged, I will politely ask again if anyone is willing to create a release from the maintenance branch containing the fix (called 0.6.2.1 or 0.6.3, dealer's choice).

If a new version of elephant containing this tiny fix is released, I will finally be able to announce a new package that depends on it. Until then, my package cannot be installed from pip properly thanks to the conflict between elephant 0.6.2 and neo 0.7.2. 😢

@dizcza
Copy link
Member

dizcza commented Jul 18, 2019

You introduced two issues here.

The first one, dependency conflict between elephant v0.6.2 and neo v0.7.2, will be fixed by creating a new elephant release v0.6.3 once #239 is merged.

Regarding the second issue, I don't know an easy fix for this. I tried to find out how other packages deal with dev version, but I have not found any mentions. Did you find the workaround neo<0.8.0a just by trying or you have a link that someone else does this? For me, neo<0.8.0a seems like a hack and is not obvious at all, and thus I don't want to include it.

@jpgill86
Copy link
Contributor Author

You introduced two issues here.

Mea culpa.

The first one, dependency conflict between elephant v0.6.2 and neo v0.7.2, will be fixed by creating a new elephant release v0.6.3 once #239 is merged.

Thank you!

Regarding the second issue, I don't know an easy fix for this. I tried to find out how other packages deal with dev version, but I have not found any mentions. Did you find the workaround neo<0.8.0a just by trying or you have a link that someone else does this? For me, neo<0.8.0a seems like a hack and is not obvious at all, and thus I don't want to include it.

I can't remember exactly how I discovered it, I think I was working with some automated tool, perhaps pyoxidizer, which created a file for me containing a requirements spec like <0.8.0a, and it piqued my curiosity. I tried it locally for elephant and found it made a difference. I started drafting a separate issue containing a proposal to change how elephant specified requirements, but when I searched for references I found contradictory information!

For example, PEP 440 states that the version ordering should be 0.8.0.dev < 0.8.0a < 0.8.0. If that's how pip actually resolved version ordering, then we wouldn't have this problem in the first place!

So I decided to drop it and deleted my draft. 🤣 Sorry for the time you have already spent looking into that issue with me. I agree that it seems like a hack. Perhaps tomorrow the pip team will realize they aren't following PEP 440 and will change it, and adopting the hack for elephant will have been a mistake. I'll find a way to continue living with neo<0.8.0 in my dev environment. 😊

However, the first issue of conflicting versions is harder to work around, since it affects how my users install my package, rather than just how I set up my local dev environment. I appreciate your willingness to create a new release soon that includes the fix in #218. Thanks again!

@dizcza
Copy link
Member

dizcza commented Jul 23, 2019

  1. The release v0.6.3 is published.
  2. I checked the pep 440 about version resolving you linked and I also find that pip does not follow it. Maybe, one should fire an issue for pip or at least ask for clarification. I don't feel I'll do it soon. For now, I leave it as it is, keeping it running in the back of my mind.

@dizcza dizcza closed this as completed Jul 23, 2019
@jpgill86
Copy link
Contributor Author

Thank you for the release!

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

2 participants