pulumi/sdk/python
Justin Van Patten bd85f088f2 [sdk/python] Don't error on type mismatches when using input values for outputs
When resolving a resource's outputs, if an output value is missing (and it's not a preview), the SDK will see if there was an input prop of the same name as the output prop and use that input value as the value for the output. This can be problematic when the input prop's type isn't the same as the output prop's type. If the input value is a `dict` and the type of the output cannot be converted from a `dict`, then the SDK currently raises an `AssertionError`, which causes `pulumi up` to fail. This is inconsistent with the other language SDKs, which don't error during `pulumi up` in such cases.

This change changes the behavior of the Python SDK to not error when attempting to use an input value for the output value when there is a type mismatch. Instead of raising an error, `None` is returned, which is the same value that would be used if there had been no input value available to fill-in.
2022-11-21 11:03:50 -08:00
..
cmd Engine and Golang support for shimless providers 2022-11-14 11:25:41 +00:00
dist Fix windows build 2020-12-07 15:58:30 -08:00
lib [sdk/python] Don't error on type mismatches when using input values for outputs 2022-11-21 11:03:50 -08:00
scripts ci: divide and conquer integration tests by sdk and package group 2022-03-04 18:08:23 -08:00
stubs Fix bug in semver usage by enabling typechecking (#6833) 2021-04-21 15:48:57 -04:00
.gitignore [sdk/python] Allow editable installs without build step 2022-09-30 17:21:44 -07:00
.pylintrc Fix protobuf checksum code and regenerate 2022-11-04 09:57:05 +00:00
Makefile [sdk/python] Allow editable installs without build step 2022-09-30 17:21:44 -07:00
mypy.ini Support deeply nested protobuf objects in python (#10284) 2022-07-29 16:17:09 +01:00
python.go chore: Update doc comments, coding style, fix lint 2022-10-13 13:50:49 -07:00
python_test.go Fix python overriding PATH on Windows (#10236) 2022-07-25 11:52:17 +01:00
requirements.txt Fix protobuf checksum code and regenerate 2022-11-04 09:57:05 +00:00
shim_unix.go Fix lint (#7915) 2021-09-07 16:41:17 -04:00
shim_windows.go Add copyright notice 2020-12-07 14:17:45 -08:00