Repository navigation
Ignore readme and requires-python not listed in dynamic - #5343
Open
andrewstellman wants to merge 1 commit into
Open
andrewstellman wants to merge 1 commit into
andrewstellman wants to merge 1 commit into
Conversation
_handle_missing_dynamic resets these fields to None, which _long_description and _python_requires did not accept (AttributeError / TypeError). Treat None as a reset so the value from setup.py is dropped with the _MissingDynamic warning, as for the other fields.
andrewstellman
force-pushed
the
missing-dynamic-readme-requires-python
branch
from
October 5, 2026 17:24
a424327 to
be18f5a
Compare
andrewstellman
marked this pull request as ready for review
October 5, 2026 17:25
Contributor
|
Tick the box to add this pull request to the merge queue (same as
|
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.
Summary of changes
pyproject.tomlwith[project]name = 'p',version = '1'and nodynamic, plussetup(long_description='hello')insetup.py: the build fails withAttributeError: 'NoneType' object has no attribute 'get'. Withsetup(python_requires='>=3.8')it fails withTypeError: 'NoneType' object is not iterable. Expected: the_MissingDynamicwarning and the value ignored, as already happens fordescription,classifiers,dependencies, etc. (the warn-and-ignore behaviour abravalheri explains in a comment on #4183)._handle_missing_dynamic(setuptools/config/_apply_pyprojecttoml.py) resetsreadmeandrequires-pythontoNone, which_long_descriptionand_python_requiresdid not handle. Both now treatNoneas a reset. Forpython_requires, the value is also cleared fromdist, so_finalize_requirescannot copy it back. The new cases extendTestPresetField.test_not_listed_in_dynamic.PEP 621 (
dynamic): "If the metadata does not list a field indynamic, then a build back-end CANNOT fill in the requisite metadata on behalf of the user".Pull Request Checklist
newsfragments/].Found by Quality Playbook, an AI code-review tool, with Claude; I reviewed the change.