-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Strange skipping of dependencies when python requirement is specified ("Not needed for the current environment") #2187
Comments
Might be related to #2177 Although the issues are unrelated, I tried the suggested resolution and it didn't work in my case as well. #2177 (comment) |
I just went through and tested all prior poetry versions down to 0.12.13 which is where I gave up and the bug seems to exist in each of those releases. |
Okay, I think I've figured out the bug after some debugging. Basically, dependency resolution that includes a python patch version breaks down in a weird way due to the difference between the |
The short-term solution to my problem is to not use patch versions. Looking at the codebase it seems that it will be somewhat difficult to refactor the codebase to allow for patch version python version constraints. The concept of An example of why this might be difficult to re-factor is here. It's where I left off and if someone decides to take this up, what needs to be done, as far as I understand it, is to modify the
poetry/poetry/packages/package.py Line 349 in d27a119
if not markers:
marker = AnyMarker()
if python_versions:
dependency.python_versions = python_versions
marker = marker.intersect(
parse_marker(
create_nested_marker(
"python_version", dependency.python_constraint
)
)
) |
This was duplicated by #3347, and is now long since fixed. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
-vvv
option).Poetry Debug Info
MVP Erroring pyproject.toml
Issue
When I run poetry install I expect all packages to be installed when running python 3.6.8, that doesn't seem to happen and I get the following output. It does work if I remove the python requirement on the dependency.
While this configuration doesn't make much sense in this case, consider the case where multiple python versions need to be supported (ie in my case I'm making the last release for python 2.7 for a package and thus, need to support multiple python versions at least for one more release.
I also know that this bug isn't isolated to seed-isort-config, I tried a few other packages just to be safe and found it produces the same result for flake8, etc... So it seems to be a poetry issue.
The text was updated successfully, but these errors were encountered: