Repository navigation
[BUG] Remove subprocess pip install at import time - #7531
Open
PiedPiper911 wants to merge 1 commit into
Open
PiedPiper911 wants to merge 1 commit into
PiedPiper911 wants to merge 1 commit into
Conversation
Reviewer ChecklistPlease leverage this checklist to ensure your code review is thorough before approving Testing, Bugs, Errors, Logs, Documentation
System Compatibility
Quality
|
Author
|
Hi! Following up on this fix removing subprocess pip install at import time. Happy to provide more context or make changes. Thanks! |
PiedPiper911
force-pushed
the
fix-7402-remove-subprocess-pip-install
branch
from
November 14, 2026 05:27
ade1ded to
31a4315
Compare
Importing `chromadb` could shell out to `pip install pysqlite3-binary` on Colab when the system sqlite3 was older than 3.35. Installing a package as a side effect of an import is unreliable (no network, read-only environments, pinned images), and it silently replaced `sys.modules["sqlite3"]` under the caller. The version check now always raises the actionable error, on Colab and elsewhere. `is_in_colab()` and `IN_COLAB` are kept: the product telemetry module imports `is_in_colab` (`from chromadb import is_in_colab`), so the Colab signal is still reported. The error message is rebuilt from adjacent literals, preserving the colour codes and the trailing newline, and dropping the padding that the old backslash-continuation baked into the text. Rebased onto current main, so `__version__` stays at 1.6.0; the diff against main is +7/-18 and nothing else moves.
PiedPiper911
force-pushed
the
fix-7402-remove-subprocess-pip-install
branch
from
November 14, 2026 05:28
31a4315 to
a6cd57b
Compare
This branch has not been deployed
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.
Problem
Fixes #7402
When importing in Google Colab (or any environment with SQLite < 3.35.0), the module silently executes at import time. This:
Solution
Removed the Colab-specific branch entirely. Now all environments with old SQLite receive the same clear directing users to the troubleshooting documentation.
Before
After
The function and constant remain available for telemetry use (they are used in ).
Why this approach
Users on Colab who need a newer SQLite can follow the same troubleshooting guide as everyone else. If is needed as a dependency, it should be declared in build requirements, not installed imperatively at runtime.