Skip to content

Conversation

@tungol
Copy link
Contributor

@tungol tungol commented Aug 26, 2025

Fixes #19732

This is a simple check to point users in the right direction when they get errors because their class uses __new__ but they wrote stubs for __init__. I don't feel strongly about the exact wording used here. I also considered "Maybe you meant to define __new__ instead of __init__?".

@ilevkivskyi ilevkivskyi merged commit 530bdc5 into python:master Sep 13, 2025
13 checks passed
@tungol tungol deleted the warn_runtime_is_object_init branch September 14, 2025 00:43
KevinRK29 pushed a commit that referenced this pull request Sep 16, 2025
…__ (#19733)

Fixes #19732

This is a simple check to point users in the right direction when they
get errors because their class uses `__new__` but they wrote stubs for
`__init__`. I don't feel strongly about the exact wording used here. I
also considered "Maybe you meant to define `__new__` instead of
`__init__`?".

(cherry picked from commit 530bdc5)
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.

stubtest: incorrect runtime signature of cython __cinit__ methods

2 participants