You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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: MacOS 10.15.6
Poetry version: 1.1.0b2
Issue
Poetry 1.1.x intends to maintain compatibility with Python 3.5, but there's currently a bug in 1.1.0b2 that causes the file download to fail for a URL dependency. I believe the only relevant line of my pyproject.toml is this dep:
To explain, this was discussed in chat, and is a workaround for the Python-version metadata being wrong in PyPI, leading to an unsolvable dep tree. Already fixed upstream, but not yet released, and I believe this bug is valid regardless.
Example stack trace - the command I ran here was simply poetry lock:
TypeError
invalid file: PosixPath('/tmp/tmplltfjswb/beautifulsoup4-4.9.1-py3-none-any.whl')
Traceback (most recent call last):
File "/home/mike.nerone/myapp/.tox/.poetry/lib/python3.5/site-packages/clikit/console_application.py", line 131, in run
status_code = command.handle(parsed_args, io)
File "/home/mike.nerone/myapp/.tox/.poetry/lib/python3.5/site-packages/clikit/api/command/command.py", line 120, in handle
status_code = self._do_handle(args, io)
File "/home/mike.nerone/myapp/.tox/.poetry/lib/python3.5/site-packages/clikit/api/command/command.py", line 171, in _do_handle
return getattr(handler, handler_method)(args, io, self)
File "/home/mike.nerone/myapp/.tox/.poetry/lib/python3.5/site-packages/cleo/commands/command.py", line 92, in wrap_handle
return self.handle()
File "/home/mike.nerone/myapp/.tox/.poetry/lib/python3.5/site-packages/poetry/console/commands/lock.py", line 26, in handle
return self._installer.run()
File "/home/mike.nerone/myapp/.tox/.poetry/lib/python3.5/site-packages/poetry/installation/installer.py", line 99, in run
return self._do_install(local_repo)
File "/home/mike.nerone/myapp/.tox/.poetry/lib/python3.5/site-packages/poetry/installation/installer.py", line 205, in _do_install
ops = solver.solve(use_latest=self._whitelist)
File "/home/mike.nerone/myapp/.tox/.poetry/lib/python3.5/site-packages/poetry/puzzle/solver.py", line 65, in solve
packages, depths = self._solve(use_latest=use_latest)
File "/home/mike.nerone/myapp/.tox/.poetry/lib/python3.5/site-packages/poetry/puzzle/solver.py", line 215, in _solve
self._package, self._provider, locked=locked, use_latest=use_latest
File "/home/mike.nerone/myapp/.tox/.poetry/lib/python3.5/site-packages/poetry/mixology/__init__.py", line 7, in resolve_version
return solver.solve()
File "/home/mike.nerone/myapp/.tox/.poetry/lib/python3.5/site-packages/poetry/mixology/version_solver.py", line 84, in solve
next = self._choose_package_version()
File "/home/mike.nerone/myapp/.tox/.poetry/lib/python3.5/site-packages/poetry/mixology/version_solver.py", line 392, in _choose_package_version
version = self._provider.complete_package(version)
File "/home/mike.nerone/myapp/.tox/.poetry/lib/python3.5/site-packages/poetry/puzzle/provider.py", line 481, in complete_package
self.search_for_url(r)
File "/home/mike.nerone/myapp/.tox/.poetry/lib/python3.5/site-packages/poetry/puzzle/provider.py", line 332, in search_for_url
package = self.get_package_from_url(dependency.url)
File "/home/mike.nerone/myapp/.tox/.poetry/lib/python3.5/site-packages/poetry/puzzle/provider.py", line 361, in get_package_from_url
download_file(url, temp_dir / file_name)
File "/home/mike.nerone/myapp/.tox/.poetry/lib/python3.5/site-packages/poetry/utils/helpers.py", line 99, in download_file
with open(dest, "wb") as f:
The problem is that in Python 3.5, open() is not yet pathlib-aware, so needs to be passed the file path as a string (or alternatively, use dest.open()).
The text was updated successfully, but these errors were encountered:
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: MacOS 10.15.6
Poetry version: 1.1.0b2
Issue
Poetry 1.1.x intends to maintain compatibility with Python 3.5, but there's currently a bug in 1.1.0b2 that causes the file download to fail for a URL dependency. I believe the only relevant line of my
pyproject.toml
is this dep:To explain, this was discussed in chat, and is a workaround for the Python-version metadata being wrong in PyPI, leading to an unsolvable dep tree. Already fixed upstream, but not yet released, and I believe this bug is valid regardless.
Example stack trace - the command I ran here was simply
poetry lock
:The problem is that in Python 3.5,
open()
is not yetpathlib
-aware, so needs to be passed the file path as a string (or alternatively, usedest.open()
).The text was updated successfully, but these errors were encountered: