Skip to content

[3.13] gh-83731: Test that isinstance() ignores tuple subclass methods (GH-158000) - #159565

Open
vasiliyk wants to merge 1 commit into
python:3.13from
vasiliyk:backport-isinstance-3.13
Open

vasiliyk wants to merge 1 commit into
python:3.13from
vasiliyk:backport-isinstance-3.13

Conversation

@vasiliyk

@vasiliyk vasiliyk commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Manual backport of #158000 to 3.13.

The conflict was only in the surrounding context of Lib/test/test_isinstance.py.
cc @methane

…python#158000)

Add a regression test to make sure isinstance() reads the items of a
tuple subclass directly, without calling its __iter__(), __getitem__()
or __len__().

(cherry picked from commit 21a36aa)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review skip news tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant