GH-78724: Initialize struct.Struct in __new__ by kumaraditya303 · Pull Request #94532 · python/cpython

added 3 commits

July 3, 2022 14:29

@blurb-it

@kumaraditya303

ambv

ambv approved these changes Jul 5, 2022

mdickinson

mdickinson

@kumaraditya303

@kumaraditya303

mdickinson

mdickinson added a commit to mdickinson/cpython that referenced this pull request

Nov 26, 2023

mdickinson added a commit that referenced this pull request

Nov 26, 2023
…#112424)

Revert commit c8c0afc (PR #94532),
which moved `struct.Struct` initialisation from `Struct.__init__` to `Struct.__new__`.
This caused issues with code in the wild that subclasses `struct.Struct`.

mdickinson added a commit to mdickinson/cpython that referenced this pull request

Nov 26, 2023
…truct.Struct. (pythonGH-112424)

Revert commit c8c0afc (PR pythonGH-94532),
which moved `struct.Struct` initialisation from `Struct.__init__` to `Struct.__new__`.
This caused issues with code in the wild that subclasses `struct.Struct`..
(cherry picked from commit 9fe6034)

Co-authored-by: Mark Dickinson <dickinsm@gmail.com>

mdickinson added a commit that referenced this pull request

Nov 27, 2023
…Struct (GH-112424) (#112426)

* [3.12] gh-112358: Fix Python 3.12 regression with subclassing struct.Struct. (GH-112424)

Revert commit c8c0afc (PR GH-94532),
which moved `struct.Struct` initialisation from `Struct.__init__` to `Struct.__new__`.
This caused issues with code in the wild that subclasses `struct.Struct`..
(cherry picked from commit 9fe6034)

Co-authored-by: Mark Dickinson <dickinsm@gmail.com>

* Remove unrelated test

aisk pushed a commit to aisk/cpython that referenced this pull request

Feb 11, 2024
…truct. (python#112424)

Revert commit c8c0afc (PR python#94532),
which moved `struct.Struct` initialisation from `Struct.__init__` to `Struct.__new__`.
This caused issues with code in the wild that subclasses `struct.Struct`.

Glyphack pushed a commit to Glyphack/cpython that referenced this pull request

Sep 2, 2024
…truct. (python#112424)

Revert commit c8c0afc (PR python#94532),
which moved `struct.Struct` initialisation from `Struct.__init__` to `Struct.__new__`.
This caused issues with code in the wild that subclasses `struct.Struct`.

This was referenced

Jan 10, 2026

skirpichev pushed a commit to skirpichev/cpython that referenced this pull request

Feb 28, 2026