-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Improve Python tooling experience for complex input/output shapes #3771
Comments
@lukehoban This is only supported starting in 3.8, a forthcoming release. Also vscode doesn't support it yet, and it's not clear when it will. We could maybe add support ourselves. |
Python 3.8 is now available with this support. We've also added I'll move this to |
If we wanted to avoid bumping the min required version of Python to 3.8, we could consider using dataclasses (requires 3.7): https://docs.python.org/3/library/dataclasses.html. Or just generate the equivalent code. As part of this, we should loosen up any code specifically looking for |
This is also relevant for resource docs generator. See this comment as an example. |
I've renamed the issue to reflect what we're really trying to do. The discussion from #4510 resulted in going forward with using dataclasses. |
Providers have been rolled out with these changes. There is some trailing docs and examples updates that are in-progress, tracked at pulumi/docs#3534 and pulumi/examples#700. |
We should strongly consider emitting TypedDicts for all dictionaries we use for inputs and outputs: https://www.python.org/dev/peps/pep-0589/.This would provide some chance of decent tooling experiences for complex input/output shapes which are prevalent in Kubernetes.We should do the same intfgen
as well, though the issue is incrementally less critical there.We decided to generate classes rather than use TypedDicts.
Remaining tasks
__init__
for input classesThe text was updated successfully, but these errors were encountered: