From d3cc22fd5d0e231c60181dafe98651b587439cf5 Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Mon, 17 Jul 2023 00:38:51 +0900 Subject: [PATCH] add upstream bug reference --- python-pint.spec | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/python-pint.spec b/python-pint.spec index 98f4097..63edfbe 100644 --- a/python-pint.spec +++ b/python-pint.spec @@ -63,6 +63,7 @@ Documentation for the pint module %setup -q -n %{pypi_name}-%{version} # numpy 1.24.x removes np.float np.alen and so on +# These are already fixed upstream grep -rl "dtype=np\.float" . | xargs sed -i -e 's|dtype=np\.float|dtype=float|' sed -i pint/testsuite/test_numpy.py \ -e 's|dtype=float32|dtype=np.float32|' \ @@ -70,13 +71,11 @@ sed -i pint/testsuite/test_numpy.py \ -e 's|np\.alen|len|' \ %{nil} -# Passing format_spec = 'n' to Fraction causes TypeError with python3.11 and below, -# now causes ValueError. Workaround for this -# https://github.com/python/cpython/commit/3e09f3152e518cdc8779b52943b86812114ce071#diff-f561eb7eb97f832b2698837f52c2c2cf23bdb0b31c69cf1f6aaa560280993316R417 -# FIXME this one must be reported upstream +# Workaround for https://github.com/hgrecco/pint/issues/1818 sed -i pint/testsuite/__init__.py -e '115s|except TypeError:|except (TypeError, ValueError):|' # python 3.12 removes deprecated unittest.assertEquals +# This is already fixed upstream sed -i pint/testsuite/test_contexts.py -e 's|self.assertEquals|self.assertEqual|' # drop numpy version requirement