-
-
Notifications
You must be signed in to change notification settings - Fork 133
Description
cattrs is using __note__, but it's actually __notes__, and a tuple of strings, and should be (python version conditionally) added via .add_note(string), perhaps? (depending on the backport, I guess). exceptiongroup was updated in 1.0.0rc4, see https://github.com/agronholm/exceptiongroup/blob/main/CHANGES.rst.
Also, the message seems pretty poor on pytest + Python 3.10, is pytest and exceptiongroup clashing?
except Exception as e:
e.__note__ = 'Structuring class Index @ attribute reply'
errors.append(e)
> if errors: raise __c_cve('While structuring Index', errors, __cl)
E cattrs.errors.ClassValidationError: While structuring Index (1 sub-exception)
<cattrs generated structure scikit_build_core.file_api.model.index.Index>:19: ClassValidationError(There's no more helpful err message below it, just that)
I tried running this outside of pytest, and it's much better, I can see the errors. But not inside pytest. I'm guessing it's the monkey patching warnings in https://pypi.org/project/exceptiongroup/. Maybe something to bring up with pytest? Or exceptiongroup? I think that might be agronholm/exceptiongroup#23.
This is really cool when it works, though! (though the notes are missing, due to this issue, unless I force exceptiongroup==1.0.0rc3)