Skip to content

Allow ValidationExceptionGroup to propagate through context managers#57

Open
renan-r-santos wants to merge 1 commit into
drhagen:masterfrom
renan-r-santos:fix-error-context-manager
Open

Allow ValidationExceptionGroup to propagate through context managers#57
renan-r-santos wants to merge 1 commit into
drhagen:masterfrom
renan-r-santos:fix-error-context-manager

Conversation

@renan-r-santos

Copy link
Copy Markdown
Contributor

ValidationExceptionGroup was a frozen dataclass. When raised inside a context manager, contextlib's __exit__ assigns exc.__traceback__ at the Python level as the exception unwinds, and the frozen __setattr__ rejected it masking the real error. Ordinary propagation was unaffected because the interpreter sets the traceback at the C level, bypassing __setattr__.

@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.61%. Comparing base (910a810) to head (cf15a07).
⚠️ Report is 1 commits behind head on master.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #57      +/-   ##
==========================================
+ Coverage   92.45%   92.61%   +0.16%     
==========================================
  Files          34       35       +1     
  Lines        1524     1558      +34     
  Branches      232      234       +2     
==========================================
+ Hits         1409     1443      +34     
  Misses         50       50              
  Partials       65       65              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

2 participants