Poetry installs successfully a dependency via URL, but fails via local path #8682
Closed
Description
- Poetry version:
1.7.0
- Python version:
3.10.12
- OS version and name: MacOS 14.0
- pyproject.toml:
- I am on the latest stable Poetry version, installed using a recommended method.
- I have searched the issues of this repo and believe that this is not a duplicate.
- I have consulted the FAQ and blog for any relevant entries or release notes.
- If an exception occurs when executing a command, I executed it again in debug mode (
-vvv
option) and have included the output below.
Issue
Poetry successfully installs a tar.gz
served via a URL, but if the exact same dep/file is downloaded locally, then Poetry fails to install it. I'm very confused, I'm not sure I'm missing something blatantly obvious here.
Here is very straightforward way to reproduce:
Successful:
> poetry new teeeest
> cd teeeest
> poetry add https://developers.google.com/static/search-ads/reporting/download/python/searchads360-py.tar.gz
Fails:
> poetry remove google-ads-searchads360
> mkdir libs && wget https://developers.google.com/static/search-ads/reporting/download/python/searchads360-py.tar.gz -P libs
> poetry add libs/searchads360-py.tar.gz
Updating dependencies
Resolving dependencies... (5.5s)Path /var/folders/9g/r0mdzn2s7_l5cd3_2v_y6m6c0000gn/T/tmpwwsu787v/searchads360-py for google-ads-searchads360 does not exist
Path /var/folders/9g/r0mdzn2s7_l5cd3_2v_y6m6c0000gn/T/tmpwwsu787v/searchads360-py for google-ads-searchads360 does not exist
Path /var/folders/9g/r0mdzn2s7_l5cd3_2v_y6m6c0000gn/T/tmpwwsu787v/searchads360-py for google-ads-searchads360 does not exist
Path /var/folders/9g/r0mdzn2s7_l5cd3_2v_y6m6c0000gn/T/tmpwwsu787v/searchads360-py for google-ads-searchads360 does not exist
Path /var/folders/9g/r0mdzn2s7_l5cd3_2v_y6m6c0000gn/T/tmpwwsu787v/searchads360-py for google-ads-searchads360 does not exist
OverrideNeeded
({Package('google-ads-searchads360', '0.0.1', source_type='directory', source_url='/var/folders/9g/r0mdzn2s7_l5cd3_2v_y6m6c0000gn/T/tmpwwsu787v/searchads360-py'): {'proto-plus': <Dependency proto-plus (>=1.22.2,<2.0.0dev)>}}, {Package('google-ads-searchads360', '0.0.1', source_type='directory', source_url='/var/folders/9g/r0mdzn2s7_l5cd3_2v_y6m6c0000gn/T/tmpwwsu787v/searchads360-py'): {'proto-plus': <Dependency proto-plus (>=1.19.4,<2.0.0dev)>}})
at ~/.pyenv/versions/3.10.12/lib/python3.10/site-packages/poetry/puzzle/provider.py:660 in complete_package
656│ current_overrides.update({dependency_package: package_overrides})
657│ overrides.append(current_overrides)
658│
659│ if overrides:
→ 660│ raise OverrideNeeded(*overrides)
661│
662│ # Modifying dependencies as needed
663│ clean_dependencies = []
664│ for dep in dependencies:
The following error occurred when trying to handle this error:
AssertionError
at ~/.pyenv/versions/3.10.12/lib/python3.10/site-packages/poetry/mixology/partial_solution.py:151 in _register
147│ name = assignment.dependency.complete_name
148│ old_positive = self._positive.get(name)
149│ if old_positive is not None:
150│ value = old_positive.intersect(assignment)
→ 151│ assert value is not None
152│ self._positive[name] = value
153│
154│ return
155│
And succesful again:
> python -m http.server 8888 --directory libs &
> poetry add http://localhost:8888/searchads360-py.tar.gz