Repository navigation
Fix empty static project classifiers - #986
Merged
radoering merged 2 commits intoNov 8, 2026
Merged
Conversation
There was a problem hiding this comment.
Hey - I've reviewed your changes and they look great!
Sourcery assessment
Needs a human reviewer. If the empty-list versus dynamic-classifier distinction is wrong, the generated wheel can contain missing or unintended classifier metadata. Reverting fixes future builds, but wheels already built or published retain that metadata and would need a corrected release.
radoering
reviewed
Oct 31, 2026
There was a problem hiding this comment.
Linked issues
#11146 Poetry Core adds classifiers despite an empty static project.classifiers list · 2 of 3 met
| # | Requirement | Status | Notes |
|---|---|---|---|
| 1 | An explicitly empty, fully static project.classifiers list produces no classifier headers, including when legacy classifiers are present. | ✅ Met | The change keeps the empty project list and disables enrichment; factory and wheel tests cover cases with and without legacy classifiers. |
| 2 | Keep fallback and enrichment when project classifiers are absent. | ✅ Met | When project.get("classifiers") is None, the change still uses legacy classifiers and enables dynamic enrichment. |
| 3 | Preserve fallback and enrichment when an empty initial classifiers list explicitly declares classifiers dynamic. | ❌ Not addressed | The change treats every present empty list as static and disables dynamic enrichment, without checking whether classifiers are declared dynamic. |
radoering
force-pushed
the
fix/empty-static-classifiers
branch
from
November 8, 2026 08:01
c0750aa to
314af8d
Compare
radoering
approved these changes
Nov 8, 2026
radoering
force-pushed
the
fix/empty-static-classifiers
branch
from
November 8, 2026 08:19
314af8d to
3d659aa
Compare
radoering
enabled auto-merge (squash)
November 8, 2026 08:23
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves python-poetry/poetry#11146.
An explicit
[project] classifiers = []currently falls through to legacy classifiers and automatic Python/license enrichment. Preserve that static empty list so built metadata contains no classifier headers. Missing project classifiers retain the existing fallback and enrichment.Regression tests check factory values and actual wheel
METADATA, with and without legacy classifiers. The follow-up removes the extra condition and tests for simultaneously declaring classifiers static and dynamic, as requested in review.Validation on CPython 3.12: default suite and integration tests pass, as do mypy and Ruff. The four retained regressions fail on the unchanged base. The full default suite also passes with the patch applied to current main. Other platforms and the main Poetry downstream suite were not run locally; hosted CI is separate.
Prepared with AI assistance.