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

Properly propagate dependency markers #1829

merged 1 commit into from Jan 10, 2020


Copy link

@sdispater sdispater commented Jan 5, 2020

Pull Request Check List

  • Added tests for changed code.
  • Updated documentation for changed code.

This PR fixes the propagation of environment markers for dependencies. Before this change, the environment markers where not properly propagated which could cause false reports of incompatibilities. For instance, if you had the black dependency with the python_version >= '3.6' and implementation_name != 'pypy' environment marker, the resolution would fail with the following message:

The current project's Python requirement (~2.7 || ^3.4) is not compatible with some of the required packages Python requirement:
  - black requires Python >=3.6

Because no versions of black match >19.10b0,<20.0
 and black (19.10b0) requires Python >=3.6, black is forbidden.
So, because my-package depends on black (^19.10b0), version solving failed.

This is obviously wrong since we specified python_version >= '3.6' but the marker was lost during the resolution.

I took this opportunity to improve the way we handle markers to avoid producing markers that are obviously wrong or that can't be satisfied.

@sdispater sdispater added Bug Resolver labels Jan 5, 2020
@sdispater sdispater requested a review from Jan 5, 2020
@sdispater sdispater added this to In Progress in Bugs Jan 5, 2020
Copy link

@kasteph kasteph left a comment

This PR looks good, just one comment I have below which is more of a question :)

poetry/puzzle/ Show resolved Hide resolved
@sdispater sdispater merged commit 6e053e5 into master Jan 10, 2020
32 checks passed
Bugs automation moved this from In Progress to Closed Jan 10, 2020
@sdispater sdispater deleted the propagate-dependency-markers branch Jan 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Bug Resolver

Successfully merging this pull request may close these issues.

None yet

2 participants