Skip to content

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

Merged
nascheme merged 1 commit into
python:3.13from
nascheme:gh-132942-tp-mro-no-specialize
Apr 29, 2025
Merged

[3.13] gh-133122: Fix for test_type_lookup_mro_reference.#133127
nascheme merged 1 commit into
python:3.13from
nascheme:gh-132942-tp-mro-no-specialize

Conversation

@nascheme

@naschemenascheme commented Apr 29, 2025

Copy link
Copy Markdown
Member

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.

@naschemenascheme added tests Tests in the Lib/test dir 3.13 bugs and security fixes labels 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 (pythongh-128164) the test is changed in a different way
to avoid the same issue.
@nascheme
naschemeforce-pushed the gh-132942-tp-mro-no-specialize branch from f56453a to 36a74b9CompareApril 29, 2025 03:08
@nascheme
nascheme enabled auto-merge (squash) April 29, 2025 03:09
@nascheme
nascheme merged commit 64dcbb0 into python:3.13Apr 29, 2025
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3.13bugs and security fixesskip newstestsTests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@nascheme