From 80d61407f35f55e95c990748ac35c057f6080dfc87a220c1c011e67ad7685bdf Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Fri, 6 Aug 2021 06:28:57 +0000 Subject: [PATCH] Accepting request 910375 from home:bnavigator:astropy - Add sherpa-pr1227-astropy43.patch in order to fix test failure gh#sherpa/sherpa#1227 OBS-URL: https://build.opensuse.org/request/show/910375 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-sherpa?expand=0&rev=19 --- python-sherpa.changes | 6 ++++++ python-sherpa.spec | 2 ++ sherpa-pr1227-astropy43.patch | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 40 insertions(+) create mode 100644 sherpa-pr1227-astropy43.patch diff --git a/python-sherpa.changes b/python-sherpa.changes index ef0b901..2baf529 100644 --- a/python-sherpa.changes +++ b/python-sherpa.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Aug 5 19:36:45 UTC 2021 - Ben Greiner + +- Add sherpa-pr1227-astropy43.patch in order to fix test failure + gh#sherpa/sherpa#1227 + ------------------------------------------------------------------- Fri Jun 11 09:52:54 UTC 2021 - Guillaume GARDET diff --git a/python-sherpa.spec b/python-sherpa.spec index cc68c90..e668c3c 100644 --- a/python-sherpa.spec +++ b/python-sherpa.spec @@ -27,6 +27,8 @@ License: GPL-3.0-only URL: https://github.com/sherpa/sherpa/ Source: https://github.com/sherpa/sherpa/archive/%{version}.tar.gz#/sherpa-%{version}.tar.gz Patch1: reproducible.patch +# PATCH-FIX-UPSTREAM sherpa-pr1227-astropy43.patch -- gh#sherpa/sherpa#1227 +Patch2: https://github.com/sherpa/sherpa/pull/1227.patch#/sherpa-pr1227-astropy43.patch BuildRequires: %{python_module devel} BuildRequires: %{python_module numpy-devel} BuildRequires: %{python_module setuptools} diff --git a/sherpa-pr1227-astropy43.patch b/sherpa-pr1227-astropy43.patch new file mode 100644 index 0000000..e4f971a --- /dev/null +++ b/sherpa-pr1227-astropy43.patch @@ -0,0 +1,32 @@ +From 630574022f538c86265ba01c283b8ebc39ce41a0 Mon Sep 17 00:00:00 2001 +From: Douglas Burke +Date: Mon, 26 Jul 2021 16:10:25 -0400 +Subject: [PATCH] Support AstroPy 4.3 for tests + +The FITS checking meant that a test that created a test FITS file +was no-longer valid for AstroPy, so tweak the output to appease +both AstroPy 4.3 and fverify (at least for the header lines, it +still claims the fil character is wrong but this is less important). +--- + sherpa/astro/io/tests/test_io.py | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/sherpa/astro/io/tests/test_io.py b/sherpa/astro/io/tests/test_io.py +index daa52d096d..a2bf6fdc93 100644 +--- a/sherpa/astro/io/tests/test_io.py ++++ b/sherpa/astro/io/tests/test_io.py +@@ -150,8 +150,12 @@ def fake_rmf(outfile): + def hdr(key, value): + if isinstance(value, str): + value = "'{}'".format(value) +- elif isinstance(value, bool): +- value = 'T' if value else 'F' ++ else: ++ if isinstance(value, bool): ++ value = 'T' if value else 'F' ++ ++ # add spacing to make FVERIFY happy ++ value = f"{str(value):>20s}" + + out = "{:8s}= {}".format(key, value) + return out.ljust(80)