Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork34k
gh-143715: deprecate incomplete initialization of struct.Struct()#143659
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Conversation
* ``Struct.__new__()`` will require a mandatory argument (format)* Calls of ``__init__()`` method on initialized Struct are deprecated
skirpichev commentedJan 10, 2026
The evil plan is to remove custom |
serhiy-storchaka left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
This make format argument in the __init__() - optional. If it'smissing, the object must be already initialized in __new__().
skirpichev commentedJan 13, 2026
CC@meadori per experts index. |
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Co-authored-by: Victor Stinner <vstinner@python.org>
vstinner left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
LGTM.
What do you think@serhiy-storchaka?
Uh oh!
There was an error while loading.Please reload this page.
Struct.__new__()will require a mandatory argument (format)__init__()method on initialized Struct are deprecated📚 Documentation preview 📚:https://cpython-previews--143659.org.readthedocs.build/