Skip to content

[pull] main from python:main - #1421

Merged
pull[bot] merged 4 commits into
tj-python:mainfrom
python:main
Aug 29, 2026
Merged

[pull] main from python:main#1421
pull[bot] merged 4 commits into
tj-python:mainfrom
python:main

Conversation

@pull

@pull pull Bot commented Aug 29, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

claydugo and others added 4 commits August 28, 2026 23:37
Unlike other generic aliases, `Literal` arguments aren't type expressions
(e.g. `Literal[1, 'a'].__args__ == (1, 'a')`. As such, there is no need
to recurse into all the arguments as they are guaranteed to be returned
unchanged.
…#154149)

The built-in isinstance() reads an instance's __class__ with a lookup that
suppresses AttributeError and falls back to the object's type, so
isinstance(obj, int) returns False for an object whose __class__ access
raises. ABCMeta.__instancecheck__ read __class__ directly instead, so
isinstance(obj, Mapping) leaked that AttributeError.

Fall back to type(instance) when __class__ is unavailable, in both the C
and the pure-Python implementations, so the abstract base classes behave
like the built-in isinstance(). Such objects are unusual, but they do turn
up in the wild (for example some Qt widgets).
@pull pull Bot locked and limited conversation to collaborators Aug 29, 2026
@pull pull Bot added the ⤵️ pull label Aug 29, 2026
@pull
pull Bot merged commit d915492 into tj-python:main Aug 29, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants