Closed evelina-gudauskayte closed 17 hours ago
What are the versions of dep-logic
and packaging
respectively in your environment? You can see this by running pdm self list
. I also work on projects depending on pydantic
and never encounter problem
I also do not get this problem when pydantic is required, although that happens when I require a package that requires pydantic.
Here us the pdm self list
.
packaging 20.9 Core utilities for Python packages
This is too old and not compatible with dep-logic
: https://github.com/pdm-project/dep-logic/blob/9989d64fb93e33e258260848ca2ea3e4adf7dcf1/pyproject.toml#L8
Please upgrade the version of packaging
and this issue can be solved
I also noticed that your packages also show up in this list. It is a bad practice since it will likely cause dependency conflicts. It's recommended to use a standalone environment for PDM and only install PDM dependencies and plugins into it. Don't install PDM into the same venv used by your project.
Make sure you run commands with
-v
flag before pasting the output.Steps to reproduce
I have a dependency on
pydantic~=2.7
inlibrary_1
. It gets resolved normally withpdm lock
.In
library_2
I have a dependency onlibrary_1
. When doing apdm lock
inlibrary_2
I get:Which is probably caused by a bad manifest in the pydantic.
Actual behavior
Raised
packaging.version.InvalidVersion: Invalid version: '3.6+.0'
error prevents finishingpdm lock
because of old bad manifest.Expected behavior
A warning with indication of skipping and bad python version in manifest instead of
InvalidVersion
error raise.Environment Information