You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The returned object from SecurityGroup.from_security_group_id when used in DockerImageFunction fails to pass the typeguard check in the check_type function.
This error wasn't present when using typeguard version 4.0.0. It used to throw warnings but not errors. The warning is pasted below.
<redacted-path>/lib/python3.12/site-packages/aws_cdk/aws_lambda/__init__.py:1526: UserWarning: Typeguard cannot check the ISecurityGroup 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
The error appears with typeguard version 4.3.0. The error message is pasted below.
Sequence[aws_cdk.aws_ec2.ISecurityGroup]: item 0 is not compatible with the ISecurityGroup protocol because it has no method named '__jsii_proxy_class__'
NoneType: is not an instance of NoneType
Regression Issue
Select this option if this issue appears to be a regression.
Last Known Working CDK Version
No response
Expected Behavior
The type check should succeed.
Current Behavior
The type check fails and so does cdk deploy or cdk synth.
Reproduction Steps
Install typeguard version 4.3.0 in your environment.
typeguard-4.3.0 is not currently supported due to an issue with how protocols are now checked in the latest version. We will are investigating this, but cannot currently provide an ETA.
Our main priority is that users are not unintentionally blocked by this. @jcmonteiro From your description ot sounds like you were explicitly declaring a dependency on typeguard 4.3.0 (as opposed to automatically receiving this version as a transitive dependency). Can you confirm this if this was the case?
Describe the bug
The returned object from
SecurityGroup.from_security_group_id
when used in DockerImageFunction fails to pass the typeguard check in thecheck_type
function.This error wasn't present when using
typeguard
version 4.0.0. It used to throw warnings but not errors. The warning is pasted below.The error appears with
typeguard
version 4.3.0. The error message is pasted below.Regression Issue
Last Known Working CDK Version
No response
Expected Behavior
The type check should succeed.
Current Behavior
The type check fails and so does
cdk deploy
orcdk synth
.Reproduction Steps
typeguard
version 4.3.0 in your environment.cdk synth
the Stack defined below.Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.162.1
Framework Version
No response
Node.js Version
v22.9.0
OS
Mac
Language
Python
Language Version
Python 3.12.4
Other information
No response
The text was updated successfully, but these errors were encountered: