Skip to content

gh-148797: Add ReferencesHeader.message_ids - #162800

Open
SudeepGowda55 wants to merge 2 commits into
python:mainfrom
SudeepGowda55:gh-148797-references-message-ids
Open

SudeepGowda55 wants to merge 2 commits into
python:mainfrom
SudeepGowda55:gh-148797-references-message-ids

Conversation

@SudeepGowda55

@SudeepGowda55 SudeepGowda55 commented Nov 28, 2026 •

Copy link
Copy Markdown

Adds a message_ids attribute to ReferencesHeader, the class behind In-Reply-To and References, like AddressHeader.addresses: a tuple of the message identifiers in the header, in order.

Each identifier is returned as <id-left@id-right>, without the comments and folding white space the header may have around it, so it compares equal to another message's Message-ID or to what email.utils.make_msgid() returns. Identifiers that don't parse are left out; the header already records a defect for them. The tuple is built once in init() from the parse tree the header already has, so reading the attribute doesn't re-parse.

The docs gain a ReferencesHeader section, and the two headers are added to the default registry table, where they were missing.

@SudeepGowda55
SudeepGowda55 requested review from a team and AA-Turner as code owners November 28, 2026 09:17
@bedevere-app bedevere-app Bot added the type-feature A feature request or enhancement label Nov 28, 2026
@read-the-docs-community

read-the-docs-community Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
📖 35 files modified

Preview · build overview · cpython-previews · built Dec. 3, 2026, 4:18 p.m. UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review type-feature A feature request or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant