public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-fitsio] main: Handle RICE_ONE test case with cfitsio >= 4.6.4
@ 2026-06-16 16:02 Sergio Pascual
  0 siblings, 0 replies; only message in thread
From: Sergio Pascual @ 2026-06-16 16:02 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/python-fitsio
Branch : main
Commit : 77a15baa90aa38db9d7410c82031861fe4aaa9c5
Author : Sergio Pascual <sergiopr@fedoraproject.org>
Date   : 2026-06-16T18:01:44+02:00
Stats  : +31/-0 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/python-fitsio/c/77a15baa90aa38db9d7410c82031861fe4aaa9c5?branch=main

Log:
Handle RICE_ONE test case with cfitsio >= 4.6.4

---
diff --git a/492f938efe60615287b677020c63c10291920648.patch b/492f938efe60615287b677020c63c10291920648.patch
new file mode 100644
index 0000000..9409cdf
--- /dev/null
+++ b/492f938efe60615287b677020c63c10291920648.patch
@@ -0,0 +1,30 @@
+From 492f938efe60615287b677020c63c10291920648 Mon Sep 17 00:00:00 2001
+From: Aurelien Jarno <aurelien@aurel32.net>
+Date: Sun, 3 May 2026 00:57:45 +0200
+Subject: [PATCH] test_compression_diskfile_kwargs: support both RICE_ONE and
+ RICE_1
+
+Starting with CFITSIO 4.6.4, commit 7d854ef29a4c ("Stop writing RICE_ONE
+as an alias for RICE_1."), the ZCMPTYPE header returns RICE_1 instead of
+RICE_ONE, breaking the test_compression_diskfile_kwargs test. Update it
+to accept both values to maintain compatibility across CFITSIO versions.
+---
+ fitsio/tests/test_image_compression_defaults.py | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/fitsio/tests/test_image_compression_defaults.py b/fitsio/tests/test_image_compression_defaults.py
+index c7ee03ed..c927be3e 100644
+--- a/fitsio/tests/test_image_compression_defaults.py
++++ b/fitsio/tests/test_image_compression_defaults.py
+@@ -37,9 +37,10 @@ def test_compression_diskfile_kwargs():
+             ('ZTILE2', 10),
+             ('ZQUANTIZ', 'SUBTRACTIVE_DITHER_2'),
+             ('ZDITHER0', 42),
+-            ('ZCMPTYPE', 'RICE_ONE'),
+         ]:
+             assert hdr[key] == val
++        # Starting with cfitsio 4.6.4, RICE_1 is returned instead of RICE_ONE
++        assert hdr['ZCMPTYPE'] in ('RICE_ONE', 'RICE_1')
+ 
+ 
+ def test_compression_efns():

diff --git a/python-fitsio.spec b/python-fitsio.spec
index 2b6a813..b8a6041 100644
--- a/python-fitsio.spec
+++ b/python-fitsio.spec
@@ -10,6 +10,7 @@ Summary:        %{sum}
 License:        GPL-2.0-only
 URL:            https://github.com/esheldon/fitsio
 Source0:        %{pypi_source}
+Patch: https://github.com/esheldon/fitsio/commit/492f938efe60615287b677020c63c10291920648.patch
 
 # General
 BuildRequires:  cfitsio-devel

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-06-16 16:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-16 16:02 [rpms/python-fitsio] main: Handle RICE_ONE test case with cfitsio >= 4.6.4 Sergio Pascual

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox