pdm is sensitive to section order in pyproject.toml
with unhelpful error messages
#3296
Labels
🐛 bug
Something isn't working
Describe the bug
A simple
pyproject.toml
can causepdm add
to fail with:To reproduce
Run
pdm init
, then replace the contents ofpyproject.toml
with:Then run
pdm add -e . --dev
.Expected Behavior
What actually happens is:
Making random changes to
pyproject.toml
, such as reordering sections or removing the[tool.ruff]
section, makes it work.Environment Information
PDM version:
2.20.1
Python Interpreter:
C:\Users...\Documents\pdmtest.venv\Scripts\python.exe (3.12)
Project Root:
C:/Users/.../Documents/pdmtest
Local Packages:
{
"implementation_name": "cpython",
"implementation_version": "3.12.3",
"os_name": "nt",
"platform_machine": "AMD64",
"platform_release": "10",
"platform_system": "Windows",
"platform_version": "10.0.19045",
"python_full_version": "3.12.3",
"platform_python_implementation": "CPython",
"python_version": "3.12",
"sys_platform": "win32"
}
pdm -v output
Additional Context
No response
Are you willing to submit a PR to fix this bug?
The text was updated successfully, but these errors were encountered: