Skip to content

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

Merged
merged 7 commits into from
Sep 10, 2022

Conversation

da-woods
Copy link
Contributor

@da-woods da-woods commented Aug 6, 2022

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

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
@da-woods
Copy link
Contributor Author

da-woods commented Aug 6, 2022

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).

@da-woods
Copy link
Contributor Author

@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 Tools/make_dataclasses_tests.py isn't "core Cython code" so we can live with any defects in it provided the tests are useful.

However if you'd like me to hold off and wait for a proper review then let me know and I'll do so.

da-woods added a commit to da-woods/cython that referenced this pull request Aug 20, 2022
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
@da-woods
Copy link
Contributor Author

I'm merging this as threatened on the basis that it's worth it to get some cdef dataclass issues fixed up.

@da-woods da-woods merged commit 606bd8c into cython:master Sep 10, 2022
@da-woods da-woods deleted the dataclass_tests branch September 10, 2022 06:57
@da-woods da-woods added this to the 3.0 milestone Sep 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants