delightful-queen-14969
08/18/2025, 1:48 PMFile "<home_dir>/venv/lib/python3.13/site-packages/pulumi/provider/experimental/host.py", line 56, in component_provider_host
main(ComponentProvider(components, name, namespace, version), args)
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<home_dir>/venv/lib/python3.13/site-packages/pulumi/provider/experimental/component.py", line 61, in __init__
result = self.analyzer.analyze(components)
File "<home_dir>/venv/lib/python3.13/site-packages/pulumi/provider/experimental/analyzer.py", line 276, in analyze
c = self.analyze_component(component)
File "<home_dir>/venv/lib/python3.13/site-packages/pulumi/provider/experimental/analyzer.py", line 355, in analyze_component
(inputs, inputs_mapping) = self.analyze_type(args, is_component_output=False)
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<home_dir>/venv/lib/python3.13/site-packages/pulumi/provider/experimental/analyzer.py", line 404, in analyze_type
camel_case(k): self.analyze_property(
~~~~~~~~~~~~~~~~~~~~~^
v,
^^
...<3 lines>...
is_component_output=is_component_output,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "<home_dir>/venv/lib/python3.13/site-packages/pulumi/provider/experimental/analyzer.py", line 594, in analyze_property
elif is_enum(arg):
~~~~~~~^^^^^
File "<home_dir>/venv/lib/python3.13/site-packages/pulumi/provider/experimental/analyzer.py", line 819, in is_enum
return issubclass(typ, Enum)
TypeError: issubclass() arg 1 must be a class
I did some fiddling with the analyzer and I can see that the type it's bombing on is a Mapping[str, pulumi.Input[str]]
field on one of my objects used to configure the tags on my component. I get this error when I try to install the package from a GitHub repo, but if I clone the repo locally, set up the venv and then point the pulumi package add
command at the local installed clone then it doesn't seem to have any problems generating SDKs with no code changes on my part. Am I hitting a bug here? What types are in scope when it comes to Pulumi generating valid SDK values from type annotations? I have tried annotated types for other fields and they also seem to cause issues. Just would like to know as debugging these type issues is basically impossible without manually fiddling with the analyzer to dump out the type causing the TypeError to be thrownmodern-spring-15520
08/18/2025, 4:59 PMdelightful-queen-14969
08/18/2025, 9:45 PMcollections.abc.Mapping
through issubclass
for every Python version since 3.9 and found something very interesting:
Python 3.9 - 3.12:
>>> issubclass(collections.abc.Mapping, Enum)
False
>>> issubclass(collections.abc.Mapping[str, str], Enum)
False
Python 3.13:
>>> issubclass(collections.abc.Mapping, Enum)
False
>>> issubclass(collections.abc.Mapping[str, str], Enum)
Traceback (most recent call last):
File "<python-input-17>", line 1, in <module>
issubclass(collections.abc.Mapping[str, str], Enum)
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: issubclass() arg 1 must be a class
delightful-queen-14969
08/18/2025, 9:49 PM~/.pulumi/plugins
and that is also Python 3.13. The difference in behaviour between versions is interesting, thoughmodern-spring-15520
08/18/2025, 11:20 PMmodern-spring-15520
08/18/2025, 11:22 PMdelightful-queen-14969
08/18/2025, 11:24 PMmodern-spring-15520
08/18/2025, 11:27 PMissubclass()
raises TypeError
. But I'm not clear why that would change for you based on local vs git.delightful-queen-14969
08/19/2025, 12:16 AM