From 2e6742c25e9716ae35da7ecf0a96ba68db71626b Mon Sep 17 00:00:00 2001 From: Shantanu <12621235+hauntsaninja@users.noreply.github.com> Date: Mon, 22 Jul 2024 21:00:51 -0700 Subject: [PATCH 1/3] Unpin numpy See also https://iscinumpy.dev/post/bound-version-constraints/ The workaround here is unnecessary (discussed in https://github.com/google/magika/issues/43). Since numpy declares python_requires, pip's resolver will automatically discard newer numpy solutions when installing on Python 3.8 --- python/pyproject.toml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/python/pyproject.toml b/python/pyproject.toml index 6076085e..b01c969c 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -11,10 +11,7 @@ packages = [{include = "magika"}] python = "^3.8,<3.13" click = "^8.1.3" onnxruntime = "^1.17.0" -numpy = [ - {version = "^1.24", python = ">=3.8,<3.9"}, - {version = "^1.26", python = ">=3.9,<3.13"} -] +numpy = ">=1.24" python-dotenv = "^1.0.1" [tool.poetry.group.dev.dependencies] From dd5ea59af5f48e2c0c94ebfb083528fdf5fae124 Mon Sep 17 00:00:00 2001 From: hauntsaninja Date: Thu, 24 Oct 2024 18:48:49 -0700 Subject: [PATCH 2/3] . --- python/pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/pyproject.toml b/python/pyproject.toml index 742cb812..066a7f44 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -35,8 +35,8 @@ dynamic = ["version"] dependencies = [ "click>=8.1.7", "onnxruntime>=1.19.0", - "numpy>=1.24", - "numpy>=1.26; python_version >= '3.12'", + "numpy>=1.24; python_version < '3.12", + "numpy>=1.26; python_version >= '3.12' and python_version < '3.13'", "numpy>=2.1.0; python_version >= '3.13'", "python-dotenv>=1.0.1", ] From ebac72a3798de2608ef518edc1e21e71f2a2d0ab Mon Sep 17 00:00:00 2001 From: Yanick Fratantonio Date: Fri, 1 Nov 2024 17:10:44 +0100 Subject: [PATCH 3/3] Fix pyproject.toml, add missing ' --- python/pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/pyproject.toml b/python/pyproject.toml index cf9f6245..bc7b58b0 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -35,7 +35,7 @@ dynamic = ["version"] dependencies = [ "click>=8.1.7", "onnxruntime>=1.19.0", - "numpy>=1.24; python_version < '3.12", + "numpy>=1.24; python_version < '3.12'", "numpy>=1.26; python_version >= '3.12' and python_version < '3.13'", "numpy>=2.1.0; python_version >= '3.13'", "python-dotenv>=1.0.1",