Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Closed

Conversation

@orenmn
Copy link
Contributor

@orenmnorenmn commentedOct 13, 2017
edited by bedevere-bot
Loading

In addition, add tests totest_struct to make sure the assertion failures and the crash are no more.

https://bugs.python.org/issue31779

s2=struct.Struct(s.format.encode())
self.assertEqual(s2.format,s.format)

@support.cpython_only

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?

@github-actions
Copy link

This PR is stale because it has been open for 30 days with no activity.

@github-actionsgithub-actionsbot added the staleStale PR or inactive for long period of time. labelFeb 28, 2022
Copy link
Contributor

@MaxwellDupreMaxwellDupre left a 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
Copy link
Contributor

Superseded by#94532

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

2 more reviewers

@ppperyppperypppery left review comments

@MaxwellDupreMaxwellDupreMaxwellDupre requested changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

7 participants

@orenmn@kumaraditya303@MaxwellDupre@pppery@the-knights-who-say-ni@ezio-melotti@bedevere-bot

[8]ページ先頭

©2009-2025 Movatter.jp