pulumi/sdk/python/lib/test
Zaid Ajaj 05d789752b
[sdk] Implement deferred output for nodejs and python (#17793)
### Description

Addressing https://github.com/pulumi/pulumi/issues/17787

This PR implements the _deferred output_ construct for both the NodeJS
and python SDKs so that they can be used for generating programs from
terraform code that have circular references in component resources
(i.e. https://github.com/pulumi/pulumi/issues/13581)

I thought using a function that returns a tuple instead of a class makes
for a simpler implementation for both SDKs

API for nodejs:
```ts
const [bucketArn, resolveBucketArn] = pulumi.deferredOutput<string>();
const bucket = new aws.s3.Bucket("example", { });
resolveBucketArn(bucket.arn);
```
API for python:
```python
bucket_arn, resolve = pulumi.deferred_output()
bucket = aws.s3.Bucket("example")
resolve(bucket.arn)
```
2024-11-21 15:25:49 +00:00
..
automation auto: support refresh consistently in up/preview/destroy (#17209) 2024-09-17 09:39:02 +00:00
data/lazy_import_test [sdk/python] Workaround lazy module regression (#16038) 2024-04-24 06:53:59 +00:00
dynamic Allow accessing configuration in Python dynamic providers (#17673) 2024-11-07 10:12:24 +00:00
langhost [sdk/python] Always unwrap value from InvokeResult in invoke_async (#17349) 2024-09-24 10:24:51 +00:00
provider Use black to format lib/test (#16028) 2024-04-23 08:29:58 +00:00
runtime Use black to format lib/test (#16028) 2024-04-23 08:29:58 +00:00
__init__.py Fix a couple of issues when projecting Protobuf and UNKNOWN in Python (#1468) 2018-06-06 16:09:07 -07:00
conftest.py Use black to format lib/test (#16028) 2024-04-23 08:29:58 +00:00
helpers.py Use black to format lib/test (#16028) 2024-04-23 08:29:58 +00:00
test_broken_dynamic_provider.py Fixing a few pylint errors in the python test folder (#16962) 2024-08-14 08:26:34 +00:00
test_config.py Use black to format lib/test (#16028) 2024-04-23 08:29:58 +00:00
test_deprecated.py Fixing a few pylint errors in the python test folder (#16962) 2024-08-14 08:26:34 +00:00
test_invoke.py [Python] Allow specifiying dependencies for output invokes (#17751) 2024-11-20 12:28:41 +00:00
test_monitor_termination.py Fixing a few pylint errors in the python test folder (#16962) 2024-08-14 08:26:34 +00:00
test_next_serialize.py [sdk/python] Handle nested structures properly when unwrapping secrets from invoke inputs (#17482) 2024-10-07 11:40:12 +00:00
test_output.py [sdk] Implement deferred output for nodejs and python (#17793) 2024-11-21 15:25:49 +00:00
test_resource.py Fixing a few pylint errors in the python test folder (#16962) 2024-08-14 08:26:34 +00:00
test_runtime_to_json.py Use black to format lib/test (#16028) 2024-04-23 08:29:58 +00:00
test_stack_reference.py Fixing a few pylint errors in the python test folder (#16962) 2024-08-14 08:26:34 +00:00
test_stack_registers_outputs.py Fixing a few pylint errors in the python test folder (#16962) 2024-08-14 08:26:34 +00:00
test_translate_output_properties.py Start mypy linting lib/test (#16040) 2024-04-30 12:54:13 +00:00
test_types_input_type.py Fixing a few pylint errors in the python test folder (#16962) 2024-08-14 08:26:34 +00:00
test_types_input_type_types.py Start mypy linting lib/test (#16040) 2024-04-30 12:54:13 +00:00
test_types_output_type.py Fixing a few pylint errors in the python test folder (#16962) 2024-08-14 08:26:34 +00:00
test_types_resource_types.py Start mypy linting lib/test (#16040) 2024-04-30 12:54:13 +00:00
test_urn.py Use black to format lib/test (#16028) 2024-04-23 08:29:58 +00:00
test_utils.py Start mypy linting lib/test (#16040) 2024-04-30 12:54:13 +00:00