FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-149083: Document that dataclasses.MISSING and KW_ONLY are sentinels by fregataa · Pull Request #155919 · python/cpython · GitHub

/ cpython Public

gh-149083: Document that dataclasses.MISSING and KW_ONLY are sentinels - #155919

Merged
hugovk merged 4 commits into
python:mainfrom
fregataa:docs-dataclasses-sentinel
Aug 17, 2026
Merged

gh-149083: Document that dataclasses.MISSING and KW_ONLY are sentinels#155919
hugovk merged 4 commits into
python:mainfrom
fregataa:docs-dataclasses-sentinel

Conversation

fregataa commented Aug 17, 2026
edited
Loading

Copy link
Copy Markdown
Contributor

#149086 converted dataclasses.MISSING and dataclasses.KW_ONLY to instances of the builtin sentinel, but the dataclasses documentation was not updated to match.

This PR:

  • links the prose and both .. data:: entries to :class:sentinel;
  • adds .. versionchanged:: 3.15 notes to MISSING and KW_ONLY.

Documentation-only change, so no Misc/NEWS.d entry — please add the skip news label. Needs a backport to 3.15, where the change landed.

…ntinels

Link both to the sentinel builtin and note the 3.15 change.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
fregataa requested a review from ericvsmith as a code owner August 17, 2026 02:39

python-cla-bot Bot commented Aug 17, 2026
edited
Loading

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

read-the-docs-community Bot commented Aug 17, 2026
edited
Loading

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #34095560 | 📁 Comparing 69cff04 against main (7a845ce)

  🔍 Preview build  

1 file changed
± library/dataclasses.html

fregataa changed the title [3.15] gh-149083: Document that dataclasses.MISSING and KW_ONLY are sentinels gh-149083: Document that dataclasses.MISSING and KW_ONLY are sentinels Aug 17, 2026
corona10 added needs backport to 3.15 pre-release feature fixes, bugs and security fixes sprint labels Aug 17, 2026
github-project-automation Bot moved this to Todo in Sprint Aug 17, 2026

Copy link
Copy Markdown
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 :)

fregataa and others added 2 commits August 17, 2026 12:02
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>
Comment thread Doc/library/dataclasses.rst Outdated
.. data:: MISSING

A sentinel value signifying a missing default or default_factory.
A :class:`sentinel` object signifying a missing default or default_factory.

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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*.

fregataa Aug 17, 2026
edited
Loading

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thank you, I added the markup on the part. Is it okay to backport this markup?

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Yes, we can also backport that, and it's part of the automated backport: #155927

github-project-automation Bot moved this from Todo to In Progress in Sprint Aug 17, 2026
hugovk enabled auto-merge (squash) August 17, 2026 03:47

hugovk commented Aug 17, 2026

Copy link
Copy Markdown
Member

Thanks!

hugovk merged commit e13c3d6 into python:main Aug 17, 2026
30 checks passed
github-project-automation Bot moved this from Todo to Done in Docs PRs Aug 17, 2026
github-project-automation Bot moved this from In Progress to Done in Sprint Aug 17, 2026

Copy link
Copy Markdown

Thanks @fregataa for the PR, and @hugovk for merging it 🌮🎉.. I'm working now to backport this PR to: 3.15.
🐍🍒⛏🤖

bedevere-app Bot commented Aug 17, 2026

Copy link
Copy Markdown

GH-155927 is a backport of this pull request to the 3.15 branch.

bedevere-app Bot removed the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Aug 17, 2026
hugovk pushed a commit that referenced this pull request Aug 17, 2026
…entinels (GH-155919) (#155927)

Co-authored-by: Sanghun Lee <sanghun@lablup.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
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

Labels

docs Documentation in the Doc dir skip news sprint

Projects

Status: Done
Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL