fix(docs): restore search and harden hot-path optimizations#371
Merged
Conversation
sphinx_docsearch disabled Sphinx's built-in search but Algolia credentials were never configured, leaving the deployed docs with no search functionality. Remove the extension and its dependency to restore Shibuya's built-in client-side search. Also fix 4 broken cross-references in changelog.rst that pointed to non-existent guide directories.
- Convert shared mutable _EMPTY_DATA and _EMPTY_RESULT_DATA sentinels to immutable tuples, preventing global data leakage if consumers mutate result.data - Remove unsafe write-back of column_names to shared CachedQuery in SQLite driver, eliminating TOCTOU race in multi-threaded usage - Narrow exception catch in sync direct fast path from (AttributeError, NotImplementedError, TypeError) to (AttributeError, NotImplementedError) — TypeError from cursor.execute() indicates real parameter mismatches - Remove _FAST_NO_COERCION_TYPES short-circuit that bypassed user-registered parent-class coercions for primitive types
Replace cryptic abbreviations with self-documenting names: - _qc_* → _stmt_cache_* (query cache methods/attributes) - _ps_pool → _processed_state_pool, _sql_pool → _statement_pool - QC_MAX_SIZE → STMT_CACHE_MAX_SIZE - _FAST_SCALAR_TYPES → _SCALAR_PASSTHROUGH_TYPES - _COLUMN_NAME_CACHE_MAX_SIZE → COLUMN_CACHE_MAX_SIZE - _ROW_METADATA_CACHE_MAX_SIZE → ROW_CACHE_MAX_SIZE - _TWO_COLUMNS_FASTPATH → _TWO_COLUMN_THRESHOLD - _EMPTY_DATA → _EMPTY_DML_DATA, _DEFAULT_METADATA → _DEFAULT_DML_METADATA
Replace tuple sentinels with inline empty lists for column_names, inserted_ids, statement_results, and errors in FastDMLResult to fix mypyc compilation — mypyc generates C struct slots typed as list, so assigning tuples causes type errors during wheel builds.
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.
Summary
sphinx_docsearchextension that disabled Sphinx's built-in search without ever having Algolia credentials configured — the deployed docs had zero search functionality:doc:/:ref:links inchangelog.rstto plain text or valid targets