question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Poetry resolves differently when fetching packages through a local devpi mirror

See original GitHub issue

Issue

Given the linked pyproject.toml, poetry will resolve differently (and incorrectly) when running against a local devpi mirror. Running poetry -vvv lock without custom package source against clean caches produces the following output:

Using virtualenv: /Users/bjoernpollex/Library/Caches/pypoetry/virtualenvs/poetry-futures-py3.6
Updating dependencies
Resolving dependencies...
   1: fact: poetry-futures is 0.1.0
   1: derived: poetry-futures
   1: fact: poetry-futures depends on isort (^4.3)
   1: selecting poetry-futures (0.1.0)
   1: derived: isort (^4.3)
PyPI: 5 packages found for isort >=4.3,<5.0
PyPI: Getting info for isort (4.3.4) from PyPI
PyPI: No dependencies found, downloading archives
PyPI: Downloading sdist: isort-4.3.4.tar.gz
   1: selecting isort (4.3.4)
   1: Version solving took 0.364 seconds.
   1: Tried 1 solutions.

Running with a local devpi mirror as a custom package source (uncomment the relevant lines in pyproject.toml, requires a local devpi-server running) gives this:

Using virtualenv: /Users/bjoernpollex/Library/Caches/pypoetry/virtualenvs/poetry-futures-py3.6
Updating dependencies
Resolving dependencies...
   1: fact: poetry-futures is 0.1.0
   1: derived: poetry-futures
   1: fact: poetry-futures depends on isort (^4.3)
   1: selecting poetry-futures (0.1.0)
   1: derived: isort (^4.3)
dev: 5 packages found for isort >=4.3,<5.0
dev: Downloading wheel: isort-4.3.4-py2-none-any.whl
dev: The cache for isort 4.3.4 is outdated. Refreshing.
dev: Downloading wheel: isort-4.3.4-py2-none-any.whl
   1: fact: isort (4.3.4) depends on futures (*)
   1: selecting isort (4.3.4)
   1: derived: futures (*)
dev: 22 packages found for futures *
dev: Downloading wheel: futures-3.2.0-py2-none-any.whl
dev: The cache for futures 3.2.0 is outdated. Refreshing.
dev: Downloading wheel: futures-3.2.0-py2-none-any.whl
   1: selecting futures (3.2.0)
   1: Version solving took 0.264 seconds.
   1: Tried 1 solutions.

For some reason, when running against the local mirror, poetry doesn’t figure out that (1) futures is not needed for isort on Python 3, and (2) that futures 3.2.0 is not compatible with Python 3 (it will fail to install).

I would expect poetry to come to the same and correct solution in both cases.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
sdispatercommented, Nov 24, 2018

Commit 750e31d should fix the issue and will be released with next bugfix version some time next week.

0reactions
stale[bot]commented, Nov 20, 2019

Closing this issue automatically because it has not had any activity since it has been marked as stale. If you think it is still relevant and should be addressed, feel free to open a new one.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Poetry resolves differently when fetching packages through a ...
Running with a local devpi mirror as a custom package source (uncomment the relevant lines in pyproject.toml , requires a local devpi-server ...
Read more >
FAQ | Documentation | Poetry - Python dependency ...
tox will create an sdist package of the project and uses pip to install it in a fresh environment. Thus, dependencies are resolved...
Read more >
Project Summaries - Python Packaging User Guide
bandersnatch is a PyPI mirroring client designed to efficiently create a complete mirror of the contents of PyPI. Organizations thus save bandwidth and ......
Read more >
[Rant] After going through literal HELL with Python's package ...
I know it has different strategy for resolving dependencies but that's somewhat tangential to the current discussion of installing and sourcing ...
Read more >
PyPI Repositories - JFrog - JFrog Documentation
Resolving from Artifactory Using pip · Using a Valid SSL Certificate with pip and Artifactory. pip uses packages from the local cache, (i.e....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found