pulumi/sdk/python/lib/test
Fraser Waters 0a0a327ca3
Support async inline programs (#15278)
<!--- 
Thanks so much for your contribution! If this is your first time
contributing, please ensure that you have read the
[CONTRIBUTING](https://github.com/pulumi/pulumi/blob/master/CONTRIBUTING.md)
documentation.
-->

# Description

<!--- Please include a summary of the change and which issue is fixed.
Please also include relevant motivation and context. -->

This updates the typing annotations and semantics of Python Automation
API inline programs. It's now defined to be a callable that returns an
optional awaitable of `None`. This supports both existing synchronous
functions (should just return `None`) and now also supports async
functions that return an `Awaitable` that eventually resolves to `None`.

## Checklist

- [x] I have run `make tidy` to update any new dependencies
- [x] I have run `make lint` to verify my code passes the lint check
  - [x] I have formatted my code using `gofumpt`

<!--- Please provide details if the checkbox below is to be left
unchecked. -->
- [x] I have added tests that prove my fix is effective or that my
feature works
<!--- 
User-facing changes require a CHANGELOG entry.
-->
- [x] I have run `make changelog` and committed the
`changelog/pending/<file>` documenting my change
<!--
If the change(s) in this PR is a modification of an existing call to the
Pulumi Cloud,
then the service should honor older versions of the CLI where this
change would not exist.
You must then bump the API version in
/pkg/backend/httpstate/client/api.go, as well as add
it to the service.
-->
- [ ] Yes, there are changes in this PR that warrants bumping the Pulumi
Cloud API version
<!-- @Pulumi employees: If yes, you must submit corresponding changes in
the service repo. -->

---------

Co-authored-by: Julien P <julien@caffeine.lu>
2024-01-29 16:10:13 +00:00
..
automation Support async inline programs (#15278) 2024-01-29 16:10:13 +00:00
data/lazy_import_test Fix issue with lazy_import affecting pulumi-eks (#7024) 2021-05-11 22:48:08 -04:00
langhost Pass root and main info to language host methods (#14654) 2023-12-10 17:30:51 +00:00
provider Make pythons RPCManager a context variable 2023-07-13 09:59:12 +01:00
runtime Make pythons RPCManager a context variable 2023-07-13 09:59:12 +01: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 feat: Supports optional arguments for pulumi.Config getters (#10344) 2022-08-11 10:21:46 -04:00
helpers.py Lower the BrokenDynamicProvider regression test from integration to mock (#7951) 2021-09-10 17:25:48 -04:00
test_broken_dynamic_provider.py ci: Fix Windows flake with longer timeout 2022-09-14 09:57:02 -07:00
test_config.py [sdk/python] Add `default` arg to `Config.get_secret` (#12279) 2023-10-02 13:43:48 +00:00
test_invoke.py [sdk/python] Maintain old behavior for empty k8s invoke results (#14535) 2023-11-14 22:26:45 +00:00
test_monitor_termination.py ci: Fix Windows flake with longer timeout 2022-09-14 09:57:02 -07:00
test_next_serialize.py Make pythons RPCManager a context variable 2023-07-13 09:59:12 +01:00
test_output.py Make `Output.from_input` recurse into tuples. 2023-07-27 10:13:40 +01:00
test_resource.py [sdk/python] Adds a default exception when dependency cycles are created (#14597) 2023-11-21 16:26:02 +00:00
test_runtime_to_json.py [sdk/python] Add pulumi.runtime.to_json utility (#5307) 2020-09-09 12:08:45 -07:00
test_stack_reference.py sdk/py/StackReference: Add get_output_details 2023-02-03 16:58:35 -08:00
test_stack_registers_outputs.py fix(sdk/python): Makes SETTINGS attributes context-aware (#10402) 2022-08-23 13:45:37 -04:00
test_translate_output_properties.py [sdk/python] - Support enums (#5615) 2020-11-24 19:15:11 -06:00
test_types_input_type.py [sdk/python] Fix pulumi.property's default value handling (#7736) 2021-08-11 09:15:46 -07:00
test_types_input_type_types.py [sdk/python] Improved dict key translation support (#6695) 2021-04-14 19:32:18 +01:00
test_types_output_type.py Python SDK changes to support input/output classes (#5033) 2020-08-19 01:15:56 -07:00
test_types_resource_types.py Python SDK changes to support input/output classes (#5033) 2020-08-19 01:15:56 -07:00
test_urn.py Satisfy Python lint: factor out URN parsing in Python and other fixes (#7821) 2021-08-24 09:57:51 -04:00
test_utils.py Fix issue with lazy_import affecting pulumi-eks (#7024) 2021-05-11 22:48:08 -04:00