refactor: tighten adapter typing and core cleanup#545
Merged
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #545 +/- ##
==========================================
- Coverage 75.55% 75.52% -0.04%
==========================================
Files 444 445 +1
Lines 58791 58630 -161
Branches 9132 9021 -111
==========================================
- Hits 44418 44278 -140
+ Misses 11500 11497 -3
+ Partials 2873 2855 -18
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
This was referenced Jun 28, 2026
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.
Description
This PR tightens runtime typing, optional dependency boundaries, and core execution hot paths while preserving public APIs.
_typingmodules, then reuses those exports from driver implementations instead of importing provider packages inside methods.PsqlpyConnection,PsqlpyConfig.connection_type, and signature namespace resolution usepsqlpy.Connectionwhen the extra is installed, with a fallback when it is absent.Finalannotations in compiled core modules.StackResultMyPyC crash, and the Spanner tokenizer docs type-alias resolution.Closes
Closes #546
Closes #547
Closes #548
Closes #549
Closes #550
Closes #551
Closes #552
Validation
make cleanmake install-compileduv run python tools/scripts/mypyc_smoke.py --require-compiledmake docsmake lintmake type-checkuv run pytest tests/unit/core/test_result.py tests/unit/adapters/test_spanner/test_dialect.py -q --tb=shortuv run pytest tests/unit/adapters/test_spanner/test_dialect.py::test_string_literals_single_quote tests/unit/adapters/test_spanner/test_dialect.py::test_string_literals_unicode tests/unit/adapters/test_spanner/test_dialect.py::test_dialect_inheritance -q --tb=shortuv run mypy tests/unit/core/test_splitter.pyuv run pytest tests/unit/core/test_splitter.py -q --tb=shortuv run mypy sqlspec/core/splitter.py tests/unit/core/test_splitter.pyuv run mypyc --check-untyped-defs --no-warn-unused-configs sqlspec/core/splitter.pyuv run pytest tests/unit/adapters/test_asyncpg/test_driver.py tests/unit/adapters/test_asyncpg/test_config.py tests/unit/adapters/test_psqlpy/test_core.py tests/unit/adapters/test_psqlpy/test_config.py tests/unit/adapters/test_cockroach_asyncpg/test_core.py tests/unit/adapters/test_cockroach_asyncpg/test_config.py tests/unit/adapters/test_bigquery/test_storage_write_api.py tests/unit/adapters/test_bigquery/test_core.py tests/unit/adapters/test_oracledb/test_pipeline_helpers.py tests/unit/adapters/test_oracledb/test_core_driver_features.py tests/unit/adapters/test_oracledb/test_lob_coercion.py tests/unit/adapters/test_spanner/test_driver.py tests/unit/adapters/test_spanner/test_load_from_arrow_mutations.py tests/unit/adapters/test_spanner/test_batch_write_api.py -q --tb=short