-
Notifications
You must be signed in to change notification settings - Fork 243
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade version of typeguard in python runtime #4469
Labels
Comments
sam-goodwin
added
feature-request
A feature should be added or improved.
needs-triage
This issue or PR still needs to be triaged.
labels
Mar 30, 2024
Just tested a monkey patch and removing the import typeguard
old_check_type = typeguard.check_type
def new_check_type(*args: Any, **kwargs: Any) -> Any:
if "argname" in kwargs:
del kwargs["argname"]
return old_check_type(*args, **kwargs)
typeguard.check_type = new_check_type But I do get a bunch of warnings: /./packyak.config.py:11: UserWarning: Typeguard cannot check the IReusableStackSynthesizer protocol because it is a non-runtime protocol. If you would like to type check this protocol, please use @typing.runtime_checkable
return old_check_type(*args, **kwargs)
/./packyak.config.py:11: UserWarning: Typeguard cannot check the IStackSynthesizer protocol because it is a non-runtime protocol. If you would like to type check this protocol, please use @typing.runtime_checkable
return old_check_type(*args, **kwargs) |
This was referenced Mar 30, 2024
mrgrain
added
p1
feature-request
A feature should be added or improved.
and removed
feature-request
A feature should be added or improved.
needs-triage
This issue or PR still needs to be triaged.
labels
Apr 9, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the feature
The python runtime for the CDK has an old and inflexible dependency on
typeguard~=2.13.3
https://github.com/aws/jsii/blob/main/packages/%40jsii/python-runtime/setup.py#L37C10-L37C27
Use Case
I would like to have a CDK application include the latest pandera libraries but this fixed dependency is a blocker.
Proposed Solution
Increase the range and add version-aware adaptation code if required to handle the different versions.
Later versions of
typeguard
no longer accept theargname
parameter. We'd have to change this line of code:jsii/packages/jsii-pacmak/lib/targets/python.ts
Lines 3205 to 3207 in 576fd20
Other Information
No response
Acknowledgements
CDK version used
2.134.0
Environment details (OS name and version, etc.)
Mac OS
The text was updated successfully, but these errors were encountered: