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.
according to the PEP for the new dependency groups, names are allowed to have underscores but should be normalized when comparing them. this does not seem to be the case as of pdm 2.20.0 (but they did work in 2.19)
Steps to reproduce
# happens with both the new and the old dependency group format# [dependency-groups]
[tool.pdm.dev-dependencies]
a = [
"libcst>=1.5.0",
]
a_b = [
"libcst==1.1.0",
]
pdm lock --update-reuse -G a_b -v
Actual behavior
it ignores the specified dependency group and instead attempts to install both groups, which results in an error in this case because the dependencies are conflicting
> pdm lock --update-reuse -G a_b -v
Ignoring non-existing groups: a_b
pdm.termui: ======== Start resolving requirements ========
pdm.termui: libcst>=1.5.0
pdm.termui: libcst==1.1.0
pdm.termui: Adding requirement python>=3.9
pdm.termui: Adding requirement libcst>=1.5.0
pdm.termui: Adding requirement libcst==1.1.0
ERROR: Unable to find a resolution for libcst
because of the following conflicts:
libcst==1.1.0 (from project)
libcst>=1.5.0 (from project)
To fix this, you could loosen the dependency version constraints in pyproject.toml. See https://pdm-project.org/en/latest/usage/lockfile/#solve-the-locking-failure for more details.
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "C:\Users\user\Documents\asdfads\.pyprojectx\venvs\main-c43ab60f3a327ed2433bc961caec408b-py3.13\Scripts\pdm.EXE\__main__.py", line 8, in <module>
sys.exit(main())
~~~~^^
File "C:\Users\user\Documents\asdfads\.pyprojectx\venvs\main-c43ab60f3a327ed2433bc961caec408b-py3.13\Lib\site-packages\pdm\core.py", line 378, in main
return core.main(args or sys.argv[1:])
~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\user\Documents\asdfads\.pyprojectx\venvs\main-c43ab60f3a327ed2433bc961caec408b-py3.13\Lib\site-packages\pdm\core.py", line 267, in main
raise cast(Exception, err).with_traceback(traceback) from None
File "C:\Users\user\Documents\asdfads\.pyprojectx\venvs\main-c43ab60f3a327ed2433bc961caec408b-py3.13\Lib\site-packages\pdm\core.py", line 262, in main
self.handle(project, options)
~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
File "C:\Users\user\Documents\asdfads\.pyprojectx\venvs\main-c43ab60f3a327ed2433bc961caec408b-py3.13\Lib\site-packages\pdm\core.py", line 194, in handle
command.handle(project, options)
~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
File "C:\Users\user\Documents\asdfads\.pyprojectx\venvs\main-c43ab60f3a327ed2433bc961caec408b-py3.13\Lib\site-packages\pdm\cli\commands\lock.py", line 123, in handle
actions.do_lock(
~~~~~~~~~~~~~~~^
project,
^^^^^^^^
...<6 lines>...
append=options.append,
^^^^^^^^^^^^^^^^^^^^^^
)
^
File "C:\Users\user\Documents\asdfads\.pyprojectx\venvs\main-c43ab60f3a327ed2433bc961caec408b-py3.13\Lib\site-packages\pdm\cli\actions.py", line 150, in do_lock
raise ResolutionImpossible("Unable to find a resolution") from None
resolvelib.resolvers.exceptions.ResolutionImpossible: Unable to find a resolution
according to the PEP for the new dependency groups, names are allowed to have underscores but should be normalized when comparing them. this does not seem to be the case as of pdm 2.20.0 (but they did work in 2.19)
Steps to reproduce
Actual behavior
it ignores the specified dependency group and instead attempts to install both groups, which results in an error in this case because the dependencies are conflicting
Expected behavior
Environment Information
The text was updated successfully, but these errors were encountered: