]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-112358: Fix Python 3.12 regression with subclassing struct.Struct. (#112424)
authorMark Dickinson <dickinsm@gmail.com>
Sun, 26 Nov 2023 14:29:52 +0000 (14:29 +0000)
committerGitHub <noreply@github.com>
Sun, 26 Nov 2023 14:29:52 +0000 (14:29 +0000)
commit9fe60340d7e8dc22b3aec205c557bc69a1b2d18c
tree9047eeb509b3a097caf58d9168ac719454cbb1fe
parent3faf8e586d36e73faba13d9b61663afed6a24cb4
gh-112358: Fix Python 3.12 regression with subclassing struct.Struct. (#112424)

Revert commit c8c0afc7137ab9f22bf59d591084948ca967c97c (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`.
Lib/test/test_struct.py
Misc/NEWS.d/next/Library/2023-11-26-13-26-56.gh-issue-112358.smhaeZ.rst [new file with mode: 0644]
Modules/_struct.c
Modules/clinic/_struct.c.h