Skip to content

[3.15] gh-155218: Generate the option group flags in a stable order (GH-155219) - #155226

Merged
serhiy-storchaka merged 2 commits into
python:3.15from
serhiy-storchaka:bp-order-3.15
Oct 9, 2026
Merged

serhiy-storchaka merged 2 commits into
python:3.15from
serhiy-storchaka:bp-order-3.15

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Aug 5, 2026 •

Copy link
Copy Markdown
Member

They were emitted in the iteration order of a set of group identifiers.
The identifiers of the groups before the required parameters are small
negative integers, -1 and -2 have the same hash, so their order depended
on the size of Py_hash_t, and the code generated on a 32-bit platform
differed from the checked in one.

They are now emitted in the order of the parameters.
(cherry picked from commit 7aec160)

Co-authored-by: Serhiy Storchaka storchaka@gmail.com
Co-Authored-By: Claude Opus 5 (1M context) noreply@anthropic.com

…ythonGH-155219)

They were emitted in the iteration order of a set of group identifiers.
The identifiers of the groups before the required parameters are small
negative integers, -1 and -2 have the same hash, so their order depended
on the size of Py_hash_t, and the code generated on a 32-bit platform
differed from the checked in one.

They are now emitted in the order of the parameters.
(cherry picked from commit 7aec160)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@serhiy-storchaka
serhiy-storchaka merged commit 4c6a394 into python:3.15 Oct 9, 2026
62 checks passed
@serhiy-storchaka
serhiy-storchaka deleted the bp-order-3.15 branch October 9, 2026 20:08
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.

1 participant