-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Expose DataclassInstance #9736
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
Comments
I'm not sure we can expose it any more than we already have. After the protocol has been around for long enough to be considered stable, we can maybe consider adding it to |
Yes, I understand. This is just for tracking purposes so that if it is exposed one day, I'll know to update my code. |
Okay, but there's nothing actionable for typeshed here, so I'm going to close this for now — sorry, but it's nice to keep our issue list somewhat under control :) https://github.com/python/typing might be a better place to open an issue to discuss finding a long-term home for this protocol, whether it's CPython, typing_extensions, or some other place entirely :) |
I don't know how much visibility my comment here is going to get, but I personally have had multiple instances where I've wanted to accept a While this anecdote doesn't add much to this conversation, I find that frequently in the typing community features are dismissed as lacking sufficient interest when people don't post about them, belying the actual amount of interest in them. |
@AlexWaygood I propose we move this to python/typing and reopen, since while there is nothing actionable for typeshed, this is a potential typing feature. |
The protocol is now exposed at runtime via https://github.com/hauntsaninja/useful_types, @gandhis1, which is designed as a minimal third-party package exposing typeshed protocols at runtime that are useful to users, and which are possible candidates for inclusion in the CPython standard library in the future. I'm a maintainer of the package, as is @hauntsaninja and @JelleZijlstra -- all three of us are maintainers of typeshed, typing_extensions and CPython. python/cpython#102699 is a CPython issue that is already open that discusses potentially adding this protocol to the CPython standard library. (I'm open to the idea, but I'd want it to stew for a while longer in I'm not sure opening another issue at python/typing would be helpful at this point -- I feel like it existing in |
Just wanted to track this so that I can update my code if it happens.
There are various times when it's necessary to annotate something as a dataclass including
Therefore, it would be very convenient to eventually expose
DataclassInstance
. Suggested here #9362 (comment), and moved to_typeshed
here: #9676.The text was updated successfully, but these errors were encountered: