Closed tefra closed 2 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 100.00%. Comparing base (
c544fbd
) to head (346afc1
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code
📒 Description
warnings.catch_warnings
is not threadsafe. The main converter entry point raises warnings when a value can't be converted to the target types. It's up to the parsers to catch that warning per case and either raise ParserError or ignore them completely.When we are parsing unions of classes, we intentional trap those warnings in order to find the best candidate, but since catch_warnings is not thread safe, confusing warnings are logged 🤦
Move the logic to convert warnings to exception from the parsers to the parser utils and avoid using the
catch_warnings
altogether.Resolves #1041
🔗 What I've Done
💬 Comments
🛫 Checklist