[From nobody Wed Sep  9 13:21:07 2026
Received: (at submit) by bugs.debian.org; 6 Sep 2026 18:10:23 +0000
X-Spam-Checker-Version: SpamAssassin 4.0.1-bugs.debian.org_2005_01_02
 (2024-03-25) on buxtehude.debian.org
X-Spam-Level: 
X-Spam-Status: No, score=-118.2 required=4.0 tests=ALL_TRUSTED,BAYES_00,
 BODY_INCLUDES_PACKAGE,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,
 DKIM_VALID_AU,DKIM_VALID_EF,FROMDEVELOPER,HAS_PACKAGE,SPF_HELO_NONE,
 SPF_PASS,USER_IN_DKIM_WELCOMELIST autolearn=ham autolearn_force=no
 version=4.0.1-bugs.debian.org_2005_01_02
X-Spam-Bayes: score:0.0000 Tokens: new, 46; hammy, 150; neutral, 118; spammy,
 0. spammytokens:
 hammytokens:0.000-+--Hx-spam-relays-external:sk:stravin,
 0.000-+--H*RT:sk:stravin, 0.000-+--Hx-spam-relays-external:311,
 0.000-+--H*RT:311, 0.000-+--H*RT:108
Return-path: &lt;maxy@debian.org&gt;
Received: from stravinsky.debian.org ([2001:41b8:202:deb::311:108]:53762)
 by buxtehude.debian.org with esmtps
 (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256)
 (Exim 4.96) (envelope-from &lt;maxy@debian.org&gt;) id 1x3HJv-003pMC-0B
 for submit@bugs.debian.org; Sun, 06 Sep 2026 18:10:23 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debian.org; 
 s=smtpauto.stravinsky;
 h=X-Debian-User:Content-Type:MIME-Version:Message-ID:
 Subject:To:From:Date:Reply-To:Cc:Content-Transfer-Encoding:Content-ID:
 Content-Description:In-Reply-To:References;
 bh=sKnDhC5pwcLdvfyjYCGcz/JJtesL40LXYiu6EtiiwEc=; b=vH8nyuzwtKtZg/fI2hg1tK840H
 hbE/cz+BukMQnAdjmZ346KhEi2QOLYqByVk5snDNFkAwwydCfsKRiE2iNOVD50DtFrWeJkoE1cMXT
 RlMaCjh7eBhxKoVYdwRlm32xGe6PaIiiedGKxMsOGOrEXV68Xk3kEck/+el3BmgMBWhJEPBeGQiXO
 G4oiNPrg4HxxwJmtoVUXmJvSR0EzzC70knTGp16U98IOiT2MQzhL9X4Dv/5HMt8c60gYhw93gCDYM
 qtu4z89lrh7Pxcl1gGsZKhiTFb8ox7xbqGC/3aRwywOdh0JSbYPPdvrLs4fnYL1jEyX6bPZ2QAECO
 ZWjQoYJg==;
Received: from authenticated-user by stravinsky.debian.org with esmtpsa
 (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256)
 (Exim 4.96) (envelope-from &lt;maxy@debian.org&gt;) id 1x3HJr-000uyw-2I
 for submit@bugs.debian.org; Sun, 06 Sep 2026 18:10:21 +0000
Date: Sun, 6 Sep 2026 20:10:18 +0200
From: Maximiliano Curia &lt;maxy@debian.org&gt;
To: submit@bugs.debian.org
Subject: nibabel: FTBFS against python 3.15rc2
Message-ID: &lt;ap2sio7H_NFHTIlh@hecuba.gnuservers.com.ar&gt;
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary=&quot;gHQ6PI75SPPoeP8k&quot;
Content-Disposition: inline
X-Debian-User: maxy
Delivered-To: submit@bugs.debian.org

--gHQ6PI75SPPoeP8k
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Disposition: inline

Package: src:nibabel
Version: 5.4.2-4
User: debian-python@lists.debian.org
Usertags: python3.15
Tags: patch, ftbfs, forky, sid
Severity: important

Hi!

While rebuilding the python related packages against the Python 3.15rc2
version we found that nibabel fails to build from source [1].

The failure happens because test_DeterministicGzipFile and
test_DeterministicGzipFile_fileobj fail due to a discrepancy in the
default compression levels of gzip files, python 3.15 uses now
compresslevel=6

To fix this, I've made a patch to use None as the default compresslevel,
and let Python set it, instead of forcing it to 9.

I applied the fix in the sandbox [2] to be able to build the packages
that depend on nibabel, please consider applying the patch to support
the upcoming 3.15 version.

Setting the severity to important for now. Once Python 3.15 is released,
it will be added to python3-defaults and this bug will become release
critical.

Happy hacking,

[1]: https://debusine.debian.net/debian/r-python-python3.15/artifact/4478755/
[2]: https://debusine.debian.net/debian/r-python-python3.15/

-- 
&quot;Can you imagine what I would do if I could do all I can?&quot; -- Sun Tzu
Saludos /\/\ /\ &gt;&lt; `/

--gHQ6PI75SPPoeP8k
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment; filename=python3.15.patch

Description: Fix test failures with Python 3.15
 In Python 3.15, gzip.GzipFile changed its default compresslevel from 9 to 6.
 Allow DeterministicGzipFile to inherit the default compresslevel from GzipFile
 when unspecified instead of hardcoding 9.
Author: Maximiliano Curia &lt;maxy@debian.org&gt;
Forwarded: no
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
Index: nibabel/nibabel/_compression.py
===================================================================
--- nibabel.orig/nibabel/_compression.py
+++ nibabel/nibabel/_compression.py
@@ -82,7 +82,7 @@ class DeterministicGzipFile(gzip.GzipFil
         self,
         filename: str | None = None,
         mode: Mode | None = None,
-        compresslevel: int = 9,
+        compresslevel: int | None = None,
         fileobj: io.FileIO | None = None,
         mtime: int = 0,
     ):
@@ -99,19 +99,22 @@ class DeterministicGzipFile(gzip.GzipFil
                 raise TypeError('Must define either fileobj or filename')
             # Cast because GzipFile.myfileobj has type io.FileIO while open returns ty.IO
             fileobj = self.myfileobj = ty.cast('io.FileIO', open(filename, modestr))
+        kwargs = {}
+        if compresslevel is not None:
+            kwargs['compresslevel'] = compresslevel
         super().__init__(
             filename='',
             mode=modestr,
-            compresslevel=compresslevel,
             fileobj=fileobj,
             mtime=mtime,
+            **kwargs,
         )
 
 
 def gzip_open(
     filename: str,
     mode: Mode = 'rb',
-    compresslevel: int = 9,
+    compresslevel: int | None = None,
     mtime: int = 0,
     keep_open: bool = False,
 ) -&gt; gzip.GzipFile:

--gHQ6PI75SPPoeP8k--
]