Skip to content

Conversation

@cosmicBboy
Copy link
Collaborator

Fixes #1559

This PR patches typing._GenericAlias.__call__, which was changed in python 3.11.9 such that it ignores all exceptions when the __orig_class__ attribute is set. This is the dark magic that pandera relies on to enable the validation-on-init feature when using pandera.typing.DataFrame[Schema](...).

@cosmicBboy cosmicBboy merged commit a91189b into main Apr 10, 2024
@cosmicBboy cosmicBboy deleted the bugfix/py3119-patched-generic-alias branch April 10, 2024 14:51
max-raphael pushed a commit to max-raphael/pandera that referenced this pull request Jan 24, 2025
* Fixes unionai-oss#1559, add _GenericAlias.__call__ patch

Signed-off-by: cosmicBboy <[email protected]>

* raise TypeErrors

Signed-off-by: cosmicBboy <[email protected]>

---------

Signed-off-by: cosmicBboy <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

no exception raise after pipe on 3.11.9

2 participants