-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Try to use test_dataclass from CPython #4955
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
It needs a bit of translation to get it Cythonable (since Cython dataclasses are extension types and so must be at the global scope). At the moment bugs are identified but not fixed
test_dataclasses.py is copied almost unmodified from CPython (I applied the bug fix proposed in python/cpython#95735, but that's all) so shouldn't need review. tests/run/test_dataclasses.pyx is automatically generated, so again probably doesn't need much review (I hope). |
@scoder I'd like to merge this because I think it'll unlock some useful fixes to cython dataclasses. My opinion is that it's fairly low risk because However if you'd like me to hold off and wait for a proper review then let me know and I'll do so. |
Including kw_only on dataclasses.dataclass, kw_only on individual fields, and the dataclasses.KW_ONLY placeholder marker. Part of cython#4303 Draft for the moment since proper testing will be enabled by cython#4955
I'm merging this as threatened on the basis that it's worth it to get some cdef dataclass issues fixed up. |
It needs a bit of translation to get it Cythonable (since
Cython dataclasses are extension types and so must be at the
global scope).
At the moment bugs are identified but not fixed