From 306b33ccc0d8087636e3fd89bafdb0262229355c Mon Sep 17 00:00:00 2001 From: John Kerl Date: Thu, 28 Sep 2023 19:16:21 -0400 Subject: [PATCH] [python] Revert to numba 0.57 until it's available in Conda --- apis/python/setup.py | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/apis/python/setup.py b/apis/python/setup.py index 752f6114ab..62919dd202 100644 --- a/apis/python/setup.py +++ b/apis/python/setup.py @@ -271,13 +271,21 @@ def run(self): "anndata < 0.9; python_version<'3.8'", "anndata; python_version>='3.8'", "attrs>=22.2", - "numba~=0.58.0; python_version>='3.8'", - # Older numba version needed for Python3.7. - # This older numba version was also incompatble with newer numpy - # versions, and the old pip solver (<=2020) needed us to explicate - # that constraint here (issue #1051). - "numba==0.56.4; python_version<'3.8'", - "numpy>=1.18,<1.24; python_version<'3.8'", + # Pinning numba & its particular numpy constraints: + # The old pip solver (<=2020) doesn't deal with the transitive + # requirements (scanpy -> numba -> numpy) properly resulting in broken + # installation of incompatible numpy>=1.24. Issue #1051 + # These pins can be removed either when there's a new numba release + # with less-particular numpy version constraints, or if we decide we no + # longer need to support the old pip solver (default on ubuntu 20.04). + # + # Also: numba doesn't support Python 3.11 until 0.57.0rc1. + # It' not preferable to pin to an RC dependency, so we only do this + # when we must, which is for 3.11. + "numba==0.56.4; python_version<'3.11'", + "numba==0.57; python_version=='3.11'", + "numpy>=1.18,<1.24; python_version<'3.11'", + "numpy>=1.18,<1.25; python_version=='3.11'", "pandas", "pyarrow>=9.0.0", "scanpy>=1.9.2",