Skip to content

Ignore legacy scripts for explicitly empty [project.scripts] - #999

Open
Tegrask wants to merge 1 commit into
python-poetry:mainfrom
Tegrask:fix/empty-project-scripts
Open

Tegrask wants to merge 1 commit into
python-poetry:mainfrom
Tegrask:fix/empty-project-scripts

Conversation

@Tegrask

@Tegrask Tegrask commented Nov 14, 2026

Copy link
Copy Markdown

Resolves: python-poetry#11215

An explicitly empty [project.scripts] table is falsy, so _configure_entry_points() fell back to the console scripts defined in [tool.poetry.scripts], even though the validation already warns that the latter are ignored when [project.scripts] is set.

Check for the presence of the key instead of its truthiness. The same applies to the [tool.poetry.plugins] fallback, which was still used for an explicitly empty [project.entry-points] table.

  • Added tests for changed code.
  • Updated documentation for changed code.

@sourcery-ai sourcery-ai Bot 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.

Hey - I've reviewed your changes and they look great!

Sourcery assessment

Approved.


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

An empty [project.scripts] table is falsy, so _configure_entry_points() fell back to the console scripts in [tool.poetry.scripts] even though the validation warns that the legacy table is ignored when [project.scripts] is set. Check for the presence of the keys instead of their truthiness and apply the same fix to the [tool.poetry.plugins] fallback.

Resolves: python-poetry#11215
@Tegrask
Tegrask force-pushed the fix/empty-project-scripts branch from 72e5af8 to 76f7bfa Compare November 15, 2026 21:11

This branch has not been deployed

No deployments
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