-
-
Notifications
You must be signed in to change notification settings - Fork 424
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
ResolutionImpossible
when using pdm add
but install
and lock
work fine
#2358
Comments
Here is another scenario which is happening on OSX (Sonoma) `
The stanza for numpy (for which the above error was raised) looks like the following in pdm.lock ` ` Rerunning the command did not help me in 2.10 This was reproducible in 2.9.3 version of pdm as well. One way the pdm install command worked for me was when I manually edited the python version specifier for numpy. Changing the requires_python = "<3.13,>=3.9" TO requires_python = ">=3.9" and rerunning pdm install worked fine for pdm 2.9.3. I believe this manual hack had got nothing to do with my virtual env python version which is 3.10 |
I've also gotten this error for the project with this issue when running in CI. I'll try to get more detailed output for you. |
verbose output:
|
It apparently is an issue, but I failed to reproduce it following the steps given by @reversefold (Python 3.11, M1) It's also possible that this is a bug in older versions and uncovered by the latest version. If someone could give a reproducible example to create the broken lockfile I would be appreciated. Or if @reversefold can reproduce constantly can you provide a MRE for it. If that doesn't work out well try to make a Dockerfile to freeze all the environment. |
I'm sorry I do not have a useful or smaller example as most of my encounters with this have been in private work projects, but we did have litestar-org/litestar#2639 which resolved it for us, and the previous lock file should be available in the diff (at https://github.com/litestar-org/litestar/tree/0c6a57f8454838572aa6eaffd89123c778d638df). |
This looks like the case. I looked into the git history and found the lockfile is problemtic at litestar-org/litestar@b0dd1ee, the same lockfile fails on PDM 2.10.1 but succeeded on PDM 2.10.0. So it is not a bug with the latest PDM but a legacy bug with older versions that was not surfaced. |
Fixes #2358 Signed-off-by: Frost Ming <me@frostming.com>
The KeyError is simply another case of jsonschema failing, @frostming are your comments the same for the ResolutionImpossible error originally reported? That one has been 100% reproducible for me. |
I'm running into an issue with
pdm add
succeeding in adding dependencies topyproject.toml
andpdm.lock
but then failing on install withResolutionImpossible
when resolving packages from the lockfile during the install step. The error output without-v
looks like:Detailed output below. Apologies for the massive amount of transitive dependencies for these 2 packages but this was the smallest I could come up with in a reason able amount of time.
Steps to reproduce
pyproject.toml
Run:
Actual behavior
jupyter
is added topyproject.toml
and all expected packages are added topdm.lock
is updated but when resolving packages from the lockfile to install pdm fails with (only end of output included here):Subsequently running
pdm lock
orpdm install
executes without error.What is especially odd is that if you remove the
--group test
from the commands above everything works fine.Expected behavior
Installation happens without error.
Environment Information
The text was updated successfully, but these errors were encountered: