8000 gh-105280: Ensure `isinstance([], collections.abc.Mapping)` always evaluates to `False` by AlexWaygood · Pull Request #105281 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-105280: Ensure isinstance([], collections.abc.Mapping) always evaluates to False #105281

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 5 commits into from
Jun 5, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add the cleanup before changing the state
  • Loading branch information
AlexWaygood authored Jun 5, 2023
commit 612c551870906e0f2a391950e4e7eb33fa0f4601
2 changes: 1 addition & 1 deletion Lib/test/test_typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -2760,8 +2760,8 @@ def x(self): ...
issubclass(1, BadPG)

def test_isinstance_checks_not_at_whim_of_gc(self):
gc.disable()
self.addCleanup(gc.enable)
gc.disable()

with self.assertRaisesRegex(
TypeError,
Expand Down
0