python3Packages.chromadb: 1.0.12 -> 1.0.20 (#435763)

Changed files
+32 -63
pkgs
development
top-level
+31 -48
pkgs/development/python-modules/chromadb/default.nix
···
# build inputs
cargo,
+
openssl,
pkg-config,
protobuf,
rustc,
rustPlatform,
-
pkgs, # zstd hidden by python3Packages.zstd
-
openssl,
+
zstd-c,
# dependencies
bcrypt,
···
orjson,
overrides,
posthog,
+
pybase64,
pydantic,
pypika,
pyyaml,
···
buildPythonPackage rec {
pname = "chromadb";
-
version = "1.0.12";
+
version = "1.0.20";
pyproject = true;
src = fetchFromGitHub {
owner = "chroma-core";
repo = "chroma";
tag = version;
-
hash = "sha256-Q4PhJTRNzJeVx6DIPWirnI9KksNb8vfOtqb/q9tSK3c=";
+
hash = "sha256-jwgm1IXAyctLzUi9GZfgRMiqAuq1BwpcZp/UMlV2t7g=";
};
cargoDeps = rustPlatform.fetchCargoVendor {
inherit src;
name = "${pname}-${version}-vendor";
-
hash = "sha256-+Ea2aRrsBGfVCLdOF41jeMehJhMurc8d0UKrpR6ndag=";
+
hash = "sha256-A4I0xAGmwF9Th+g8bWEmhCRTAp4Q6GYkejHKDqoczY4=";
};
# Can't use fetchFromGitHub as the build expects a zipfile
···
hash = "sha256-H+kXxA/6rKzYA19v7Zlx2HbIg/DGicD5FDIs0noVGSk=";
};
-
patches = [
-
# The fastapi servers can't set up their networking in the test environment, so disable for testing
-
./disable-fastapi-fixtures.patch
-
];
-
postPatch = ''
# Nixpkgs is taking the version from `chromadb_rust_bindings` which is versioned independently
substituteInPlace pyproject.toml \
···
pythonRelaxDeps = [
"fastapi"
+
"posthog"
];
build-system = [
···
buildInputs = [
openssl
-
pkgs.zstd
+
zstd-c
];
dependencies = [
···
orjson
overrides
posthog
+
pybase64
pydantic
pypika
pyyaml
···
};
pytestFlags = [
-
"-x" # these are slow tests, so stop on the first failure
"-v"
"-Wignore:DeprecationWarning"
"-Wignore:PytestCollectionWarning"
];
+
# Skip the distributed and integration tests
+
# See https://github.com/chroma-core/chroma/issues/5315
preCheck = ''
(($(ulimit -n) < 1024)) && ulimit -n 1024
-
export HOME=$(mktemp -d)
+
export CHROMA_RUST_BINDINGS_TEST_ONLY=1
'';
-
disabledTests = [
-
# Tests are flaky / timing sensitive
-
"test_fastapi_server_token_authn_allows_when_it_should_allow"
-
"test_fastapi_server_token_authn_rejects_when_it_should_reject"
-
-
# Issue with event loop
-
"test_http_client_bw_compatibility"
-
-
# httpx ReadError
-
"test_not_existing_collection_delete"
+
enabledTestPaths = [
+
"chromadb/test"
+
];
-
# Tests launch a server and try to connect to it
-
# These either have https connection errors or name resolution errors
+
disabledTests = [
+
# Failure in name resolution
"test_collection_query_with_invalid_collection_throws"
"test_collection_update_with_invalid_collection_throws"
"test_default_embedding"
-
"test_invalid_index_params"
-
"test_peek"
"test_persist_index_loading"
-
"test_query_id_filtering_e2e"
-
"test_query_id_filtering_medium_dataset"
-
"test_query_id_filtering_small_dataset"
+
+
# Deadlocks intermittently
+
"test_app"
+
+
# Depends on specific floating-point precision
+
"test_base64_conversion_is_identity_f16"
+
+
# No such file or directory: 'openssl'
"test_ssl_self_signed_without_ssl_verify"
"test_ssl_self_signed"
-
-
# Apparent race condition with sqlite
-
# See https://github.com/chroma-core/chroma/issues/4661
-
"test_multithreaded_get_or_create"
];
disabledTestPaths = [
# Tests require network access
-
"bin/rust_python_compat_test.py"
-
"chromadb/test/configurations/test_collection_configuration.py"
-
"chromadb/test/ef/test_default_ef.py"
-
"chromadb/test/ef/test_onnx_mini_lm_l6_v2.py"
-
"chromadb/test/ef/test_voyageai_ef.py"
-
"chromadb/test/property/"
+
"chromadb/test/distributed"
+
"chromadb/test/ef"
"chromadb/test/property/test_cross_version_persist.py"
-
"chromadb/test/stress/"
-
"chromadb/test/test_api.py"
+
"chromadb/test/stress"
-
# Tests time out (waiting for server)
-
"chromadb/test/test_cli.py"
-
-
# Cannot find protobuf file while loading test
-
"chromadb/test/distributed/test_log_failover.py"
+
# Excessively slow
+
"chromadb/test/property/test_add.py"
+
"chromadb/test/property/test_persist.py"
# ValueError: An instance of Chroma already exists for ephemeral with different settings
"chromadb/test/test_chroma.py"
-
"chromadb/test/ef/test_multimodal_ef.py"
];
__darwinAllowLocalNetworking = true;
-14
pkgs/development/python-modules/chromadb/disable-fastapi-fixtures.patch
···
-
diff --git a/chromadb/test/conftest.py b/chromadb/test/conftest.py
-
index efde1c382..163f55c57 100644
-
--- a/chromadb/test/conftest.py
-
+++ b/chromadb/test/conftest.py
-
@@ -678,9 +678,6 @@ def sqlite_persistent(request: pytest.FixtureRequest) -> Generator[System, None,
-
-
def system_fixtures() -> List[Callable[[], Generator[System, None, None]]]:
-
fixtures = [
-
- fastapi,
-
- async_fastapi,
-
- fastapi_persistent,
-
sqlite_fixture,
-
sqlite_persistent_fixture,
-
]
+1 -1
pkgs/top-level/python-packages.nix
···
chroma-hnswlib = callPackage ../development/python-modules/chroma-hnswlib { };
-
chromadb = callPackage ../development/python-modules/chromadb { };
+
chromadb = callPackage ../development/python-modules/chromadb { zstd-c = pkgs.zstd; };
chromaprint = callPackage ../development/python-modules/chromaprint { };