pulumi/sdk/python/cmd/pulumi-language-python
Justin Van Patten d4969f3338
Update python langhost test for pulumi-random change (#15193)
When creating a PyPi package, Python setuptools prior to v69 would
record the name of a package in egg_info by replacing underscores with
dashes. So after installing `pulumi-random==4.15.0`, `pip list` would
report the package name as `pulumi-random`.

However, setuptools >= 69 now retains the underscore in egg_info
(https://github.com/pypa/setuptools/pull/4159). So after installing the
latest version of `pulumi-random==4.15.1`, `pip list` now reports the
package name as `pulumi_random` instead of `pulumi-random`.

We use pip to list installed packages so we can determine which ones are
Pulumi packages for `GetRequiredPlugins`.

It turns out that this change is largely benign for us. We don't really
care if the reported name is `pulumi-random` or `pulumi_random`, because
we will replace dashes with underscores in the returned name anyway,
because the location the package is installed on disk is going to have
the underscore, and it's in this location where we look for
`pulumi-plugin.json`.


8bcef51fb8/sdk/python/cmd/pulumi-language-python/main.go (L393-L398)

All that's required is updating the test's expected value, which is now
`pulumi_random` as of 4.15.1 of that package.

Fixes #15192
2024-01-20 16:31:14 +00:00
..
go.mod Changelog and go.mod updates for v3.102.0 (#15182) 2024-01-19 02:14:13 +00:00
go.sum Bump the go_modules group across 29 directories with 1 update (#15131) 2024-01-11 16:05:38 +00:00
main.go Remove deprecated Protobufs imports (#15158) 2024-01-17 09:35:20 +00:00
main_test.go Update python langhost test for pulumi-random change (#15193) 2024-01-20 16:31:14 +00:00