Repository navigation
Closed
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).
Linux jborean-linux 5.12.10-300.fc34.x86_64 #1 SMP Thu Jun 10 14:21:36 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux- Fedora 34Poetry (version 1.2.0a1)- Example
pyproject.tomlwith failure
[tool.poetry]
name = "testing"
version = "1.0.0"
description = "test"
authors = ["test"]
[tool.poetry.dependencies]
gssapi = "^1.6.12"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"Issue
I'm not sure what is exactly the problem but it seems like some field for the gssapi is causing a failure with poetry on the latest alpha. The error that comes back when running poetry update with the above pyproject.toml is
Updating dependencies
Resolving dependencies... (0.0s)
InvalidVersion
Invalid PEP 440 version: '3.6.'
at ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/poetry/core/version/pep440/parser.py:67 in parse
63│ @classmethod
64│ def parse(cls, value: str, version_class: Optional[Type["PEP440Version"]] = None):
65│ match = cls._regex.search(value) if value else None
66│ if not match:
→ 67│ raise InvalidVersion(f"Invalid PEP 440 version: '{value}'")
68│
69│ if version_class is None:
70│ from poetry.core.version.pep440.version import PEP440Version
71│
The following error occurred when trying to handle this error:
ValueError
Could not parse version constraint: >=3.6.*
at ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/poetry/core/semver/helpers.py:139 in parse_single_constraint
135│
136│ try:
137│ version = Version.parse(version)
138│ except ValueError:
→ 139│ raise ValueError(
140│ "Could not parse version constraint: {}".format(constraint)
141│ )
142│
143│ if op == "<":
Here is the full output when running with -vvv
Click to expand!
Using virtualenv: /home/jborean/.cache/pypoetry/virtualenvs/pypsrp-_GbznwyN-py3.9
Updating dependencies
Resolving dependencies...
1: fact: testing is 1.0.0
1: derived: testing
1: fact: testing depends on gssapi (^1.6.12)
1: selecting testing (1.0.0)
1: derived: gssapi (>=1.6.12,<2.0.0)
PyPI: 2 packages found for gssapi >=1.6.12,<2.0.0
1: Version solving took 0.004 seconds.
1: Tried 1 solutions.
Stack trace:
3 ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/poetry/core/semver/helpers.py:137 in parse_single_constraint
135│
136│ try:
→ 137│ version = Version.parse(version)
138│ except ValueError:
139│ raise ValueError(
2 ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/poetry/core/version/pep440/version.py:134 in parse
132│ from poetry.core.version.pep440.parser import parse_pep440
133│
→ 134│ return parse_pep440(value, cls)
135│
136│ def is_prerelease(self) -> bool:
1 ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/poetry/core/version/pep440/parser.py:88 in parse_pep440
86│ value: str, version_class: Optional[Type["PEP440Version"]] = None
87│ ) -> "PEP440Version":
→ 88│ return PEP440Parser.parse(value, version_class)
89│
InvalidVersion
Invalid PEP 440 version: '3.6.'
at ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/poetry/core/version/pep440/parser.py:67 in parse
63│ @classmethod
64│ def parse(cls, value: str, version_class: Optional[Type["PEP440Version"]] = None):
65│ match = cls._regex.search(value) if value else None
66│ if not match:
→ 67│ raise InvalidVersion(f"Invalid PEP 440 version: '{value}'")
68│
69│ if version_class is None:
70│ from poetry.core.version.pep440.version import PEP440Version
71│
The following error occurred when trying to handle this error:
Stack trace:
21 ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/cleo/application.py:314 in run
312│
313│ try:
→ 314│ exit_code = self._run(io)
315│ except Exception as e:
316│ if not self._catch_exceptions:
20 ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/poetry/console/application.py:167 in _run
165│ self._load_plugins(io)
166│
→ 167│ return super()._run(io)
168│
169│ def _configure_io(self, io: IO) -> None:
19 ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/cleo/application.py:409 in _run
407│ io.set_input(ArgvInput(argv))
408│
→ 409│ exit_code = self._run_command(command, io)
410│ self._running_command = None
411│
18 ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/cleo/application.py:451 in _run_command
449│
450│ if error is not None:
→ 451│ raise error
452│
453│ return event.exit_code
17 ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/cleo/application.py:435 in _run_command
433│
434│ if event.command_should_run():
→ 435│ exit_code = command.run(io)
436│ else:
437│ exit_code = ConsoleCommandEvent.RETURN_CODE_DISABLED
16 ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/cleo/commands/base_command.py:118 in run
116│ io.input.validate()
117│
→ 118│ status_code = self.execute(io)
119│
120│ if status_code is None:
15 ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/cleo/commands/command.py:85 in execute
83│
84│ try:
→ 85│ return self.handle()
86│ except KeyboardInterrupt:
87│ return 1
14 ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/poetry/console/commands/update.py:47 in handle
45│ self._installer.update(True)
46│
→ 47│ return self._installer.run()
48│
13 ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/poetry/installation/installer.py:112 in run
110│ local_repo = Repository()
111│
→ 112│ return self._do_install(local_repo)
113│
114│ def dry_run(self, dry_run: bool = True) -> "Installer":
12 ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/poetry/installation/installer.py:252 in _do_install
250│ )
251│
→ 252│ ops = solver.solve(use_latest=self._whitelist)
253│ else:
254│ self._io.write_line("Installing dependencies from lock file")
11 ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/poetry/puzzle/solver.py:99 in solve
97│ with self._provider.progress():
98│ start = time.time()
→ 99│ packages, depths = self._solve(use_latest=use_latest)
100│ end = time.time()
101│
10 ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/poetry/puzzle/solver.py:270 in _solve
268│
269│ try:
→ 270│ result = resolve_version(
271│ self._package, self._provider, locked=locked, use_latest=use_latest
272│ )
9 ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/poetry/mixology/__init__.py:24 in resolve_version
22│ solver = VersionSolver(root, provider, locked=locked, use_latest=use_latest)
23│
→ 24│ return solver.solve()
25│
8 ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/poetry/mixology/version_solver.py:82 in solve
80│ while next is not None:
81│ self._propagate(next)
→ 82│ next = self._choose_package_version()
83│
84│ return self._result()
7 ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/poetry/mixology/version_solver.py:394 in _choose_package_version
392│ version = locked
393│
→ 394│ version = self._provider.complete_package(version)
395│
396│ conflict = False
6 ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/poetry/puzzle/provider.py:445 in complete_package
443│ package = DependencyPackage(
444│ package.dependency,
→ 445│ self._pool.package(
446│ package.name,
447│ package.version.text,
5 ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/poetry/repositories/pool.py:143 in package
141│ for idx, repo in enumerate(self._repositories):
142│ try:
→ 143│ package = repo.package(name, version, extras=extras)
144│ except PackageNotFound:
145│ continue
4 ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/poetry/repositories/pypi_repository.py:165 in package
163│ extras: (Union[list, None]) = None,
164│ ) -> Package:
→ 165│ return self.get_release_info(name, version).to_package(name=name, extras=extras)
166│
167│ def search(self, query: str) -> List[Package]:
3 ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/poetry/inspection/info.py:151 in to_package
149│ package.description = self.summary
150│ package.root_dir = root_dir
→ 151│ package.python_versions = self.requires_python or "*"
152│ package.files = self.files
153│
2 ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/poetry/core/packages/package.py:233 in python_versions
231│ def python_versions(self, value: str) -> None:
232│ self._python_versions = value
→ 233│ self._python_constraint = parse_constraint(value)
234│ self._python_marker = parse_marker(
235│ create_nested_marker("python_version", self._python_constraint)
1 ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/poetry/core/semver/helpers.py:35 in parse_constraint
33│ constraint_objects.append(parse_single_constraint(constraint))
34│ else:
→ 35│ constraint_objects.append(parse_single_constraint(and_constraints[0]))
36│
37│ if len(constraint_objects) == 1:
ValueError
Could not parse version constraint: >=3.6.*
at ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/poetry/core/semver/helpers.py:139 in parse_single_constraint
135│
136│ try:
137│ version = Version.parse(version)
138│ except ValueError:
→ 139│ raise ValueError(
140│ "Could not parse version constraint: {}".format(constraint)
141│ )
142│
143│ if op == "<":
Metadata
Metadata
Assignees
Labels
No labels
Activity
finswimmer commentedon Jun 23, 2021
Hello @jborean93,
the problem is the same as reported in #4095.
>=3.6.*is not a valid PEP 345/PEP 440 constraint.>=3.6is the correct one. Please report this to the maintainers of gssapi.Thanks a lot!
fin swimmer
github-actions commentedon 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.