Skip to content

Pulumi providers fail on Python 3.11.9 #15882

@t0yv0

Description

@t0yv0

What happened?

When upgrading from Python 3.11.8 to Python 3.11.9 Pulumi Python programs written against stock providers such as pulumi-aws start failing.

Example

https://github.com/t0yv0/test-pyversion/actions/runs/8618012070/job/23619367836#step:5:112

Diagnostics:
  pulumi:pulumi:Stack (test-pyversion-dev):
    error: Program failed with an unhandled exception:
    Traceback (most recent call last):
      File "/home/runner/work/test-pyversion/test-pyversion/__main__.py", line 6, in <module>
        pulumi.export('v', ami.get_linux_ami(ty))
                           ^^^^^^^^^^^^^^^^^^^^^
      File "/home/runner/work/test-pyversion/test-pyversion/ami.py", line 148, in get_linux_ami
        region = config.region
                 ^^^^^^^^^^^^^
      File "<frozen importlib.util>", line 276, in __getattribute__
    AttributeError: module 'pulumi_aws.config' has no attribute 'region'
from pulumi_aws import config
print(config.region)

Output of pulumi about

N/A

Additional context

N/A

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

Metadata

Metadata

Assignees

Labels

kind/bugSome behavior is incorrect or out of speclanguage/pythonp1A bug severe enough to be the next item assigned to an engineerresolution/fixedThis issue was fixed

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions