Repository navigation
fix: preserve empty inline readme and license text - #345
Merged
henryiii merged 4 commits intoOct 22, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
Write an empty Description header for an empty readme, so the RFC 822 output reads back as an empty description like as_json. Report an empty readme content-type instead of dropping the readme. Add a changelog entry. Assisted-by: ClaudeCode:claude-opus-5-5
henryiii
reviewed
Oct 22, 2026
An empty readme file is common, and the extra header changes the output for downstream backends. Keep the earlier output with no body. Assisted-by: ClaudeCode:claude-opus-5-5
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.
Problem
The readme and legacy license-table parsers use truthiness to distinguish an absent
text/filekey from a supplied value. As a result, an explicitly supplied empty inline string is silently discarded. An empty filename is also silently ignored rather than going through normal file validation.Reproduced on unchanged upstream
058b1bff032c164f115d4e2ead991c7bc6acc8cc: an empty inline readme and license both becomeNone. The added cases fail in four places: empty readme text, empty license text, and empty readme/license filenames.Change
Use
is Nonefor the mutually exclusive field-presence check and for selecting the filename branch. Empty inline text is retained, including its readme content type and RFC 822 representation. Empty filenames receive the existing file-not-found configuration error. No schema or unrelated parser changes.Validation
python -m pytest -q: 516 passed on each (upstream baseline: 512).pre-commit run --files pyproject_metadata/pyproject.py tests/test_standard_metadata.py: all applicable hooks passed, including ruff check/format, check-sdist, codespell, and repository checks.python -m mypy: success, 17 source files.python -m build: sdist and wheel built.git diff --check: passed.Linux tested locally; Windows and macOS were not run locally. Open issues and PRs were checked; no equivalent empty-text fix was found.
AI assistance: prepared and tested by Perplexity Computer. No human-review attestation is implied.