- OS version and name: Windows 10, RHEL 7.8
- Poetry version: 1.1.0-1.1.2
- Simple pyproject.toml with a private repo:
[[tool.poetry.source]]
name = "private-repo"
url = "<repo url>"
[tool.poetry.dependencies]
python = "^3.6,<3.9"
private-dependency = {extras = ["extras"], version = "^1.20.35723", source = "private-repo"}
Issue
When running poetry show with a private package that has extras installed command fails with SolverProblemError.
For this package there are multiple extras, some with just public packages, some with mix of public and private. It doesn't matter which one is required, command fails even if only public packages are required by extras marker but succeeds if there are no extras specified to install.
Specifying extras for public packages doesn't break the command. Generating lock file from scratch (poetry lock) doesn't change anything.
Install, add, lock are working correctly for this dependency. Only show fails.
Version 1.0.10 works correctly.
Output:
Using virtualenv: C:\Users\user\AppData\Local\pypoetry\Cache\virtualenvs\private-package-UtOW8WEE-py3.6
Stack trace:
6 c:\users\user\appdata\local\programs\python\python36\lib\site-packages\clikit\console_application.py:131 in run
129│ parsed_args = resolved_command.args
130│
→ 131│ status_code = command.handle(parsed_args, io)
132│ except KeyboardInterrupt:
133│ status_code = 1
5 c:\users\user\appdata\local\programs\python\python36\lib\site-packages\clikit\api\command\command.py:120 in handle
118│ def handle(self, args, io): # type: (Args, IO) -> int
119│ try:
→ 120│ status_code = self._do_handle(args, io)
121│ except KeyboardInterrupt:
122│ if io.is_debug():
4 c:\users\user\appdata\local\programs\python\python36\lib\site-packages\clikit\api\command\command.py:171 in _do_handle
169│ handler_method = self._config.handler_method
170│
→ 171│ return getattr(handler, handler_method)(args, io, self)
172│
173│ def __repr__(self): # type: () -> str
3 c:\users\user\appdata\local\programs\python\python36\lib\site-packages\cleo\commands\command.py:92 in wrap_handle
90│ self._command = command
91│
→ 92│ return self.handle()
93│
94│ def handle(self): # type: () -> Optional[int]
2 c:\users\user\appdata\local\programs\python\python36\lib\site-packages\poetry\console\commands\show.py:82 in handle
80│ solver.provider.load_deferred(False)
81│ with solver.use_environment(self.env):
→ 82│ ops = solver.solve()
83│
84│ required_locked_packages = set([op.package for op in ops if not op.skipped])
1 c:\users\user\appdata\local\programs\python\python36\lib\site-packages\poetry\puzzle\solver.py:65 in solve
63│ with self._provider.progress():
64│ start = time.time()
→ 65│ packages, depths = self._solve(use_latest=use_latest)
66│ end = time.time()
67│
SolverProblemError
Because private-package depends on private-dependency[extras] (^1.20.35723) which doesn't exist, version solving failed.
at c:\users\user\appdata\local\programs\python\python36\lib\site-packages\poetry\puzzle\solver.py:241 in _solve
237│ packages = result.packages
238│ except OverrideNeeded as e:
239│ return self.solve_in_compatibility_mode(e.overrides, use_latest=use_latest)
240│ except SolveFailure as e:
→ 241│ raise SolverProblemError(e)
242│
243│ results = dict(
244│ depth_first_search(
245│ PackageNode(self._package, packages), aggregate_package_nodes
-vvvoption).Issue
When running
poetry showwith a private package that has extras installed command fails with SolverProblemError.For this package there are multiple extras, some with just public packages, some with mix of public and private. It doesn't matter which one is required, command fails even if only public packages are required by extras marker but succeeds if there are no extras specified to install.
Specifying extras for public packages doesn't break the command. Generating lock file from scratch (
poetry lock) doesn't change anything.Install, add, lock are working correctly for this dependency. Only show fails.
Version 1.0.10 works correctly.
Output: