-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
python-poetry/poetry-core
#761Labels
area/error-handlingBad error messages/insufficient error handlingBad error messages/insufficient error handlingkind/enhancementNot a bug or feature, but improves usability or performanceNot a bug or feature, but improves usability or performance
Description
- 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 (
-vvvoption).
- OS version and name: macOS Mojave, version 10.14.6
- Poetry version: 1.0.5
Issue
Having a pyproject.toml with the following tool.poetry.dependencies section:
[tool.poetry.dependencies]
python = "~2.7, >=3.4, <3.8"
Running poetry install results in AttributeError:
$ poetry install -vvv
[AttributeError]
EmptyConstraint instance has no attribute 'min'
Traceback (most recent call last):
File "/Users/me/.poetry/lib/poetry/_vendor/py2.7/clikit/console_application.py", line 131, in run
status_code = command.handle(parsed_args, io)
File "/Users/me/.poetry/lib/poetry/_vendor/py2.7/clikit/api/command/command.py", line 120, in handle
status_code = self._do_handle(args, io)
File "/Users/me/.poetry/lib/poetry/_vendor/py2.7/clikit/api/command/command.py", line 163, in _do_handle
self._dispatcher.dispatch(PRE_HANDLE, event)
File "/Users/me/.poetry/lib/poetry/_vendor/py2.7/clikit/api/event/event_dispatcher.py", line 22, in dispatch
self._do_dispatch(listeners, event_name, event)
File "/Users/me/.poetry/lib/poetry/_vendor/py2.7/clikit/api/event/event_dispatcher.py", line 89, in _do_dispatch
listener(event, event_name, self)
File "/Users/me/.poetry/lib/poetry/console/config/application_config.py", line 86, in set_env
poetry = command.poetry
File "/Users/me/.poetry/lib/poetry/console/commands/command.py", line 10, in poetry
return self.application.poetry
File "/Users/me/.poetry/lib/poetry/console/application.py", line 49, in poetry
self._poetry = Factory().create_poetry(Path.cwd())
File "/Users/me/.poetry/lib/poetry/factory.py", line 90, in create_poetry
package.python_versions = constraint
File "/Users/me/.poetry/lib/poetry/packages/project_package.py", line 45, in python_versions
create_nested_marker('python_version', self._python_constraint)
File "/Users/me/.poetry/lib/poetry/packages/utils/utils.py", line 214, in create_nested_marker
if constraint.min is not None:
However, poetry check returns no errors:
$ poetry check
All set!
So, I'm making a conclusion that python = "~2.7, >=3.4, <3.8" is a valid version constraint.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area/error-handlingBad error messages/insufficient error handlingBad error messages/insufficient error handlingkind/enhancementNot a bug or feature, but improves usability or performanceNot a bug or feature, but improves usability or performance