gh-149083: Document that dataclasses.MISSING and KW_ONLY are sentinels - #155919
Merged
Conversation
…ntinels Link both to the sentinel builtin and note the 3.15 change. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Documentation build overview
|
Member
|
I think that @hugovk should take a deep look at whether the documentation is proper or not. And we also wait his approval for backport :) |
The old repr is not stated, so "had a different repr" is not actionable, and the sentinel docs already describe how a sentinel reprs itself. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
hugovk
approved these changes
Aug 17, 2026
| .. data:: MISSING | ||
|
|
||
| A sentinel value signifying a missing default or default_factory. | ||
| A :class:`sentinel` object signifying a missing default or default_factory. |
Member
There was a problem hiding this comment.
We could also add the missing markup:
Suggested change
| A :class:`sentinel` object signifying a missing default or default_factory. | |
| A :class:`sentinel` object signifying a missing default or *default_factory*. |
Contributor
Author
There was a problem hiding this comment.
Thank you, I added the markup on the part. Is it okay to backport this markup?
Member
There was a problem hiding this comment.
Yes, we can also backport that, and it's part of the automated backport: #155927
hugovk
enabled auto-merge (squash)
August 17, 2026 03:47
Member
|
Thanks! |
|
GH-155927 is a backport of this pull request to the 3.15 branch. |
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.
#149086 converted
dataclasses.MISSINGanddataclasses.KW_ONLYto instances of the builtinsentinel, but thedataclassesdocumentation was not updated to match.This PR:
.. data::entries to :class:sentinel;.. versionchanged:: 3.15notes toMISSINGandKW_ONLY.Documentation-only change, so no
Misc/NEWS.dentry — please add theskip newslabel. Needs a backport to 3.15, where the change landed.