Skip to content

Conversation

@Viicos
Copy link
Contributor

@Viicos Viicos commented Jan 12, 2026

The runtime definition only has a default of None to lazily import annotationlib: https://github.com/python/cpython/blob/66e1399311c17684c6e26f5d9d9603fbd0717d0d/Lib/typing.py#L2365-L2367.

While providing None explicitly is technically valid, it's best to have the value present in the stub so that users can easily know the default value.

@github-actions
Copy link
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@srittau
Copy link
Collaborator

srittau commented Jan 12, 2026

This needs stubtest allowlist entries.

@srittau srittau requested a review from JelleZijlstra January 12, 2026 21:22
@JelleZijlstra
Copy link
Member

I'd prefer to keep None because that's the actual runtime default, regardless of the motivation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants