Describe the bug
Recently upgraded [email protected] in a Python based project. This caused typeguard to upgrade from v2.13.3 to v4.2.1. On synth, getting many of these messages:
/path/to/.venv/lib/python3.13/site-packages/aws_cdk/aws_events/__init__.py:411: UserWarning: Typeguard cannot check the IRuleTarget protocol because it is a non-runtime protocol. If you would like to type check this protocol, please use @typing.runtime_checkable
typeguard.check_type(value=value, expected_type=expected_type, collection_check_strategy=typeguard.CollectionCheckStrategy.ALL_ITEMS) # type:ignore
Might be related to #4658 but seems like that's another problem with typeguard (incompatible interfaces vs runtime protocol).
Regression Issue
Expected Behavior
No messages from typeguard.
Current Behavior
typeguard prints these message:
/path/to/.venv/lib/python3.13/site-packages/aws_cdk/aws_events/__init__.py:411: UserWarning: Typeguard cannot check the IRuleTarget protocol because it is a non-runtime protocol. If you would like to type check this protocol, please use @typing.runtime_checkable
typeguard.check_type(value=value, expected_type=expected_type, collection_check_strategy=typeguard.CollectionCheckStrategy.ALL_ITEMS) # type:ignore
Reproduction Steps
Use typeguard v4.2.1 in a Python CDK project, using latest aws-cdk-lib
Possible Solution
Workaround: pin typeguard to 2.13.3.
Additional Information/Context
No response
SDK version used
1.119.0
Environment details (OS name and version, etc.)
macOS
Describe the bug
Recently upgraded
[email protected]in a Python based project. This causedtypeguardto upgrade fromv2.13.3tov4.2.1. On synth, getting many of these messages:Might be related to #4658 but seems like that's another problem with
typeguard(incompatible interfaces vs runtime protocol).Regression Issue
Expected Behavior
No messages from
typeguard.Current Behavior
typeguardprints these message:Reproduction Steps
Use
typeguardv4.2.1in a Python CDK project, using latestaws-cdk-libPossible Solution
Workaround: pin
typeguardto2.13.3.Additional Information/Context
No response
SDK version used
1.119.0
Environment details (OS name and version, etc.)
macOS