-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Add a few more tests for mypyc_attr native_class (dunder methods and metaclasses) #18999
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
Conversation
Testing dunder methods and metaclasses
a86ea9e
to
7df6ab1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some suggestions. Can you also check the build failures?
pass | ||
|
||
@mypyc_attr(native_class=True) | ||
class A(metaclass=M): # E: Class is marked as native_class=True but it can't be a native class |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe also mention in the error message that the metaclass is not supported with a native class?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me separate this out to its own PR. Right now is_implicit_extension_class
(in mypyc/irbuild/util.py) just returns True/False. To print a nice message we would have to go through each individual check in is_implicit_extension_class
and make a nice user-facing message.
It is very good feedback, and I agree with you, just think it can be split out to separate PR.
Addresses feedback in python#18999
Addresses feedback in python#18999
No description provided.