Unable to pdm sync / install an application with uv without a project name / version
Describe the bug
When uv is enabled, I am unable to pdm sync or install an applicaction without a project name and version.
To reproduce
Create a new project with a pyproject.toml file w/ no project name or version.
[project]
description = "A demonstration."
authors = [
{name = "Sarah Tabor", email = "[email protected]"},
]
dependencies = [
"pandas>=2.2.3"
]
requires-python = ">=3.11,<3.13"
license = {text = "MIT"}
[[tool.pdm.source]]
url = "https://gitlab.beta.team/api/v4/projects/beta%2Fpypi/packages/pypi/simple"
verify_ssl = true
name = "pypi"
Ensure uv is enabled for the project.
pdm config use_uv true
Try to pdm install
Expected Behavior
I should be able to use pdm for an application with uv enabled
Environment Information
PDM version: 2.22.3 Python Interpreter: /Users/stabor/Downloads/pdm_uv/.venv/bin/python (3.12) Project Root: /Users/stabor/Downloads/pdm_uv Local Packages:
Usage: pdm info [-h] [-v | -q] [-g] [-p PROJECT_PATH] [--venv [NAME]] [--python | --where | --packages | --env | --json] pdm info: error: unrecognized arguments: -- env
Verbose Command Output
❯ pdm install -v
WARNING: Lockfile hash doesn't match pyproject.toml, packages may be outdated
Updating the lock file...
WARNING: inherit_metadata strategy is not supported by uv resolver, it will be ignored
INFO: Using uv is experimental and might break due to uv updates.
Running uv lock command: ['/Users/stabor/.local/bin/uv', 'lock', '-p', '/Users/stabor/Downloads/pdm_uv/.venv/bin/python',
'--verbose', '--index-url', 'https://gitlab.beta.team/api/v4/projects/beta%2Fpypi/packages/pypi/simple',
'--index-strategy=unsafe-best-match']
DEBUG uv 0.6.5 (bcbcd0a1e 2025-03-06)
error: Failed to parse: pyproject.toml
Caused by: TOML parse error at line 1, column 1
|
1 | [project]
| ^^^^^^^^^
pyproject.toml is using the [project] table, but the required project.name field is not set
Traceback (most recent call last):
File "/Users/stabor/.local/bin/pdm", line 8, in
Additional Context
No response
Are you willing to submit a PR to fix this bug?
- [ ] Yes, I would like to submit a PR.
According to this specification, name is a required key within [project] table.