Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.3k
bpo-31779: Prevent assertion failures and a crash when using an uninitialized struct.Struct object#3984
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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
| s2=struct.Struct(s.format.encode()) | ||
| self.assertEqual(s2.format,s.format) | ||
| @support.cpython_only |
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.
Why is this test cpython only?
This PR is stale because it has been open for 30 days with no activity. |
MaxwellDupre 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.
Looks good:
struct_obj.iter_unpack(b'foo')
Traceback (most recent call last):
File "", line 1, in
ValueError: Struct.init() wasn't called
Can you respond to:
pppery on 16 Sep 2018
Why is this test cpython only?
kumaraditya303 commentedSep 25, 2022
Superseded by#94532 |
Uh oh!
There was an error while loading.Please reload this page.
In addition, add tests to
test_structto make sure the assertion failures and the crash are no more.https://bugs.python.org/issue31779