diff options
author | Mark Dickinson <dickinsm@gmail.com> | 2023-11-27 08:25:06 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-27 08:25:06 (GMT) |
commit | 42df73652dba4937489e34a92dbf184a184c2d93 (patch) | |
tree | 850ff04e3ed9ed107c12f290e3151d9911584c93 /Misc/NEWS.d | |
parent | d7a788332666eabade922bf5d976df8c362ecb14 (diff) | |
download | cpython-42df73652dba4937489e34a92dbf184a184c2d93.zip cpython-42df73652dba4937489e34a92dbf184a184c2d93.tar.gz cpython-42df73652dba4937489e34a92dbf184a184c2d93.tar.bz2 |
[3.12] gh-112358: Fix Python 3.12 regression with subclassing struct.Struct (GH-112424) (#112426)
* [3.12] gh-112358: Fix Python 3.12 regression with subclassing struct.Struct. (GH-112424)
Revert commit c8c0afc7137ab9f22bf59d591084948ca967c97c (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 9fe60340d7e8dc22b3aec205c557bc69a1b2d18c)
Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
* Remove unrelated test
Diffstat (limited to 'Misc/NEWS.d')
-rw-r--r-- | Misc/NEWS.d/next/Library/2023-11-26-13-26-56.gh-issue-112358.smhaeZ.rst | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2023-11-26-13-26-56.gh-issue-112358.smhaeZ.rst b/Misc/NEWS.d/next/Library/2023-11-26-13-26-56.gh-issue-112358.smhaeZ.rst new file mode 100644 index 0000000..e473ded --- /dev/null +++ b/Misc/NEWS.d/next/Library/2023-11-26-13-26-56.gh-issue-112358.smhaeZ.rst @@ -0,0 +1,2 @@ +Revert change to :class:`struct.Struct` initialization that broke some cases +of subclassing. |