about summary refs log tree commit diff
diff options
context:
space:
mode:
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2024-05-11 12:01:09 +0000
committerGitHub <noreply@github.com>2024-05-11 12:01:09 +0000
commit12da532fe3d9434f6e2370e8c2be437a2683fd56 (patch)
tree60017ee60b0fc12a2d4a26176c3d2261f7c46939
parent4be4408157159e40a946af47bb2f646efbbc5519 (diff)
parentc0c22d9f5d12487e859e4a6c6a20bcdfedf641eb (diff)
Merge master into staging-next
-rw-r--r--pkgs/build-support/rust/replace-workspace-values.py42
-rw-r--r--pkgs/development/python-modules/diffusers/default.nix26
-rw-r--r--pkgs/development/python-modules/gradio/client.nix10
-rw-r--r--pkgs/development/python-modules/gradio/default.nix4
-rw-r--r--pkgs/development/python-modules/ome-zarr/default.nix21
-rw-r--r--pkgs/development/python-modules/pandas-datareader/default.nix21
-rw-r--r--pkgs/development/web/flyctl/default.nix4
-rw-r--r--pkgs/tools/admin/qovery-cli/default.nix4
8 files changed, 98 insertions, 34 deletions
diff --git a/pkgs/build-support/rust/replace-workspace-values.py b/pkgs/build-support/rust/replace-workspace-values.py
index 2b88f1fa79bbe..003023ff2560a 100644
--- a/pkgs/build-support/rust/replace-workspace-values.py
+++ b/pkgs/build-support/rust/replace-workspace-values.py
@@ -15,6 +15,9 @@ def load_file(path: str) -> dict[str, Any]:
         return tomli.load(f)
 
 
+# This replicates the dependency merging logic from Cargo.
+# See `inner_dependency_inherit_with`:
+# https://github.com/rust-lang/cargo/blob/4de0094ac78743d2c8ff682489e35c8a7cafe8e4/src/cargo/util/toml/mod.rs#L982
 def replace_key(
     workspace_manifest: dict[str, Any], table: dict[str, Any], section: str, key: str
 ) -> bool:
@@ -25,28 +28,37 @@ def replace_key(
     ):
         print("replacing " + key)
 
-        replaced = table[key]
-        del replaced["workspace"]
+        local_dep = table[key]
+        del local_dep["workspace"]
 
-        workspace_copy = workspace_manifest[section][key]
+        workspace_dep = workspace_manifest[section][key]
 
         if section == "dependencies":
-            crate_features = replaced.get("features")
+            if isinstance(workspace_dep, str):
+                workspace_dep = {"version": workspace_dep}
 
-            if type(workspace_copy) is str:
-                replaced["version"] = workspace_copy
-            else:
-                replaced.update(workspace_copy)
+            final: dict[str, Any] = workspace_dep.copy()
 
-                merged_features = (crate_features or []) + (
-                    workspace_copy.get("features") or []
-                )
+            merged_features = local_dep.pop("features", []) + workspace_dep.get("features", [])
+            if merged_features:
+                final["features"] = merged_features
 
-                if len(merged_features) > 0:
-                    # Dictionaries are guaranteed to be ordered (https://stackoverflow.com/a/7961425)
-                    replaced["features"] = list(dict.fromkeys(merged_features))
+            local_default_features = local_dep.pop("default-features", None)
+            workspace_default_features = workspace_dep.get("default-features")
+
+            if not workspace_default_features and local_default_features:
+                final["default-features"] = True
+
+            optional = local_dep.pop("optional", False)
+            if optional:
+                final["optional"] = True
+
+            if local_dep:
+                raise Exception(f"Unhandled keys in inherited dependency {key}: {local_dep}")
+
+            table[key] = final
         elif section == "package":
-            table[key] = replaced = workspace_copy
+            table[key] = workspace_dep
 
         return True
 
