-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Poetry does not install a non-optional package from lock file #9636
Comments
You misunderstood. I said that #9427 (partially) fixes this issue: If you re-lock with this PR and set |
the lockfile contains [[package]]
name = "burr"
version = "0.27.2"
...
[package.dependencies]
...
requests = {version = "*", optional = true, markers = "extra == \"tracking-server\""} which has indeed forgotten all about the this should fix I think: diff --git a/src/poetry/puzzle/solver.py b/src/poetry/puzzle/solver.py
index 9675bc1f..9f7e5ddd 100644
--- a/src/poetry/puzzle/solver.py
+++ b/src/poetry/puzzle/solver.py
@@ -186,9 +186,7 @@ class Solver:
else:
_dep = _package.requires[index]
if _dep.marker != dep.marker:
- # marker of feature package is more accurate
- # because it includes relevant extras
- _dep.marker = dep.marker
+ _package.add_dependency(dep)
else:
final_packages.append(package)
depths.append(results[package]) |
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. |
Description
Using
pyproject.toml
like this:Use
poetry lock
to generate the lock file (see in attachments, poetry.lock). Notice that it contains the following snippet about non-optionalrequests
package:Do
poetry install
and notice thatrequests
is not installed. Logs for-vvv
are attached, see poetry-install.log.Expected behavior - it should be installed, because it seems to be resolved this way already into the lock file, and before it was resolved as dependency for
burr[cli]
.@radoering mentioned in discord that this might be related to poetry#9427 and
installer.re-resolve
but this is reported for1.8.3
versionWorkarounds
Adding missing dependencies manually into
pyproject.toml
Poetry Installation Method
pipx
Operating System
MacOS 13.6.7
Poetry Version
1.8.3
Poetry Configuration
Python Sysconfig
No response
Example pyproject.toml
Poetry Runtime Logs
The text was updated successfully, but these errors were encountered: