Skip to content

fix: collect config error on unhashable project.dynamic entry - #332

Merged
henryiii merged 2 commits into
pypa:mainfrom
henryiii:fix/dynamic-unhashable-331
Jul 4, 2026
Merged

fix: collect config error on unhashable project.dynamic entry#332
henryiii merged 2 commits into
pypa:mainfrom
henryiii:fix/dynamic-unhashable-331

Conversation

@henryiii

@henryiii henryiii commented Jul 4, 2026

Copy link
Copy Markdown
Collaborator

Slightly better error (was missing collection).

🤖 AI text below 🤖

A non-string (unhashable) entry in project.dynamic — e.g. a nested list — made the PEP 808 dual-dynamic membership test (field in data["project"]) raise a raw TypeError: unhashable type: 'list' before the dedicated project.dynamic list validation could report a clean config error. This happened even with all_errors=True, where a collected diagnostic is expected.

Skipping non-string entries in that loop lets them be surfaced through the normal error_collector path instead. Added a regression test.

Closes #331

henryiii added 2 commits July 3, 2026 22:02
A non-string (unhashable) entry in project.dynamic, e.g. a nested list,
made the PEP 808 dual-dynamic membership test raise a raw TypeError
before the dedicated dynamic-list validation could report a clean config
error. Skip non-string entries so they are surfaced through
error_collector instead.

Closes pypa#331

Assisted-by: ClaudeCode:claude-opus-4.8
Assisted-by: ClaudeCode:claude-opus-4.8
@henryiii
henryiii merged commit b2cff85 into pypa:main Jul 4, 2026
26 checks passed
@henryiii
henryiii deleted the fix/dynamic-unhashable-331 branch July 4, 2026 02:08
@henryiii henryiii mentioned this pull request Jul 4, 2026
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.

from_pyproject raises raw TypeError on non-string project.dynamic entries instead of collecting a config error

1 participant