Skip to content

[3.13] gh-133122: Fix for test_type_lookup_mro_reference. #133127

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 29, 2025

Conversation

nascheme
Copy link
Member

@nascheme nascheme commented Apr 29, 2025

Change the unit test case to use getattr() so that we avoid the bytecode specializer optimizing the access. The specializer will call the __eq__ method before the unit test expects, causing it to fail.

In the 3.14 branch (gh-128164) the test is changed in a different way to avoid the same issue.

@nascheme nascheme added tests Tests in the Lib/test dir 3.13 bugs and security fixes labels Apr 29, 2025
@nascheme nascheme requested a review from markshannon as a code owner April 29, 2025 02:46
Change the unit test case to use `getattr()` so that we avoid the
bytecode specializer optimizing the access.  The specializer will call
the `__eq__` method before the unit test expects, causing it to fail.

In the 3.14 branch (pythongh-128164) the test is changed in a different way
to avoid the same issue.
@nascheme nascheme force-pushed the gh-132942-tp-mro-no-specialize branch from f56453a to 36a74b9 Compare April 29, 2025 03:08
@nascheme nascheme enabled auto-merge (squash) April 29, 2025 03:09
@nascheme nascheme merged commit 64dcbb0 into python:3.13 Apr 29, 2025
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.13 bugs and security fixes skip news tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant