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](...).
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 usingpandera.typing.DataFrame[Schema](...)
.