Repository navigation
fix: chain sensor load errors as the previous release did - #377
Merged
Merged
Conversation
A sensor file that fails to import raises a SensorError whose context is the import error as well as its cause, and an import error whose message cannot be rendered stays the context of that failure, matching a Python raise inside an except block. Sensor errors raised without a cause chain to the exception being handled.
kvlonge
enabled auto-merge (squash)
November 11, 2026 05:08
Deploying sqltide with
|
| Latest commit: |
eeb5170
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://c7e2a800.sqltide.pages.dev |
| Branch Preview URL: | https://fix-sensor-load-error-contex.sqltide.pages.dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Sensor load errors raised from the native loader lost the exception chaining of the previous Python loader, so tracebacks no longer showed the import failure as context.
Changes
SensorErrorwhose context is the import error as well as its cause, asraise ... from errorinsideexceptdid.Verification
make check-ci. A new regression test fails without the fix. Against 0.65.13, 18 sensor-loading cases (import, syntax, unprintable, base exceptions, decorator validation, name collisions, reserved names, unsupported events; each with and without an outer handler) and 8 provider cases match on error type,.args, cause, context, suppressed context andsys.path.