-
-
Notifications
You must be signed in to change notification settings - Fork 615
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
Sync raises IncompatibleRequirements even when environment markers indicate the incompatible requirements to be irrelevant for the current platform #925
Comments
Hello @AndydeCleyre, Thanks for filing this issue. I would be against to enhance the pip-sync outside of pip-compile. I think pip-compile should be improved first to handle multiple environments (python versions, operation systems, etc.), and then pip-sync should honor this improvement. OTOH I can't imagine how to make a cross-environment compilation without a locking file (the way how
You are right. It's not a bug in the current implementation.
Not pip-sync, but pip-compile is generally desired to honor env markers. |
Thanks for being so active on here @atugushev, and for all the great feedback.
A few thoughts on this:
In that same discussion, contributor @barrywhart proposes working around the limited environment marker support:
All that is to say: we all know the environment markers handling isn't ideal or easy, but we are interested in making it a little better, and in having pip-sync act as smart as pip install when encountering them, and encountering them in a txt is a legitimate case that was intentionally improved upon already.
With all the existing issues and discussions that I've linked, do you deny that there is a desire for pip-sync to honor env markers? Is it really better for users to have pip-sync fail on this input, rather than install the matching package to the environment? paramiko==2.4.0 ; python_version < '2.7'
paramiko==2.6.0 ; python_version >= '2.7'
If you've gotten this far, thanks for reading! Is there anyone else you'd like to loop into these discussions? Looks like you've got over 100 commits this year more than the next-place contributor, who's in the single digits, so I really don't know who ought to be included here. Thanks again for keeping this beautiful project alive. |
Apologies for confusing. I meant pip-tools as a comprehensive solution, not pip-compile directly.
I don't think the community rejects this. Just wait for the feedback of members who interested in this feature. As for me, I don't use pip-tools in multiple environments, so I'm useless here and can't give comprehensive feedback, sorry for that.
You should probably ask project leaders @vphilippon @davidovich.
Thanks for the kind words! I appreciate it. |
FTR, "official stance of pip-tools regarding cross-environment usage" described in #585 (comment). |
Requesting more discussion, please. @atugushev @vphilippon @davidovich @barrywhart @hazmat345 @merwok I still think that as much as possible,
I don't see what's wrong with reversing the order: first get |
You convinced me and I've approved the PR 👍 |
IMO this is simply more of #206, and I've already demonstrated the problem there. But it's been a month and no one has re-opened, so I'm opening this more specific issue to address the problem.
Here's an example
dev-requirements.txt
from theplumbum
project:Identical output whether in a Python
3.7.4
or2.7.16
env:No packages end up installed aside from
pip-tools
and its deps.Environment Versions
3.7.4
19.2.3
4.1.0
Steps to replicate
Note that this works:
Expected result
pip-sync
should ignore non-matching requirements when environment markers are present.Actual result
pip-sync
checks for conflicts as if it wants to install requirements for all platforms.Further notes
Currently, compiling such an in-file will only include the compile-time platform's matching reqs. This hides the issue under discussion, and arguably means it's not a bug. But I believe it is generally desired for pip-sync to honor environment markers, as evidenced by the contents of #206 (closed, but not solved), #600 (merged), #459 (replaced), #460 (merged), #518 (open 2yrs), #563 (open 2yrs), #585 (open 2yrs), #896 (open), etc.
This is probably even more relevant for working with a single python version across different platforms.
The text was updated successfully, but these errors were encountered: