Skip to content

Conversation

tungol
Copy link
Contributor

@tungol tungol commented Dec 6, 2024

Issues surfaced by my proposed to changes to stubtest in python/mypy#18259.

All the types changing from __init__ to __new__ is because at runtime their __init__ is from object. My comment here gives an example of a situation where that matters: python/mypy#18259 (comment)

This comment has been minimized.

@@ -189,7 +189,6 @@ class Context:
clamp: int | None = ...,
flags: None | dict[_TrapType, bool] | Container[_TrapType] = ...,
traps: None | dict[_TrapType, bool] | Container[_TrapType] = ...,
_ignored_flags: list[_TrapType] | None = ...,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one happened because this is an argument for _pydecimal.Context, but we should follow the C implementation here.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

@tungol tungol marked this pull request as ready for review December 7, 2024 12:40
Copy link
Contributor

github-actions bot commented Dec 7, 2024

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

@JelleZijlstra JelleZijlstra merged commit 17408ee into python:main Dec 23, 2024
63 checks passed
@tungol tungol deleted the c-class-signatures branch December 23, 2024 20:14
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.

2 participants