You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the issue tracker and believe that this is not a duplicate.
Exporting requirements Commands like pdm export or pdm install fail each time I commit something, or then change something, since it results in a different version for my current project (e.g. 0.24.2.dev7+g0ed9c36.d20221130). To fix the error, I have to lock again.
This issue is similar to #1288. However note that I don't depend directly on the current project, but rather indirectly. For example: current project is griffe, I specify mkdocstrings[python] in the docs deps, which depends on griffe.
Steps to reproduce
git clone https://github.com/mkdocstrings/griffe
cd griffe
export PYTHON_VERSIONS=3.10
make setup
make check-dependencies # OKecho>> README.md
make check-dependencies # NOT OK
make lock
make check-dependencies # OK AGAIN
Same thing with pdm install command:
rm pdm.lock
pdm install # OKecho>> README.md
pdm install # NOT OK
pdm lock
pdm install # OK AGAIN
Actual behavior
% pdm export -f requirements --without-hashes -vThe exported requirements file is no longer cross-platform. Using it on other platforms may cause unexpected result.Traceback (most recent call last): File "/home/pawamoy/.local/bin/pdm", line 8, in <module> sys.exit(main()) File "/home/pawamoy/.local/pipx/venvs/pdm/lib/python3.10/site-packages/pdm/core.py", line 258, in main return Core().main(args) File "/home/pawamoy/.local/pipx/venvs/pdm/lib/python3.10/site-packages/pdm/core.py", line 190, in main raise cast(Exception, err).with_traceback(traceback) File "/home/pawamoy/.local/pipx/venvs/pdm/lib/python3.10/site-packages/pdm/core.py", line 185, in main f(project, options) File "/home/pawamoy/.local/pipx/venvs/pdm/lib/python3.10/site-packages/pdm/cli/commands/export.py", line 71, in handle candidates = resolve_candidates_from_lockfile( File "/home/pawamoy/.local/pipx/venvs/pdm/lib/python3.10/site-packages/pdm/cli/actions.py", line 144, in resolve_candidates_from_lockfile mapping, *_ = resolve( File "/home/pawamoy/.local/pipx/venvs/pdm/lib/python3.10/site-packages/pdm/resolver/core.py", line 30, in resolve result = resolver.resolve(requirements, max_rounds) File "/home/pawamoy/.local/pipx/venvs/pdm/lib/python3.10/site-packages/resolvelib/resolvers.py", line 481, in resolve state = resolution.resolve(requirements, max_rounds=max_rounds) File "/home/pawamoy/.local/pipx/venvs/pdm/lib/python3.10/site-packages/resolvelib/resolvers.py", line 373, in resolve failure_causes = self._attempt_to_pin_criterion(name) File "/home/pawamoy/.local/pipx/venvs/pdm/lib/python3.10/site-packages/resolvelib/resolvers.py", line 213, in _attempt_to_pin_criterion criteria = self._get_updated_criteria(candidate) File "/home/pawamoy/.local/pipx/venvs/pdm/lib/python3.10/site-packages/resolvelib/resolvers.py", line 203, in _get_updated_criteria for requirement in self._p.get_dependencies(candidate=candidate): File "/home/pawamoy/.local/pipx/venvs/pdm/lib/python3.10/site-packages/pdm/resolver/providers.py", line 187, in get_dependencies deps, requires_python, _ = self.repository.get_dependencies(candidate) File "/home/pawamoy/.local/pipx/venvs/pdm/lib/python3.10/site-packages/pdm/models/repositories.py", line 78, in get_dependencies requirements, requires_python, summary = getter(candidate) File "/home/pawamoy/.local/pipx/venvs/pdm/lib/python3.10/site-packages/pdm/models/repositories.py", line 437, in _get_dependencies_from_lockfile return self.candidate_info[self._identify_candidate(candidate)]KeyError: ('griffe', '0.24.2.dev7+g0ed9c36.d20221130', None, False)
Exporting requirementsCommands likepdm export
orpdm install
fail each time I commit something, or then change something, since it results in a different version for my current project (e.g.0.24.2.dev7+g0ed9c36.d20221130
). To fix the error, I have to lock again.This issue is similar to #1288. However note that I don't depend directly on the current project, but rather indirectly. For example: current project is
griffe
, I specifymkdocstrings[python]
in the docs deps, which depends ongriffe
.Steps to reproduce
Same thing with
pdm install
command:Actual behavior
Expected behavior
No key error 😄
Environment Information
The text was updated successfully, but these errors were encountered: