-
-
Notifications
You must be signed in to change notification settings - Fork 23
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
Submission for SC consideration: PEP 681 -- Data Class Transforms #117
Comments
I've added the PEP to our agenda. |
@gvanrossum & @JelleZijlstra, what is the typing-sig consensus on this? |
I guess we'll start the process you laid out on typing-sig :) Sentiment has been generally positive but I can send a fuller summary later today after consulting with Guido. |
@gvanrossum and I discussed the PEP today and we recommend accepting it. Some main points:
I collected discussion links in python/peps#2502 (both mailing lists and the Pyright issue tracker). |
I think that pyre has also implemented support for it already. @pradeep90 or @shannonzhu could confirm. |
Yes, Pyre has partially implemented dataclass-transform. We support the decorator function and class examples and are yet to handle the metaclass example. Overall, Pyre is +1 on this PEP as it will save us from maintaining custom support for N dataclass-like frameworks and will automatically enable ones we don't yet support (such as Pydantic). |
Jelle and I discussed it this morning and I am indeed onboard with this. I hope the SC adopts our recommendation! |
Sent RFC to python-dev as requested by @brettcannon -- https://mail.python.org/archives/list/python-dev@python.org/thread/7MEB5WYMUZ6SPEVZMVG5H7NQRI7KRB25/ |
Has the SC discussed the PEP again? We made the changes requested in the SC's previous communication and implemented it for 3.11, but there's no formal acceptance yet. |
I have made sure it's back on the agenda (PyCon US + illness + vacation is meant not much has happened since our comments). |
It's now accepted: https://mail.python.org/archives/list/python-dev@python.org/message/R4A2IYLGFHKFDYJPSDA5NFJ6N7KRPJ6D/ |
Please consider PEP 681 for inclusion in Python 3.11.
This is a typing PEP that provides a way to describe the behavior of dataclass-like libraries to static type checkers.
The PEP has been discussed at length in several typing-sig threads:
We also posted an RFC notification on discuss.python.org pointing to the canonical thread on typing-sig.
There is a reference implementation of the type checking part in Pyright, and an implementation of the
dataclass_transform
decorator intyping_extensions.py
.CC: @JelleZijlstra @erictraut
https://www.python.org/dev/peps/pep-0681/
The text was updated successfully, but these errors were encountered: