]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-143715: Deprecate incomplete initialization of struct.Struct() (GH-145580)
authorSerhiy Storchaka <storchaka@gmail.com>
Thu, 12 Mar 2026 07:44:11 +0000 (09:44 +0200)
committerGitHub <noreply@github.com>
Thu, 12 Mar 2026 07:44:11 +0000 (09:44 +0200)
commit72456309e9673019622d9d20d93c707f96d2f8e9
tree610c4c56d98b06d3f59901a3a4c2393aaa17688c
parent0dce4c6eab9dcfcb44bb2739dc60c8ac5fa1ebad
gh-143715: Deprecate incomplete initialization of struct.Struct() (GH-145580)

* Struct.__new__() will require a mandatory argument (format)
* Calls of __init__() method with a different format argument on initialized
  Struct are deprecated

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Doc/deprecations/pending-removal-in-3.20.rst
Doc/whatsnew/3.15.rst
Lib/test/test_struct.py
Misc/NEWS.d/next/Library/2026-01-10-16-23-21.gh-issue-143715.HZrfSA.rst [new file with mode: 0644]
Modules/_struct.c
Modules/clinic/_struct.c.h