Skip to content

Python SDK: Add strict mode#1477

Merged
emilk merged 9 commits intomainfrom
emilk/catch-python-exceptions
Mar 2, 2023
Merged

Python SDK: Add strict mode#1477
emilk merged 9 commits intomainfrom
emilk/catch-python-exceptions

Conversation

@emilk
Copy link
Copy Markdown
Member

@emilk emilk commented Mar 2, 2023

This adds a strict mode to our Python SDK where misuses of the API results in exceptions being raised.

This is disabled by default for our users. In our examples it is enabled by default.

Checklist

emilk added 5 commits March 2, 2023 12:11
This replaces explicit checks with a decorator.

This decorator declaration preserves type information
in Python 3.8 in my VSCode, which was a problem with previous attempts.

In a follow-up PR we can add a try-catch to the decorator to prevent
errors from bubbling up to the user.
@emilk emilk added the sdk-python Python logging API label Mar 2, 2023
@emilk emilk marked this pull request as ready for review March 2, 2023 18:15
Copy link
Copy Markdown
Member

@Wumpf Wumpf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

log_decorator <3

emilk and others added 4 commits March 2, 2023 19:57
Co-authored-by: Andreas Reich <andreas@rerun.io>
Co-authored-by: Andreas Reich <andreas@rerun.io>
Co-authored-by: Andreas Reich <andreas@rerun.io>
@emilk emilk merged commit 684a070 into main Mar 2, 2023
@emilk emilk deleted the emilk/catch-python-exceptions branch March 2, 2023 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sdk-python Python logging API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants