Skip to content

deploy-on-aws: defusedxml.ElementTree does not expose Element/ElementTree types #154

@RafaelPinto

Description

@RafaelPinto

Describe the bug

Post-processing scripts use ET.Element/ET.ElementTree type annotations from defusedxml.ElementTree, which doesn't expose those classes. All fixer scripts crash at import time.

Expected Behavior

Scripts should import and run without errors

Current Behavior

AttributeError: module 'defusedxml.ElementTree' has no attribute 'Element' on all 4 fixer scripts

Reproduction Steps

pip install defusedxml>=0.7.1 && python3 -c "import defusedxml.ElementTree as ET; print(ET.Element)"

Possible Solution

Add from xml.etree.ElementTree import Element, ElementTree and replace ET.Element/ET.ElementTree with direct imports

Additional Information/Context

No response

Plugin Version

d23cc36 (latest main, 2026-04-30)

Marketplace Version

N/A — installed from git

AI Assistant

OpenCode

AI Assistant Version

1.14.31

OS

Linux (Ubuntu)

Region experiencing the issue

N/A (local tooling issue)

Code modification

No

Other information

No response

Service quota

  • I have reviewed the service quotas for this construct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions