pulumi/sdk/python
Justin Van Patten d0ba9fbdcd
[sdk/python] Add support for Sequence (#5282)
We currently emit array types as `List[T]` for Python, but `List[T]` is invariant, which causes type checkers like mypy to produce errors when values like `["foo", "bar"]` are passed as args typed as `List[pulumi.Input[str]]` (since `Input[str]` is an alias for `Union[T, Awaitable[T], Output[T]]`. To address this, we should move to using [`Sequence[T]`](https://docs.python.org/3/library/typing.html#typing.Sequence) which is covariant, and does not have this problem.

We actually already do this for `Dict` vs. `Mapping`, emitting map types as `Mapping[str, T]` rather than `Dict[str, T]` because `Mapping[str, T]` is covariant for the value. This change makes us consistent for array types.

These are the SDK changes necessary to support `Sequence[T]`.
2020-09-08 22:22:35 -07:00
..
cmd Python: Improved error message when virtualenv doesn't exist (#5069) 2020-07-28 13:28:14 -07:00
dist Python: Improved error message when virtualenv doesn't exist (#5069) 2020-07-28 13:28:14 -07:00
lib [sdk/python] Add support for Sequence (#5282) 2020-09-08 22:22:35 -07: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 Make 'ResourceOptions.merge' static so downstream clients don't have to manually handle None cases. (#3072) 2019-08-14 15:55:03 -07:00
Makefile Upgrade to Go 1.14.x (#4697) 2020-05-28 12:01:33 +01:00
mypy.ini Allow oversize protocol buffers (#3895) 2020-02-10 15:30:42 -07:00
Pipfile Exclude grpcio v1.30.0, which breaks Pulumi Python programs (#4883) 2020-06-24 08:11:05 -07:00
Pipfile.lock Exclude grpcio v1.30.0, which breaks Pulumi Python programs (#4883) 2020-06-24 08:11:05 -07:00
python.go Python: Improved error message when virtualenv doesn't exist (#5069) 2020-07-28 13:28:14 -07:00
python_test.go Update pip/setuptools/wheel in virtual environment (#5042) 2020-07-23 13:33:09 -07:00