Skip to content

Conversation

@Abhijith-2002
Copy link

@Abhijith-2002 Abhijith-2002 commented Jan 8, 2026

Fix pyproject.toml duplicate dependency tables by aligning with PEP 621

Problem:

The current pyproject.toml declares dependencies twice under
[tool.poetry] and [tool.poetry.dependencies], which creates duplicate table declarations and is invalid TOML.

This causes:

  • poetry install to fail with a duplicate table error
  • uv sync to fail during TOML parsing

Solution:

  • Move project metadata and dependencies to [project] per PEP 621
  • Retain [tool.poetry.dependencies] for Poetry compatibility
  • Remove duplicate dependency declaration

Verification:

Before:

abhijith@Abhijiths-MacBook-Air RAG % poetry install

/Users/abhijith/adk-samples/python/agents/RAG/pyproject.toml is not a valid TOML file.
TOMLDecodeError: Cannot declare ('tool', 'poetry', 'dependencies') twice (at line 21, column 26)

abhijith@Abhijiths-MacBook-Air RAG % uv sync
warning: Failed to parse `pyproject.toml` during settings discovery:
  TOML parse error at line 21, column 14
     |
  21 | [tool.poetry.dependencies]
     |              ^^^^^^^^^^^^
  duplicate key

error: Failed to parse: `pyproject.toml`
  Caused by: TOML parse error at line 21, column 14
   |
21 | [tool.poetry.dependencies]
   |              ^^^^^^^^^^^^
duplicate key

After:

abhijith@Abhijiths-MacBook-Air RAG % poetry install
Creating virtualenv rag-ZkpOJD3b-py3.11 in /Users/abhijith/Library/Caches/pypoetry/virtualenvs
Updating dependencies
Resolving dependencies... (79.4s)

Package operations: 170 installs, 0 updates, 0 removals

abhijith@Abhijiths-MacBook-Air RAG % uv sync
Resolved 197 packages in 1.57s
      Built rag @ file:///Users/abhijith/adk-samples/python/agents/RAG

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.

1 participant