pulumi/pkg/codegen/python
Fraser Waters d00528918e
Add a conformance test for preserving map keys (#17350)
This adds a conformance test checking we can use map keys like "MY_KEY"
and maintain their casing through program gen. For Python we need to
simplify the type passed to genObjectConsExpression so that we can
reliably determine the target type and check if it's a `TypedDict` or
not, otherwise we might treat it as a plain object and preserve the
keys, instead of `PyName`ing them.

This deletes the "typeddict" test from the codegen tests. Firstly this
is now covered by these conformance tests, secondly it wasn't actually
valid because the schema it was testing against wasn't a valid schema,
and the program snapshot was only how it was because of a bug in
programgen.

That bug is now fixed in this change which fixes
https://github.com/pulumi/pulumi/issues/17294.

---------

Co-authored-by: Julien Poissonnier <julien@caffeine.lu>
2024-10-11 13:34:46 +00:00
..
gen_program_test Don't publish test code in `pkg/codegen` (#17517) 2024-10-09 11:09:54 +00:00
.gitignore Simplify output-funcs codegen test (#8039) 2021-09-23 13:42:20 -04:00
doc.go Generate TypedDicts for python inputs (#15957) 2024-06-18 15:24:42 +00:00
gen.go [sdkgen/python-nodejs] Bump minimum required SDK version to v3.136.0 (#17501) 2024-10-08 02:28:26 +00:00
gen_intrinsics.go ci: gofmt 1.18+ clean 2022-09-21 09:48:39 -07:00
gen_program.go Add a conformance test for preserving map keys (#17350) 2024-10-11 13:34:46 +00:00
gen_program_expressions.go Add a conformance test for preserving map keys (#17350) 2024-10-11 13:34:46 +00:00
gen_program_lower.go Enable goheader rule and add missing license headers (#15473) 2024-09-09 12:05:45 +00:00
gen_program_quotes.go Enable goheader rule and add missing license headers (#15473) 2024-09-09 12:05:45 +00:00
gen_program_quotes_test.go Enable goheader rule and add missing license headers (#15473) 2024-09-09 12:05:45 +00:00
gen_program_test.go Don't publish test code in `pkg/codegen` (#17517) 2024-10-09 11:09:54 +00:00
gen_program_utils.go Enable goheader rule and add missing license headers (#15473) 2024-09-09 12:05:45 +00:00
gen_resource_mappings.go Use slice.Prealloc instead of make([]T, 0, ...) 2023-06-29 11:27:50 +01:00
gen_resource_mappings_test.go Enable goheader rule and add missing license headers (#15473) 2024-09-09 12:05:45 +00:00
gen_test.go Don't publish test code in `pkg/codegen` (#17517) 2024-10-09 11:09:54 +00:00
importer.go Generate TypedDict input types by default (#16704) 2024-07-23 11:26:54 +00:00
pyproject.go Enable goheader rule and add missing license headers (#15473) 2024-09-09 12:05:45 +00:00
python.go ci: gofmt 1.18+ clean 2022-09-21 09:48:39 -07:00
python_test.go Enable goheader rule and add missing license headers (#15473) 2024-09-09 12:05:45 +00:00
requirements.txt Fully generate TypedDict input types by default (#17296) 2024-09-20 17:16:14 +00:00
utilities.go Enable goheader rule and add missing license headers (#15473) 2024-09-09 12:05:45 +00:00
utilities.py Replace asyncio.ensure_future with create_task (#17406) 2024-09-30 12:53:15 +00:00
utilities_test.go Enable goheader rule and add missing license headers (#15473) 2024-09-09 12:05:45 +00:00