pulumi/sdk/python
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
..
cmd Implement GetRequiredPlugins for Python (#5787) 2020-12-03 19:22:16 -08:00
dist Fix windows build 2020-12-07 15:58:30 -08:00
lib Avoid accidental mutation of transform arguments 2020-12-09 09:58:50 -08:00
.gitignore add .venv/ to python .gitignore to ignore when using PIPENV_VENV_IN_PROJECT=1 2019-06-19 12:43:04 -07:00
.pylintrc Support remote components in Python (#5375) 2020-09-30 14:09:20 -07:00
Makefile Implement GetRequiredPlugins for Python (#5787) 2020-12-03 19:22:16 -08:00
Pipfile Update Python resource ref deserialization. (#5805) 2020-11-23 15:37:44 -08:00
Pipfile.lock Update Python resource ref deserialization. (#5805) 2020-11-23 15:37:44 -08:00
mypy.ini Allow oversize protocol buffers (#3895) 2020-02-10 15:30:42 -07:00
python.go Add a python shim script to work around https://github.com/golang/go/issues/42919 2020-12-07 14:17:45 -08:00
python_test.go Update pip/setuptools/wheel in virtual environment (#5042) 2020-07-23 13:33:09 -07:00
shim_unix.go Add copyright notice 2020-12-07 14:17:45 -08:00
shim_windows.go Add copyright notice 2020-12-07 14:17:45 -08:00