pulumi/tests/integration/dynamic/python-non-main
Luke Hoban ebb0e6aaed
Allow Python dynamic provider resources to be constructed outside of `__main__` (#7755)
The underlying library `dill` that we use for serializing dynamic providers into Pulumi state for Python dynamic providers serializes classes differently depending on whether they are in `__main__` or in another module.  We need the by-value serialization to be applied in all cases.

https://github.com/uqfoundation/dill/issues/424 is tracking adding the ability into `dill` to specify this by-value serialization explicitly, but until then, we will temporarily re-write the `__module__` of a provder class prior to serialization, so that `dill` behaves as we need for the dynamic provider use case.

Fixes #7453.
2021-08-12 20:02:17 -07:00
..
.gitignore Allow Python dynamic provider resources to be constructed outside of `__main__` (#7755) 2021-08-12 20:02:17 -07:00
Pulumi.yaml Allow Python dynamic provider resources to be constructed outside of `__main__` (#7755) 2021-08-12 20:02:17 -07:00
__main__.py Allow Python dynamic provider resources to be constructed outside of `__main__` (#7755) 2021-08-12 20:02:17 -07:00
other.py Allow Python dynamic provider resources to be constructed outside of `__main__` (#7755) 2021-08-12 20:02:17 -07:00
requirements.txt Allow Python dynamic provider resources to be constructed outside of `__main__` (#7755) 2021-08-12 20:02:17 -07:00