pulumi/sdk/python/lib
Luke Hoban c50e58f3e1 Avoid accidental mutation of transform arguments
The contract for `transformations` functions is that they should not modify the `props` and `opts` arguments, but should instead return a new `props` and/or `opts`. However, this isn't enforced, and if user code *does* mutate the objects passed in - this can lead to unexpected results.

With this change, we shallow clone the `props` and `opts` passed to user code to avoid these issues.  This is only a shllow clone, as the objects themselves are complex (and can have internal cycles).  This does still mean users could theoretically mutate state in an unsafe way - but the common case is still protected against.

Fixes #5318.
2020-12-09 09:58:50 -08:00
..
pulumi Avoid accidental mutation of transform arguments 2020-12-09 09:58:50 -08:00
test [sdk/python] - Support enums (#5615) 2020-11-24 19:15:11 -06:00
test_with_mocks Allow `pulumi.export` calls from unit tests (#4670) 2020-05-20 09:54:40 -07:00
setup.py Update Python resource ref deserialization. (#5805) 2020-11-23 15:37:44 -08:00