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

[3.13] gh-133441: Fix STORE_ATTR_WITH_HINT bytecode#133446

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

Merged
vstinner merged 5 commits intopython:3.13fromvstinner:store_attr_with_hint
May 11, 2025

Conversation

vstinner
Copy link
Member

@vstinnervstinner commentedMay 5, 2025
edited by bedevere-appbot
Loading

Deoptimize if the dict is a dict subclass.

Deoptimize if the dict is a dict subclass.
@vstinner
Copy link
MemberAuthor

@ZeroIntensity
Copy link
Member

It looks like the offending code is on main as well.

@vstinner
Copy link
MemberAuthor

It looks like the offending code is on main as well.

I failed to write code to trigger the bug on main, so I'm not sure that main is affected.

@@ -1594,6 +1594,24 @@ def make_pairs():
self.assertEqual(d.get(key3_3), 44)
self.assertGreaterEqual(eq_count, 1)

def test_store_attr_with_hint(self):
# gh-133441: Regression test for STORE_ATTR_WITH_HINT bytecode

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

This should be intest_opcache nottest_dict IMO.

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I moved the test to test_opcache, but I'm not sure if TestInstanceDict is a good home for such test.

Copy link
Member

@Fidget-SpinnerFidget-Spinner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Thanks!

@vstinner
Copy link
MemberAuthor

@Fidget-Spinner: Do you think that the main branch is also affected? I'm unable to trigger the bug in the main branch, but the code looks the same. I would prefer to not deoptimize just for an hypothetical case if it cannot occur in practice. The code in the main branch is a little bit different.

@Fidget-Spinner
Copy link
Member

Fidget-Spinner commentedMay 9, 2025
edited
Loading

@vstinner did you try wrapping the repro in a loop? Sometimes that might trigger it. I mean an actual Python for loop, notpython -m test -F

@vstinner
Copy link
MemberAuthor

@vstinner did you try wrapping the repro in a loop? Sometimes that might trigger it. I mean an actual Python for loop, not python -m test -F

I just tried to put the reproducer in a loop: I still cannot reproduce the failure on the main branch.

…e-133441.EpjHD4.rstCo-authored-by: Peter Bierma <zintensitydev@gmail.com>
Copy link
Member

@ZeroIntensityZeroIntensity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

LGTM as well. If 3.14 and 3.15 aren't affected, someone should add the test case.

@vstinnervstinner merged commit5cd56b2 intopython:3.13May 11, 2025
56 of 57 checks passed
@vstinnervstinner deleted the store_attr_with_hint branchMay 11, 2025 21:10
@vstinner
Copy link
MemberAuthor

Merged, thanks.

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

@Fidget-SpinnerFidget-SpinnerFidget-Spinner approved these changes

@ZeroIntensityZeroIntensityZeroIntensity approved these changes

@markshannonmarkshannonAwaiting requested review from markshannonmarkshannon is a code owner

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@vstinner@ZeroIntensity@Fidget-Spinner

[8]ページ先頭

©2009-2025 Movatter.jp