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

poetry lock has an issue with removing the marker caveat on certain packages #3048

Closed
3 tasks done
xM8WVqaG opened this issue Oct 2, 2020 · 3 comments · Fixed by #3080
Closed
3 tasks done

poetry lock has an issue with removing the marker caveat on certain packages #3048

xM8WVqaG opened this issue Oct 2, 2020 · 3 comments · Fixed by #3080
Labels
kind/bug Something isn't working as expected

Comments

@xM8WVqaG
Copy link

xM8WVqaG commented Oct 2, 2020

  • I am on the latest Poetry version.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).
  • OS version and name: Ubuntu 18.04 bionic
  • Poetry version: master-04833bc (1.1.0)
  • Link of a Gist with the contents of your pyproject.toml file: N/A

Issue

Following up to #3028, I grabbed master to run poetry lock --no-update on every project we have to fix the lockfile.

However, after running poetry lock --no-update on a package that installed docker it removed the win32 caveat breaking the install.

Source of pywin32:

$ poetry show --tree
|-- docker >=4.2.1,<5.0.0
|   |-- pypiwin32 223 
|   |   `-- pywin32 >=223 
|   |-- requests >=2.14.2,<2.18.0 || >2.18.0 
|   |   |-- certifi >=2017.4.17 
|   |   |-- chardet >=3.0.2,<4 
|   |   |-- idna >=2.5,<3 
|   |   `-- urllib3 >=1.21.1,<1.25.0 || >1.25.0,<1.25.1 || >1.25.1,<1.26 
|   |-- six >=1.4.0 
|   `-- websocket-client >=0.32.0 
|       `-- six * (circular dependency aborted here)
$ poetry install
Installing dependencies from lock file

Package operations: 65 installs, 0 updates, 0 removals

<snip>
  • Installing pywin32 (228): Failed

  RuntimeError

  Unable to find installation candidates for pywin32 (228)

  at /REDACTED/venv/lib/python3.8/site-packages/poetry/installation/chooser.py:72 in choose_for
       68│ 
       69│             links.append(link)
       70│ 
       71│         if not links:
    →  72│             raise RuntimeError(
       73│                 "Unable to find installation candidates for {}".format(package)
       74│             )
       75│ 
       76│         # Get the best link

  • Installing rsa (4.6)
  • Installing smmap (3.0.4)

Here is the relevant diff on the poetry.lock:

 [[package]]
-category = "dev"
-description = "Python for Window Extensions"
-marker = "sys_platform == \"win32\" and python_version >= \"3.6\""
 name = "pywin32"
+version = "228"
+description = "Python for Window Extensions"
+category = "dev"
 optional = false
 python-versions = "*"
-version = "228"

I can confirm that by restoring the marker = "sys_platform == \"win32\" and python_version >= \"3.6\"" poetry install works again.

@xM8WVqaG xM8WVqaG added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Oct 2, 2020
abn added a commit to abn/poetry that referenced this issue Oct 2, 2020
This change ensures that we resolve dependencies to correctly propagate
markers when using `lock --no-update`.

Resolves: python-poetry#3048
@abn
Copy link
Member

abn commented Oct 2, 2020

@xM8WVqaG can you try #3051 please?

@xM8WVqaG
Copy link
Author

xM8WVqaG commented Oct 2, 2020

Just tried the branch from your MR and I can confirm that I can no longer reproduce this issue.

Thanks for the quick turn around!

abn added a commit to abn/poetry that referenced this issue Oct 2, 2020
This change ensures that we resolve dependencies to correctly propagate
markers when using `lock --no-update`.

Resolves: python-poetry#3048
abn added a commit to abn/poetry that referenced this issue Oct 2, 2020
This change ensures that we resolve dependencies to correctly propagate
markers when using `lock --no-update`.

Resolves: python-poetry#3048
abn added a commit to abn/poetry that referenced this issue Oct 2, 2020
This change ensures that we resolve dependencies to correctly propagate
markers when using `lock --no-update`.

Resolves: python-poetry#3048
abn added a commit to abn/poetry that referenced this issue Oct 2, 2020
This change ensures that we resolve dependencies to correctly propagate
markers when using `lock --no-update`.

Resolves: python-poetry#3048
abn added a commit to abn/poetry that referenced this issue Oct 2, 2020
This change ensures that we resolve dependencies to correctly propagate
markers when using `lock --no-update`.

Resolves: python-poetry#3048
@abn abn removed the status/triage This issue needs to be triaged label Oct 2, 2020
finswimmer pushed a commit that referenced this issue Oct 5, 2020
This change ensures that we resolve dependencies to correctly propagate
markers when using `lock --no-update`.

Resolves: #3048
abn added a commit to abn/poetry that referenced this issue Oct 5, 2020
This change ensures that we resolve dependencies to correctly propagate
markers when using `lock --no-update`.

Resolves: python-poetry#3048
finswimmer pushed a commit that referenced this issue Oct 5, 2020
This change ensures that we resolve dependencies to correctly propagate
markers when using `lock --no-update`.

Resolves: #3048
finswimmer pushed a commit to finswimmer/poetry that referenced this issue Oct 7, 2020
This change ensures that we resolve dependencies to correctly propagate
markers when using `lock --no-update`.

Resolves: python-poetry#3048
Copy link

github-actions bot commented Mar 2, 2024

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Something isn't working as expected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants