Skip to content

Fix pyproject.toml: move dependencies key out of [project.urls] - #2

Merged
monperrus merged 1 commit into
mainfrom
fix/pyproject-dependencies-key
Sep 10, 2026
Merged

Fix pyproject.toml: move dependencies key out of [project.urls]#2
monperrus merged 1 commit into
mainfrom
fix/pyproject-dependencies-key

Conversation

@frankreyesgarcia

Copy link
Copy Markdown
Contributor

PyYAML>=6 was declared inside the [project.urls] table, where PEP 621 requires string values. Hatchling 1.32 rejects it, so metadata generation fails for every install path:

pip install .
pip install -e ".[dev]"    # the README's documented command
python -m build

all with:

TypeError: URL `dependencies` of field `project.urls` must be a string
error: metadata-generation-failed

This one-line move puts dependencies in the [project] table where it belongs. It also makes PyYAML an actual declared runtime dependency, which it needs to be: llmism/_patterns.py imports yaml at module load.

Verified: after the change, pip install . succeeds in a clean venv and import llmism, yaml works.

Fixes #1

PyYAML>=6 was declared under [project.urls], where PEP 621 requires
string values. Hatchling 1.32 rejects it, so metadata generation fails
for pip install ., pip install -e ".[dev]", and python -m build.
Moving it to [project] fixes the build and registers PyYAML as the
runtime dependency it is (llmism/_patterns.py imports yaml at import).

Fixes #1

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The change directly addresses the reported PEP 621/Hatchling error with a minimal, correct adjustment to pyproject.toml and introduces no additional risk.

Pull request overview

This PR fixes the Python packaging metadata by moving dependencies out of [project.urls] and into the correct [project] table per PEP 621, resolving Hatchling metadata generation failures and correctly declaring PyYAML as a runtime dependency.

Changes:

  • Add dependencies = ["PyYAML>=6"] under [project].
  • Remove the invalid dependencies entry from [project.urls].
File summaries
File Description
pyproject.toml Corrects PEP 621 table usage so metadata generation succeeds and PyYAML is declared as a runtime dependency.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@monperrus
monperrus merged commit 5982a7f into main Sep 10, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Documented install (pip install -e ".[dev]") fails: dependencies key misplaced under [project.urls]

3 participants