Commit Graph

4 Commits

Author SHA1 Message Date
Julien bd0be8e8ef
[Python] Allow specifiying dependencies for output invokes ()
Provider functions that take inputs as arguments, and return an output
(aka output form invokes), now allow specifying a depends_on option.
This allows programs to ensure that invokes are executed after things
they depend on, similar to the depdends_on resource option.

Fixes https://github.com/pulumi/pulumi/issues/17749
2024-11-20 12:28:41 +00:00
Julien de17d1a70f
Replace asyncio.ensure_future with create_task ()
`ensure_future` was deprecated in Python 3.10
https://docs.python.org/3/library/asyncio-future.html#asyncio.ensure_future

The preferred way to convert a coroutine into a future is to use
`create_task` instead, which was introduced in Python 3.7, so safe for
us to use everywhere.

Ref https://github.com/pulumi/pulumi/issues/11827
2024-09-30 12:53:15 +00:00
Zaid Ajaj a7a4870864
[python] First-class output-versioned invokes that maintain secrets ()
Partially addressing https://github.com/pulumi/pulumi/issues/12710 for
Python

This PR extends the python SDK with a new function `invoke_output` which
returns a first class `pulumi.Output[T]` in Python which is then emitted
in the generated code for output-versioned invokes in Python SDK where
these no longer rely on the plain invoke nor they need to use the
lifting utility
2024-09-22 18:23:27 +00:00
Justin Van Patten 597f2145b9
Fully generate TypedDict input types by default ()
https://github.com/pulumi/pulumi/pull/16704 made it so that classes and
TypeDicts are generated for input types by default, but missed some
cases, which lead to referencing some TypedDict types that didn't exist.

This PR fixes that by ensuring that all input types are generated.

A regression test is included that runs pyright in strict mode to ensure
TypedDict types in signatures actually exist.

The second commit regenerates testdata throughout.

Fixes 
2024-09-20 17:16:14 +00:00