diff --git a/pkgs/development/python-modules/diffusers/default.nix b/pkgs/development/python-modules/diffusers/default.nix
index 39464efe47fdb..19fe676abb644 100644
--- a/pkgs/development/python-modules/diffusers/default.nix
+++ b/pkgs/development/python-modules/diffusers/default.nix
@@ -1,8 +1,9 @@
 { lib
 , stdenv
 , buildPythonPackage
-, fetchFromGitHub
 , pythonOlder
+, fetchFromGitHub
+, fetchpatch
 , writeText
 , setuptools
 , wheel
@@ -35,6 +36,7 @@
 , sentencepiece
 , torchsde
 , transformers
+, pythonAtLeast
 }:
 
 buildPythonPackage rec {
@@ -51,12 +53,26 @@ buildPythonPackage rec {
     hash = "sha256-aRnbU3jN40xaCsoMFyRt1XB+hyIYMJP2b/T1yZho90c=";
   };
 
-  nativeBuildInputs = [
+  patches = [
+    # fix python3.12 build
+    (fetchpatch { # https://github.com/huggingface/diffusers/pull/7455
+      name = "001-remove-distutils.patch";
+      url = "https://github.com/huggingface/diffusers/compare/363699044e365ef977a7646b500402fa585e1b6b...3c67864c5acb30413911730b1ed4a9ad47c0a15c.patch";
+      hash = "sha256-Qyvyp1GyTVXN+A+lA1r2hf887ubTtaUknbKd4r46NZQ=";
+    })
+    (fetchpatch { # https://github.com/huggingface/diffusers/pull/7461
+      name = "002-fix-removed-distutils.patch";
+      url = "https://github.com/huggingface/diffusers/commit/efbbbc38e436a1abb1df41a6eccfd6f9f0333f97.patch";
+      hash = "sha256-scdtpX1RYFFEDHcaMb+gDZSsPafkvnIO/wQlpzrQhLA=";
+    })
+  ];
+
+  build-system = [
     setuptools
     wheel
   ];
 
-  propagatedBuildInputs = [
+  dependencies = [
     filelock
     huggingface-hub
     importlib-metadata
@@ -143,6 +159,10 @@ buildPythonPackage rec {
     "test_model_cpu_offload_forward_pass"
     # tries to run ruff which we have intentionally removed from nativeCheckInputs
     "test_is_copy_consistent"
+  ] ++ lib.optionals (pythonAtLeast "3.12") [
+
+    # RuntimeError: Dynamo is not supported on Python 3.12+
+    "test_from_save_pretrained_dynamo"
   ];
 
   meta = with lib; {
diff --git a/pkgs/development/python-modules/gradio/client.nix b/pkgs/development/python-modules/gradio/client.nix
index 96c293d399c55..bbf4d468ce69a 100644
--- a/pkgs/development/python-modules/gradio/client.nix
+++ b/pkgs/development/python-modules/gradio/client.nix
@@ -28,8 +28,8 @@
 
 buildPythonPackage rec {
   pname = "gradio-client";
-  version = "0.14.0";
-  format = "pyproject";
+  version = "0.16.1";
+  pyproject = true;
 
   disabled = pythonOlder "3.8";
 
@@ -37,9 +37,9 @@ buildPythonPackage rec {
   src = fetchFromGitHub {
     owner = "gradio-app";
     repo = "gradio";
-    rev = "refs/tags/@gradio/client@${version}";
+    rev = "refs/tags/gradio_client@${version}";
     sparseCheckout = [ "client/python" ];
-    hash = "sha256-7oC/Z3YUiOFZdv/60q7PkfluV77broRkHgWiY9Vim9Y=";
+    hash = "sha256-SVUm9LrjYG0r3U1yOd3rctxVMYlnAOW+Opqy9c3osnw=";
   };
   prePatch = ''
     cd client/python
@@ -52,7 +52,7 @@ buildPythonPackage rec {
     "websockets"
   ];
 
-  nativeBuildInputs = [
+  build-system = [
     hatchling
     hatch-requirements-txt
     hatch-fancy-pypi-readme
diff --git a/pkgs/development/python-modules/gradio/default.nix b/pkgs/development/python-modules/gradio/default.nix
index 0d4838e372de6..7f3a173cf1aef 100644
--- a/pkgs/development/python-modules/gradio/default.nix
+++ b/pkgs/development/python-modules/gradio/default.nix
@@ -62,7 +62,7 @@
 
 buildPythonPackage rec {
   pname = "gradio";
-  version = "4.27.0";
+  version = "4.29.0";
   format = "pyproject";
 
   disabled = pythonOlder "3.7";
@@ -71,7 +71,7 @@ buildPythonPackage rec {
   # and upstream has stopped tagging releases since 3.41.0
   src = fetchPypi {
     inherit pname version;
-    hash = "sha256-617zutFhS8NGO4+fcALH8aKbk+reGC65DNWKVVKiWEw=";
+    hash = "sha256-17KT0b9kBO+xLgIgxfpwjETDoRM4aTJPlJv7HjkJXjo=";
   };
 
   # fix packaging.ParserSyntaxError, which can't handle comments
diff --git a/pkgs/development/python-modules/ome-zarr/default.nix b/pkgs/development/python-modules/ome-zarr/default.nix
index 0412a0f807189..b87e8f925931f 100644
--- a/pkgs/development/python-modules/ome-zarr/default.nix
+++ b/pkgs/development/python-modules/ome-zarr/default.nix
@@ -48,6 +48,27 @@ buildPythonPackage rec {
     "test_s3_info"
   ];
 
+  pytestFlagsArray = [
+    # Fail with RecursionError
+    # https://github.com/ome/ome-zarr-py/issues/352
+    "--deselect=tests/test_cli.py::TestCli::test_astronaut_download"
+    "--deselect=tests/test_cli.py::TestCli::test_astronaut_info"
+    "--deselect=tests/test_cli.py::TestCli::test_coins_info"
+    "--deselect=tests/test_emitter.py::test_close"
+    "--deselect=tests/test_emitter.py::test_create_wrong_encoding"
+    "--deselect=tests/test_node.py::TestNode::test_image"
+    "--deselect=tests/test_node.py::TestNode::test_label"
+    "--deselect=tests/test_node.py::TestNode::test_labels"
+    "--deselect=tests/test_ome_zarr.py::TestOmeZarr::test_download"
+    "--deselect=tests/test_ome_zarr.py::TestOmeZarr::test_info"
+    "--deselect=tests/test_reader.py::TestReader::test_image"
+    "--deselect=tests/test_reader.py::TestReader::test_label"
+    "--deselect=tests/test_reader.py::TestReader::test_labels"
+    "--deselect=tests/test_starting_points.py::TestStartingPoints::test_label"
+    "--deselect=tests/test_starting_points.py::TestStartingPoints::test_labels"
+    "--deselect=tests/test_starting_points.py::TestStartingPoints::test_top_level"
+  ];
+
   pythonImportsCheck = [
     "ome_zarr"
     "ome_zarr.cli"
diff --git a/pkgs/development/python-modules/pandas-datareader/default.nix b/pkgs/development/python-modules/pandas-datareader/default.nix
index e5222cf7ef83d..de9f285a4a5fd 100644
--- a/pkgs/development/python-modules/pandas-datareader/default.nix
+++ b/pkgs/development/python-modules/pandas-datareader/default.nix
@@ -1,7 +1,9 @@
 { lib
 , buildPythonPackage
+, pythonOlder
+, pythonAtLeast
 , fetchPypi
-, isPy27
+, setuptools
 , pandas
 , lxml
 , requests
@@ -10,20 +12,29 @@
 buildPythonPackage rec {
   pname = "pandas-datareader";
   version = "0.10.0";
-  format = "setuptools";
-  disabled = isPy27;
+  pyproject = true;
+
+  disabled = pythonOlder "3.6" || pythonAtLeast "3.12";
 
   src = fetchPypi {
     inherit pname version;
     sha256 = "9fc3c63d39bc0c10c2683f1c6d503ff625020383e38f6cbe14134826b454d5a6";
   };
 
+  build-system = [
+    setuptools
+  ];
+
+  dependencies = [
+    pandas
+    lxml
+    requests
+  ];
+
   # Tests are trying to load data over the network
   doCheck = false;
   pythonImportsCheck = [ "pandas_datareader" ];
 
-  propagatedBuildInputs = [ pandas lxml requests ];
-
   meta = with lib; {
     description = "Up to date remote data access for pandas, works for multiple versions of pandas";
     homepage = "https://github.com/pydata/pandas-datareader";
diff --git a/pkgs/development/web/flyctl/default.nix b/pkgs/development/web/flyctl/default.nix
index 1b5e2d6f0770d..8ca6eca5268b1 100644
--- a/pkgs/development/web/flyctl/default.nix
+++ b/pkgs/development/web/flyctl/default.nix
@@ -2,13 +2,13 @@
 
 buildGo122Module rec {
   pname = "flyctl";
-  version = "0.2.51";
+  version = "0.2.52";
 
   src = fetchFromGitHub {
     owner = "superfly";
     repo = "flyctl";
     rev = "v${version}";
-    hash = "sha256-UAA8aTT4Q3aimXJTz3P7Hirx4I3UZJb5KdXT59hxeXs=";
+    hash = "sha256-BCnMXyS94tuD+Un1DLqs3mdGi7XrVBoZGJ/XkpACOQI";
   };
 
   vendorHash = "sha256-eTiY65VGFBgGzCOrnp/WbOo9Lbdk4PYwT7CppjsZ4WE=";
diff --git a/pkgs/tools/admin/qovery-cli/default.nix b/pkgs/tools/admin/qovery-cli/default.nix
index 265f7f9de069e..2abc5b8510397 100644
--- a/pkgs/tools/admin/qovery-cli/default.nix
+++ b/pkgs/tools/admin/qovery-cli/default.nix
@@ -9,13 +9,13 @@
 
 buildGoModule rec {
   pname = "qovery-cli";
-  version = "0.92.3";
+  version = "0.92.4";
 
   src = fetchFromGitHub {
     owner = "Qovery";
     repo = "qovery-cli";
     rev = "refs/tags/v${version}";
-    hash = "sha256-Xcl/2vkuOYfZcgICThYD5i1h82E6Leh+hNPzmzISZvQ=";
+    hash = "sha256-A8R1QbUFD4wJyLrTrxE8w9rz0E/vhaPXXAt80UpAOSc=";
   };
 
   vendorHash = "sha256-6gjYnDv4L2AO47uWcp/MySX9i3IDMIWQUvgglxPCvGo=";