Loading pkgs/development/python-modules/astropy/default.nix +4 −1 Original line number Diff line number Diff line { lib, fetchPypi, fetchpatch, buildPythonPackage, pythonOlder, Loading Loading @@ -63,6 +62,10 @@ buildPythonPackage rec { hash = "sha256-OS/utEOyQ3zUwuBkGmXg8VunkeFI6bHl7X3n38s45GA="; }; patches = [ ./test_z_at_value_numpyvectorize.patch ]; env = lib.optionalAttrs stdenv.cc.isClang { NIX_CFLAGS_COMPILE = "-Wno-error=unused-command-line-argument"; }; Loading pkgs/development/python-modules/astropy/test_z_at_value_numpyvectorize.patch 0 → 100644 +33 −0 Original line number Diff line number Diff line From 9a7f821351f0870608b2fa3e1be31bda70707913 Mon Sep 17 00:00:00 2001 From: "P. L. Lim" <2090236+pllim@users.noreply.github.com> Date: Fri, 2 May 2025 13:49:06 -0400 Subject: [PATCH] TST: xfail test_z_at_value_numpyvectorize for numpy 2.3.dev and later until we can fix the underlying issue Originally this is https://github.com/astropy/astropy/commit/9fce0d46c5e1807d7e1030c3cb0b1a9c0a359dd9 but the path to the file has changed since the release currently in nixpkgs. --- astropy/cosmology/_src/tests/funcs/test_funcs.py | 4 ++++ 1 file changed, 4 insertions(+) --- a/astropy/cosmology/funcs/tests/test_funcs.py +++ b/astropy/cosmology/funcs/tests/test_funcs.py @@ -31,6 +31,7 @@ ) from astropy.cosmology._src.funcs.optimize import _z_at_scalar_value from astropy.units import allclose +from astropy.utils.compat import NUMPY_LT_2_3 from astropy.utils.compat.optional_deps import HAS_SCIPY from astropy.utils.exceptions import AstropyUserWarning @@ -173,6 +174,9 @@ def test_scalar_input_to_output(self): @pytest.mark.skipif(not HAS_SCIPY, reason="test requires scipy") +@pytest.mark.xfail( + not NUMPY_LT_2_3, reason="TODO fix: https://github.com/astropy/astropy/issues/18045" +) def test_z_at_value_numpyvectorize(): """Test that numpy vectorize fails on Quantities. Loading
pkgs/development/python-modules/astropy/default.nix +4 −1 Original line number Diff line number Diff line { lib, fetchPypi, fetchpatch, buildPythonPackage, pythonOlder, Loading Loading @@ -63,6 +62,10 @@ buildPythonPackage rec { hash = "sha256-OS/utEOyQ3zUwuBkGmXg8VunkeFI6bHl7X3n38s45GA="; }; patches = [ ./test_z_at_value_numpyvectorize.patch ]; env = lib.optionalAttrs stdenv.cc.isClang { NIX_CFLAGS_COMPILE = "-Wno-error=unused-command-line-argument"; }; Loading
pkgs/development/python-modules/astropy/test_z_at_value_numpyvectorize.patch 0 → 100644 +33 −0 Original line number Diff line number Diff line From 9a7f821351f0870608b2fa3e1be31bda70707913 Mon Sep 17 00:00:00 2001 From: "P. L. Lim" <2090236+pllim@users.noreply.github.com> Date: Fri, 2 May 2025 13:49:06 -0400 Subject: [PATCH] TST: xfail test_z_at_value_numpyvectorize for numpy 2.3.dev and later until we can fix the underlying issue Originally this is https://github.com/astropy/astropy/commit/9fce0d46c5e1807d7e1030c3cb0b1a9c0a359dd9 but the path to the file has changed since the release currently in nixpkgs. --- astropy/cosmology/_src/tests/funcs/test_funcs.py | 4 ++++ 1 file changed, 4 insertions(+) --- a/astropy/cosmology/funcs/tests/test_funcs.py +++ b/astropy/cosmology/funcs/tests/test_funcs.py @@ -31,6 +31,7 @@ ) from astropy.cosmology._src.funcs.optimize import _z_at_scalar_value from astropy.units import allclose +from astropy.utils.compat import NUMPY_LT_2_3 from astropy.utils.compat.optional_deps import HAS_SCIPY from astropy.utils.exceptions import AstropyUserWarning @@ -173,6 +174,9 @@ def test_scalar_input_to_output(self): @pytest.mark.skipif(not HAS_SCIPY, reason="test requires scipy") +@pytest.mark.xfail( + not NUMPY_LT_2_3, reason="TODO fix: https://github.com/astropy/astropy/issues/18045" +) def test_z_at_value_numpyvectorize(): """Test that numpy vectorize fails on Quantities.