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

authored by

Gaétan Lepage and committed by
GitHub
8c4f2731 3a212fa7

+32 -63
+31 -48
pkgs/development/python-modules/chromadb/default.nix
··· 7 7 8 8 # build inputs 9 9 cargo, 10 + openssl, 10 11 pkg-config, 11 12 protobuf, 12 13 rustc, 13 14 rustPlatform, 14 - pkgs, # zstd hidden by python3Packages.zstd 15 - openssl, 15 + zstd-c, 16 16 17 17 # dependencies 18 18 bcrypt, ··· 33 33 orjson, 34 34 overrides, 35 35 posthog, 36 + pybase64, 36 37 pydantic, 37 38 pypika, 38 39 pyyaml, ··· 66 67 67 68 buildPythonPackage rec { 68 69 pname = "chromadb"; 69 - version = "1.0.12"; 70 + version = "1.0.20"; 70 71 pyproject = true; 71 72 72 73 src = fetchFromGitHub { 73 74 owner = "chroma-core"; 74 75 repo = "chroma"; 75 76 tag = version; 76 - hash = "sha256-Q4PhJTRNzJeVx6DIPWirnI9KksNb8vfOtqb/q9tSK3c="; 77 + hash = "sha256-jwgm1IXAyctLzUi9GZfgRMiqAuq1BwpcZp/UMlV2t7g="; 77 78 }; 78 79 79 80 cargoDeps = rustPlatform.fetchCargoVendor { 80 81 inherit src; 81 82 name = "${pname}-${version}-vendor"; 82 - hash = "sha256-+Ea2aRrsBGfVCLdOF41jeMehJhMurc8d0UKrpR6ndag="; 83 + hash = "sha256-A4I0xAGmwF9Th+g8bWEmhCRTAp4Q6GYkejHKDqoczY4="; 83 84 }; 84 85 85 86 # Can't use fetchFromGitHub as the build expects a zipfile ··· 88 89 hash = "sha256-H+kXxA/6rKzYA19v7Zlx2HbIg/DGicD5FDIs0noVGSk="; 89 90 }; 90 91 91 - patches = [ 92 - # The fastapi servers can't set up their networking in the test environment, so disable for testing 93 - ./disable-fastapi-fixtures.patch 94 - ]; 95 - 96 92 postPatch = '' 97 93 # Nixpkgs is taking the version from `chromadb_rust_bindings` which is versioned independently 98 94 substituteInPlace pyproject.toml \ ··· 101 97 102 98 pythonRelaxDeps = [ 103 99 "fastapi" 100 + "posthog" 104 101 ]; 105 102 106 103 build-system = [ ··· 117 114 118 115 buildInputs = [ 119 116 openssl 120 - pkgs.zstd 117 + zstd-c 121 118 ]; 122 119 123 120 dependencies = [ ··· 139 136 orjson 140 137 overrides 141 138 posthog 139 + pybase64 142 140 pydantic 143 141 pypika 144 142 pyyaml ··· 182 180 }; 183 181 184 182 pytestFlags = [ 185 - "-x" # these are slow tests, so stop on the first failure 186 183 "-v" 187 184 "-Wignore:DeprecationWarning" 188 185 "-Wignore:PytestCollectionWarning" 189 186 ]; 190 187 188 + # Skip the distributed and integration tests 189 + # See https://github.com/chroma-core/chroma/issues/5315 191 190 preCheck = '' 192 191 (($(ulimit -n) < 1024)) && ulimit -n 1024 193 - export HOME=$(mktemp -d) 192 + export CHROMA_RUST_BINDINGS_TEST_ONLY=1 194 193 ''; 195 194 196 - disabledTests = [ 197 - # Tests are flaky / timing sensitive 198 - "test_fastapi_server_token_authn_allows_when_it_should_allow" 199 - "test_fastapi_server_token_authn_rejects_when_it_should_reject" 200 - 201 - # Issue with event loop 202 - "test_http_client_bw_compatibility" 203 - 204 - # httpx ReadError 205 - "test_not_existing_collection_delete" 195 + enabledTestPaths = [ 196 + "chromadb/test" 197 + ]; 206 198 207 - # Tests launch a server and try to connect to it 208 - # These either have https connection errors or name resolution errors 199 + disabledTests = [ 200 + # Failure in name resolution 209 201 "test_collection_query_with_invalid_collection_throws" 210 202 "test_collection_update_with_invalid_collection_throws" 211 203 "test_default_embedding" 212 - "test_invalid_index_params" 213 - "test_peek" 214 204 "test_persist_index_loading" 215 - "test_query_id_filtering_e2e" 216 - "test_query_id_filtering_medium_dataset" 217 - "test_query_id_filtering_small_dataset" 205 + 206 + # Deadlocks intermittently 207 + "test_app" 208 + 209 + # Depends on specific floating-point precision 210 + "test_base64_conversion_is_identity_f16" 211 + 212 + # No such file or directory: 'openssl' 218 213 "test_ssl_self_signed_without_ssl_verify" 219 214 "test_ssl_self_signed" 220 - 221 - # Apparent race condition with sqlite 222 - # See https://github.com/chroma-core/chroma/issues/4661 223 - "test_multithreaded_get_or_create" 224 215 ]; 225 216 226 217 disabledTestPaths = [ 227 218 # Tests require network access 228 - "bin/rust_python_compat_test.py" 229 - "chromadb/test/configurations/test_collection_configuration.py" 230 - "chromadb/test/ef/test_default_ef.py" 231 - "chromadb/test/ef/test_onnx_mini_lm_l6_v2.py" 232 - "chromadb/test/ef/test_voyageai_ef.py" 233 - "chromadb/test/property/" 219 + "chromadb/test/distributed" 220 + "chromadb/test/ef" 234 221 "chromadb/test/property/test_cross_version_persist.py" 235 - "chromadb/test/stress/" 236 - "chromadb/test/test_api.py" 222 + "chromadb/test/stress" 237 223 238 - # Tests time out (waiting for server) 239 - "chromadb/test/test_cli.py" 240 - 241 - # Cannot find protobuf file while loading test 242 - "chromadb/test/distributed/test_log_failover.py" 224 + # Excessively slow 225 + "chromadb/test/property/test_add.py" 226 + "chromadb/test/property/test_persist.py" 243 227 244 228 # ValueError: An instance of Chroma already exists for ephemeral with different settings 245 229 "chromadb/test/test_chroma.py" 246 - "chromadb/test/ef/test_multimodal_ef.py" 247 230 ]; 248 231 249 232 __darwinAllowLocalNetworking = true;
-14
pkgs/development/python-modules/chromadb/disable-fastapi-fixtures.patch
··· 1 - diff --git a/chromadb/test/conftest.py b/chromadb/test/conftest.py 2 - index efde1c382..163f55c57 100644 3 - --- a/chromadb/test/conftest.py 4 - +++ b/chromadb/test/conftest.py 5 - @@ -678,9 +678,6 @@ def sqlite_persistent(request: pytest.FixtureRequest) -> Generator[System, None, 6 - 7 - def system_fixtures() -> List[Callable[[], Generator[System, None, None]]]: 8 - fixtures = [ 9 - - fastapi, 10 - - async_fastapi, 11 - - fastapi_persistent, 12 - sqlite_fixture, 13 - sqlite_persistent_fixture, 14 - ]
+1 -1
pkgs/top-level/python-packages.nix
··· 2520 2520 2521 2521 chroma-hnswlib = callPackage ../development/python-modules/chroma-hnswlib { }; 2522 2522 2523 - chromadb = callPackage ../development/python-modules/chromadb { }; 2523 + chromadb = callPackage ../development/python-modules/chromadb { zstd-c = pkgs.zstd; }; 2524 2524 2525 2525 chromaprint = callPackage ../development/python-modules/chromaprint { }; 2526 2526