Description: fix test failures with python3.14.
 Adapt to functools.partial becoming a method descriptor in Python 3.14
 .
 There is a second part for the patch, making adjustments to the
 argument parser invocation, following changes to argparse with the new
 interpreter version.
Author: Ben Beasley
Origin: upstream, https://github.com/nipy/nibabel/pull/1391
Bug: https://github.com/nipy/nibabel/issues/1390
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1121007
Reviewed-by: Étienne Mollier <emollier@debian.org>
Last-Update: 2025-12-04
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- nibabel.orig/nibabel/tests/test_deprecator.py
+++ nibabel/nibabel/tests/test_deprecator.py
@@ -161,7 +161,7 @@
 class TestDeprecatorMaker:
     """Test deprecator class creation with custom warnings and errors"""
 
-    dep_maker = partial(Deprecator, cmp_func)
+    dep_maker = staticmethod(partial(Deprecator, cmp_func))
 
     def test_deprecator_maker(self):
         dec = self.dep_maker(warn_class=UserWarning)
--- nibabel.orig/nibabel/cmdline/roi.py
+++ nibabel/nibabel/cmdline/roi.py
@@ -44,6 +44,7 @@
     if args is None:
         args = sys.argv[1:]
     parser = argparse.ArgumentParser(
+        prog=os.path.basename(sys.argv[0]),
         description='Crop images to a region of interest',
         epilog='If a start or stop value is omitted, the start or end of the axis is assumed.',
     )
