Skip to content

docs(metadata): explain selective field validation - #1342

Merged
henryiii merged 3 commits into
pypa:mainfrom
r266-tech:r266/metadata-selective-validation-docs
Jul 28, 2026
Merged

henryiii merged 3 commits into
pypa:mainfrom
r266-tech:r266/metadata-selective-validation-docs

Conversation

@r266-tech

@r266-tech r266-tech commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Summary

  • document the validate=False behavior directly on Metadata.from_raw
  • clarify that validation happens per attribute when accessed

This follows the documentation path proposed by the maintainer in #862 and the review feedback on this PR.

Testing

  • uvx nox -s docs (Sphinx HTML/LaTeX build and 410 doctests)

@brettcannon brettcannon left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this calls for an entire section of the docs. If you wanted to add on to the "If validate is true, all metadata will be validated" sentence in the docs to say what happens when validate is false then that would be acceptable (e.g., "otherwise validation is done per-attribute at access time" or something).

@henryiii
henryiii requested a review from brettcannon July 27, 2026 18:33
@henryiii
henryiii dismissed brettcannon’s stale review July 28, 2026 03:44

Now just a small bit of extra text

@henryiii
henryiii merged commit 4eb0753 into pypa:main Jul 28, 2026
69 checks passed
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.

3 participants