feat(python): type stubs, data= parameter, and cleanup#179
Draft
cpsievert wants to merge 4 commits intofeat/python-exceptions-protocolfrom
Draft
feat(python): type stubs, data= parameter, and cleanup#179cpsievert wants to merge 4 commits intofeat/python-exceptions-protocolfrom
cpsievert wants to merge 4 commits intofeat/python-exceptions-protocolfrom
Conversation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…taFrames Allows passing a dict of DataFrames to reader.execute() and the module-level execute() function, which are registered before query execution and unregistered afterward (cleanup happens even on error). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…specificity - Update type stubs to document typed exceptions (ParseError, ReaderError, etc.) instead of generic ValueError - Guard data= cleanup against destroying pre-existing tables by checking table existence before registration - Pass replace as keyword arg in bridge register_data_on_reader for compatibility with custom readers that omit the parameter - Tighten test assertions to expect specific exception types - Remove unused try_native_readers! macro Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
5a4a2df to
b3ec22b
Compare
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.
Depends on #178 (merge that first)
Summary
.pyi) for the native_ggsqlextension module, enabling IDE autocompletion and type checkingdata=dict parameter onexecute()for registering temporary DataFrames that are automatically cleaned up after execution (even on error)Rust changes
data: Option<&Bound<'_, PyDict>>parameter onPyDuckDBReader.execute()and freeexecute()register_data_dict()/register_data_on_reader()helpers withtable_exists()probe to avoid unregistering pre-existing tablestry_native_readers!macro (incompatible with cleanup-before-return pattern)