From f1edf1a2d570f96b1dbdbf69e266a42cc48f4f6d Mon Sep 17 00:00:00 2001 From: Derek Homeier Date: Wed, 9 Aug 2023 01:21:34 +0200 Subject: [PATCH 1/2] TST: pin all envs to Numpy < 1.25 to avoid serialiser bug --- tox.ini | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index e7ae8b735..2d6e2fcdb 100644 --- a/tox.ini +++ b/tox.ini @@ -21,6 +21,8 @@ changedir = test: .tmp/{envname} docs: doc deps = + # Pin numpy until #2353/#2428 are resolved + numpy<1.25 pyqt514: PyQt5==5.14.* pyqt515: PyQt5==5.15.* pyqt63: PyQt6==6.3.* @@ -29,8 +31,8 @@ deps = pyside515: PySide2==5.15.* pyside63: PySide6==6.3.* pyside64: PySide6==6.4.* - # Pin numpy-dev until #2353 is resolved - dev: git+https://github.com/numpy/numpy@9b6a7b4f8 + # Pin numpy-dev until #2353/#2428 are resolved + dev: git+https://github.com/numpy/numpy@maintenance/1.24.x dev: git+https://github.com/astropy/astropy lts: astropy==5.0.* lts: matplotlib==3.5.* From f1a9b213813db31072eb0c09ed92243291d05abe Mon Sep 17 00:00:00 2001 From: Derek Homeier Date: Wed, 9 Aug 2023 16:56:29 +0200 Subject: [PATCH 2/2] Unpin Numpy and skip `test_save_aggregate_slice` for > 1.24 --- .github/workflows/ci_workflows.yml | 1 + glue/viewers/image/qt/tests/test_data_viewer.py | 4 ++++ tox.ini | 7 +++---- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci_workflows.yml b/.github/workflows/ci_workflows.yml index ae3ad8d04..d703f27ab 100644 --- a/.github/workflows/ci_workflows.yml +++ b/.github/workflows/ci_workflows.yml @@ -45,6 +45,7 @@ jobs: - linux: py310-test-pyqt63-all - linux: py310-test-pyqt64-all - linux: py311-test-pyqt514 + - linux: py311-test-pyqt515-lts-all # Documentation build - linux: py38-docs-pyqt514 diff --git a/glue/viewers/image/qt/tests/test_data_viewer.py b/glue/viewers/image/qt/tests/test_data_viewer.py index c4a5031c7..9c443f32c 100644 --- a/glue/viewers/image/qt/tests/test_data_viewer.py +++ b/glue/viewers/image/qt/tests/test_data_viewer.py @@ -3,6 +3,7 @@ import os import gc from collections import Counter +from packaging.version import Version import pytest @@ -30,6 +31,8 @@ from ..data_viewer import ImageViewer +NPY_GE_1_25 = Version(np.__version__) >= Version('1.25') + DATA = os.path.join(os.path.dirname(__file__), 'data') @@ -663,6 +666,7 @@ def test_linking_and_enabling(self): assert not self.viewer.layers[2].enabled # image subset assert self.viewer.layers[3].enabled # scatter subset + @pytest.mark.skipif(NPY_GE_1_25, reason='`np.sum` can not be serialized after numpy/numpy#23020') def test_save_aggregate_slice(self, tmpdir): # Regression test to make sure that image viewers that include diff --git a/tox.ini b/tox.ini index 2d6e2fcdb..f1f9b3ad0 100644 --- a/tox.ini +++ b/tox.ini @@ -21,8 +21,6 @@ changedir = test: .tmp/{envname} docs: doc deps = - # Pin numpy until #2353/#2428 are resolved - numpy<1.25 pyqt514: PyQt5==5.14.* pyqt515: PyQt5==5.15.* pyqt63: PyQt6==6.3.* @@ -31,11 +29,12 @@ deps = pyside515: PySide2==5.15.* pyside63: PySide6==6.3.* pyside64: PySide6==6.4.* - # Pin numpy-dev until #2353/#2428 are resolved - dev: git+https://github.com/numpy/numpy@maintenance/1.24.x + dev: git+https://github.com/numpy/numpy dev: git+https://github.com/astropy/astropy lts: astropy==5.0.* lts: matplotlib==3.5.* + # Pin numpy-lts until permanent solution for #2353/#2428 + lts: numpy==1.24.* legacy: numpy==1.17.* legacy: matplotlib==3.2.* legacy: scipy==1.1.*