Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-netpbmfile for 
openSUSE:Factory checked in at 2025-05-30 14:37:36
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-netpbmfile (Old)
 and      /work/SRC/openSUSE:Factory/.python-netpbmfile.new.25440 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-netpbmfile"

Fri May 30 14:37:36 2025 rev:6 rq:1281101 version:2025.5.8

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-netpbmfile/python-netpbmfile.changes      
2024-11-14 16:10:51.112164531 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-netpbmfile.new.25440/python-netpbmfile.changes
   2025-05-30 17:26:18.137675425 +0200
@@ -1,0 +2,8 @@
+Thu May 29 09:49:07 UTC 2025 - Dirk Müller <dmuel...@suse.com>
+
+- update to 2025.5.8:
+  * Remove doctest command line option.
+  * Improve type hints.
+  * Drop support for Python 3.9, support Python 3.13.
+
+-------------------------------------------------------------------

Old:
----
  netpbmfile-2024.5.24.tar.gz

New:
----
  netpbmfile-2025.5.8.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-netpbmfile.spec ++++++
--- /var/tmp/diff_new_pack.E7dBh1/_old  2025-05-30 17:26:18.629695863 +0200
+++ /var/tmp/diff_new_pack.E7dBh1/_new  2025-05-30 17:26:18.629695863 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-netpbmfile
 #
-# Copyright (c) 2024 SUSE LLC
+# Copyright (c) 2025 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,7 @@
 
 %{?sle15_python_module_pythons}
 Name:           python-netpbmfile
-Version:        2024.5.24
+Version:        2025.5.8
 Release:        0
 Summary:        Read and write image files in the Netpbm format
 License:        BSD-3-Clause

++++++ netpbmfile-2024.5.24.tar.gz -> netpbmfile-2025.5.8.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/netpbmfile-2024.5.24/.gitignore 
new/netpbmfile-2025.5.8/.gitignore
--- old/netpbmfile-2024.5.24/.gitignore 2024-05-25 18:08:59.000000000 +0200
+++ new/netpbmfile-2025.5.8/.gitignore  2025-05-09 06:44:40.000000000 +0200
@@ -32,7 +32,7 @@
 MANIFEST
 setup.cfg
 PKG-INFO
-
+mypy.ini
 # PyInstaller
 #  Usually these files are written by a python script from a template
 #  before PyInstaller builds the exe, so as to inject date/other infos into it.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/netpbmfile-2024.5.24/CHANGES.rst 
new/netpbmfile-2025.5.8/CHANGES.rst
--- old/netpbmfile-2024.5.24/CHANGES.rst        1970-01-01 01:00:00.000000000 
+0100
+++ new/netpbmfile-2025.5.8/CHANGES.rst 2025-05-09 06:44:40.000000000 +0200
@@ -0,0 +1,100 @@
+Revisions
+---------
+
+2025.5.8
+
+- Remove doctest command line option.
+
+2025.1.1
+
+- Improve type hints.
+- Drop support for Python 3.9, support Python 3.13.
+
+2024.5.24
+
+- Fix docstring examples not correctly rendered on GitHub.
+
+2024.4.24
+
+- Support NumPy 2.
+
+2023.8.30
+
+- Fix linting issues.
+- Add py.typed marker.
+
+2023.6.15
+
+- Drop support for Python 3.8 and numpy < 1.21 (NEP29).
+- Improve type hints.
+
+2023.1.1
+
+- Several breaking changes:
+- Rename magicnum to magicnumber (breaking).
+- Rename tupltypes to tupltype (breaking).
+- Change magicnumber and header properties to str (breaking).
+- Replace pam parameter with magicnumber (breaking).
+- Move byteorder parameter from NetpbmFile.asarray to NetpbmFile (breaking).
+- Fix shape and axes properties for multi-image files.
+- Add maxval and tupltype parameters to NetpbmFile.fromdata and imwrite.
+- Add option to write comment to PNM and PAM files.
+- Support writing PGX and text formats.
+- Add Google style docstrings.
+- Add unittests.
+
+2022.10.25
+
+- Read multi-image files.
+- Fix reading ASCII formats with trailing comments.
+- Fix writing maxval=1, depth=1 binary images.
+- Use tifffile.imshow for multi-image arrays if installed.
+- Change tupltypes to bytes according to specification (breaking).
+
+2022.9.12
+
+- Allow space after token value in PAM.
+- Update metadata.
+
+2022.2.2
+
+- Add type hints.
+- Support reading PF4 RGBA FloatMaps.
+- Drop support for Python 3.7 and numpy < 1.19 (NEP29).
+
+2021.6.6
+
+- Fix unclosed file warnings.
+- Support reading PGX JPEG2000 reference images.
+
+2020.10.18
+
+- Disallow comments after last value in PNM headers.
+
+2020.9.18
+
+- Drop support for Python 3.6 (NEP 29).
+- Support os.PathLike file names.
+
+2020.1.1
+
+- Fix reading tightly packed P1 format and ASCII data with inline comments.
+- Drop support for Python 2.7 and 3.5.
+- Update copyright.
+
+2018.10.18
+
+- Move netpbmfile.py into netpbmfile package.
+
+2018.02.18
+
+- Support reading Portable FloatMaps.
+- Style fixes.
+
+2016.02.24
+
+- Use fromdata classmethod to initialize from data.
+- Support with statement.
+- Scale RGB images to maxval for display.
+- Make keyword arguments explicit.
+- Support numpy 1.10.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/netpbmfile-2024.5.24/LICENSE 
new/netpbmfile-2025.5.8/LICENSE
--- old/netpbmfile-2024.5.24/LICENSE    2024-05-25 18:08:59.000000000 +0200
+++ new/netpbmfile-2025.5.8/LICENSE     2025-05-09 06:44:40.000000000 +0200
@@ -1,6 +1,6 @@
-BSD 3-Clause License
+BSD-3-Clause license
 
-Copyright (c) 2011-2024, Christoph Gohlke
+Copyright (c) 2011-2025, Christoph Gohlke
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/netpbmfile-2024.5.24/MANIFEST.in 
new/netpbmfile-2025.5.8/MANIFEST.in
--- old/netpbmfile-2024.5.24/MANIFEST.in        2024-05-25 18:08:59.000000000 
+0200
+++ new/netpbmfile-2025.5.8/MANIFEST.in 2025-05-09 06:44:40.000000000 +0200
@@ -1,5 +1,7 @@
 include LICENSE
 include README.rst
+include CHANGES.rst
+include pyproject.toml
 
 include netpbmfile/py.typed
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/netpbmfile-2024.5.24/README.rst 
new/netpbmfile-2025.5.8/README.rst
--- old/netpbmfile-2024.5.24/README.rst 2024-05-25 18:08:59.000000000 +0200
+++ new/netpbmfile-2025.5.8/README.rst  2025-05-09 06:44:40.000000000 +0200
@@ -23,8 +23,8 @@
 No gamma correction or scaling is performed.
 
 :Author: `Christoph Gohlke <https://www.cgohlke.com>`_
-:License: BSD 3-Clause
-:Version: 2024.5.24
+:License: BSD-3-Clause
+:Version: 2025.5.8
 
 Quickstart
 ----------
@@ -41,16 +41,24 @@
 
 Requirements
 ------------
-
 This revision was tested with the following requirements and dependencies
 (other versions may work):
 
-- `CPython <https://www.python.org>`_ 3.9.13, 3.10.11, 3.11.9, 3.12.3
-- `NumPy <https://pypi.org/project/numpy/>`_ 1.26.4
+- `CPython <https://www.python.org>`_ 3.10.11, 3.11.9, 3.12.9, 3.13.2 64-bit
+- `NumPy <https://pypi.org/project/numpy/>`_ 2.2.5
 
 Revisions
 ---------
 
+2025.5.8
+
+- Remove doctest command line option.
+
+2025.1.1
+
+- Improve type hints.
+- Drop support for Python 3.9, support Python 3.13.
+
 2024.5.24
 
 - Fix docstring examples not correctly rendered on GitHub.
@@ -97,6 +105,7 @@
 
 .. code-block:: python
 
+    >>> import numpy
     >>> data = numpy.array([[0, 1], [65534, 65535]], dtype=numpy.uint16)
     >>> imwrite('_tmp.pgm', data)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/netpbmfile-2024.5.24/netpbmfile/__init__.py 
new/netpbmfile-2025.5.8/netpbmfile/__init__.py
--- old/netpbmfile-2024.5.24/netpbmfile/__init__.py     2024-05-25 
18:08:59.000000000 +0200
+++ new/netpbmfile-2025.5.8/netpbmfile/__init__.py      2025-05-09 
06:44:40.000000000 +0200
@@ -1,4 +1,17 @@
 # netpbmfile/__init__.py
 
-from .netpbmfile import __doc__, __all__, __version__
 from .netpbmfile import *
+from .netpbmfile import __all__, __doc__, __version__
+
+
+def _set_module() -> None:
+    """Set __module__ attribute for all public objects."""
+    globs = globals()
+    module = globs['__name__']
+    for item in __all__:
+        obj = globs[item]
+        if hasattr(obj, '__module__'):
+            obj.__module__ = module
+
+
+_set_module()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/netpbmfile-2024.5.24/netpbmfile/netpbmfile.py 
new/netpbmfile-2025.5.8/netpbmfile/netpbmfile.py
--- old/netpbmfile-2024.5.24/netpbmfile/netpbmfile.py   2024-05-25 
18:08:59.000000000 +0200
+++ new/netpbmfile-2025.5.8/netpbmfile/netpbmfile.py    2025-05-09 
06:44:40.000000000 +0200
@@ -1,6 +1,6 @@
 # netpbmfile.py
 
-# Copyright (c) 2011-2024, Christoph Gohlke
+# Copyright (c) 2011-2025, Christoph Gohlke
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -50,8 +50,8 @@
 No gamma correction or scaling is performed.
 
 :Author: `Christoph Gohlke <https://www.cgohlke.com>`_
-:License: BSD 3-Clause
-:Version: 2024.5.24
+:License: BSD-3-Clause
+:Version: 2025.5.8
 
 Quickstart
 ----------
@@ -68,16 +68,24 @@
 
 Requirements
 ------------
-
 This revision was tested with the following requirements and dependencies
 (other versions may work):
 
-- `CPython <https://www.python.org>`_ 3.9.13, 3.10.11, 3.11.9, 3.12.3
-- `NumPy <https://pypi.org/project/numpy/>`_ 1.26.4
+- `CPython <https://www.python.org>`_ 3.10.11, 3.11.9, 3.12.9, 3.13.2 64-bit
+- `NumPy <https://pypi.org/project/numpy/>`_ 2.2.5
 
 Revisions
 ---------
 
+2025.5.8
+
+- Remove doctest command line option.
+
+2025.1.1
+
+- Improve type hints.
+- Drop support for Python 3.9, support Python 3.13.
+
 2024.5.24
 
 - Fix docstring examples not correctly rendered on GitHub.
@@ -122,6 +130,7 @@
 
 Write a numpy array to a Netpbm file in grayscale binary format:
 
+>>> import numpy
 >>> data = numpy.array([[0, 1], [65534, 65535]], dtype=numpy.uint16)
 >>> imwrite('_tmp.pgm', data)
 
@@ -155,10 +164,11 @@
 
 from __future__ import annotations
 
-__version__ = '2024.5.24'
+__version__ = '2025.5.8'
 
-__all__ = ['imread', 'imwrite', 'imsave', 'NetpbmFile']
+__all__ = ['__version__', 'imread', 'imwrite', 'imsave', 'NetpbmFile']
 
+import logging
 import math
 import os
 import re
@@ -396,11 +406,11 @@
         if byteorder is not None:
             self.byteorder = byteorder
 
-        if self.magicnumber in 'P1 P4':
+        if self.magicnumber in {'P1', 'P4'}:
             dtype = 'bool_'
-        elif self.magicnumber in 'PF4 Pf':
+        elif self.magicnumber in {'PF', 'PF4', 'Pf'}:
             dtype = self.byteorder + 'f4'
-        elif self.magicnumber in 'PG':
+        elif self.magicnumber in {'PG'}:
             dtype = self.byteorder + self.dtype.char
         elif self.maxval < 256:
             dtype = 'u1'
@@ -409,11 +419,11 @@
         elif self.maxval < 2**32:
             dtype = self.byteorder + 'u4'
         else:
-            raise ValueError(f'maxval {self.maxval} out of range')
+            raise ValueError(f'{self.maxval=} out of range')
 
         self.dtype = numpy.dtype(dtype)
 
-        if self.magicnumber in 'P1 P2 P3':
+        if self.magicnumber in {'P1', 'P2', 'P3'}:
             self.frames = 1
         else:
             bytecount = self._fh.seek(0, 2) - len(self.header)
@@ -421,7 +431,7 @@
                 self.height,
                 (
                     int(math.ceil(self.width / 8))
-                    if self.magicnumber in 'P4'
+                    if self.magicnumber in {'P4'}
                     else self.width
                 ),
                 self.depth,
@@ -468,8 +478,7 @@
                 magicnumber = 'PG'
             elif magicnumber != 'PG':
                 raise ValueError(
-                    f'invalid dtype {data.dtype!r} for '
-                    f'magicnumber {magicnumber!r}'
+                    f'invalid {data.dtype=!r} for {magicnumber=!r}'
                 )
 
         if maxval is None:
@@ -485,7 +494,7 @@
                 )
         if not 0 < maxval < 2**32:
             # allow maxval > 65535
-            raise ValueError(f'maxval {maxval} of range')
+            raise ValueError(f'{maxval=} of range')
 
         self = cls(None)
 
@@ -512,29 +521,24 @@
                 self.depth = 1
                 self.width = data.shape[-1]
                 self.height = data.shape[-2]
-        elif magicnumber in 'P3 P6':
+        elif magicnumber in {'P3', 'P6'}:
             # rgb
             if data.ndim < 3 or data.shape[-1] != 3:
-                raise ValueError(
-                    f'invalid magicnumber {magicnumber!r} '
-                    f'for shape {data.shape}'
-                )
+                raise ValueError(f'invalid {magicnumber=!r} for {data.shape=}')
             self.depth = data.shape[-1]
             self.width = data.shape[-2]
             self.height = data.shape[-3]
-        elif magicnumber in 'P1 P2 P4 P5 PG':
+        elif magicnumber in {'P1', 'P2', 'P4', 'P5', 'PG'}:
             # bilevel or gray
-            if magicnumber in 'P1 P4' and maxval != 1:
-                raise ValueError(
-                    f'invalid magicnumber {magicnumber!r} for maxval {maxval}'
-                )
+            if magicnumber in {'P1', 'P4'} and maxval != 1:
+                raise ValueError(f'invalid {magicnumber=!r} for {maxval=}')
             if magicnumber == 'PG':
                 cls.byteorder = '<' if data.dtype.byteorder in '<|=' else '>'
             self.depth = 1
             self.width = data.shape[-1]
             self.height = data.shape[-2]
         else:
-            raise ValueError(f'invalid magicnumber {magicnumber}')
+            raise ValueError(f'invalid {magicnumber=}')
 
         if magicnumber == 'PG' and data.dtype.kind == 'i':
             self._data = data.astype(
@@ -549,7 +553,7 @@
                 ),
                 copy=False,
             )
-        elif magicnumber in 'P1 P4':
+        elif magicnumber in {'P1', 'P4'}:
             self._data = data.astype('bool', copy=False)
         else:
             self._data = data.astype(
@@ -560,6 +564,7 @@
         self.frames = max(
             1, product(data.shape) // (self.height * self.width * self.depth)
         )
+        assert magicnumber is not None
         self.magicnumber = magicnumber
         self.maxval = maxval
         self.dtype = self._data.dtype
@@ -723,11 +728,13 @@
         regroups = regroups + (1,) * bpm
         self.dataoffset = len(regroups[0])
         self.header = regroups[0].decode(errors='ignore')
-        self.magicnumber = regroups[1].decode()  # type: ignore
+        self.magicnumber = regroups[1].decode()  # type: ignore[assignment]
         self.width = int(regroups[2])
         self.height = int(regroups[3])
         self.maxval = int(regroups[4])
-        self.depth = 3 if self.magicnumber in 'P3 P6 P7 332' else 1
+        self.depth = (
+            3 if self.magicnumber in {'P3', 'P6', 'P7', 'P7 332'} else 1
+        )
         self.tupltype = NetpbmFile.MAGIC_NUMBER[self.magicnumber]
 
     def _read_pf_header(self, data: bytes, /) -> None:
@@ -746,7 +753,7 @@
         regroups = match.groups()
         self.dataoffset = len(regroups[0])
         self.header = regroups[0].decode(errors='ignore')
-        self.magicnumber = regroups[1].decode()  # type: ignore
+        self.magicnumber = regroups[1].decode()  # type: ignore[assignment]
         self.width = int(regroups[2])
         self.height = int(regroups[3])
         self.scale = abs(float(regroups[4]))
@@ -758,7 +765,7 @@
         elif self.magicnumber == 'Pf':
             self.depth = 1
         else:
-            raise ValueError(f'invalid magicnumber {self.magicnumber!r}')
+            raise ValueError(f'invalid {self.magicnumber=!r}')
 
     def _read_pg_header(self, data: bytes, /) -> None:
         """Read PG header and initialize instance."""
@@ -775,7 +782,7 @@
         regroups = match.groups()
         self.dataoffset = len(regroups[0])
         self.header = regroups[0].decode(errors='ignore')
-        self.magicnumber = regroups[1].decode()  # type: ignore
+        self.magicnumber = regroups[1].decode()  # type: ignore[assignment]
         self.byteorder = '>' if (regroups[2] == b'ML') else '<'
         signed = regroups[3] == b'-'
         bitdepth = int(regroups[4])
@@ -794,19 +801,19 @@
                 self.byteorder + ('i4' if signed else 'u4')
             )
         else:
-            raise ValueError(f'bitdepth {bitdepth} out of range')
+            raise ValueError(f'{bitdepth=} out of range')
 
     def _read_data(self, fh: BinaryIO) -> NDArray[Any]:
         """Return image data from open file."""
         fh.seek(self.dataoffset)
 
-        bilevel = self.magicnumber in 'P1 P4'
+        bilevel = self.magicnumber in {'P1', 'P4'}
         dtype = self.dtype if not bilevel else numpy.dtype('u1')
         depth = self.depth if self.magicnumber != 'P7 332' else 1
         shape = [-1, self.height, self.width, depth]
         rawdata = fh.read()
 
-        if self.magicnumber in 'P1 P2 P3':
+        if self.magicnumber in {'P1', 'P2', 'P3'}:
             if bilevel and rawdata.strip()[1:2] in b'01':
                 datalist = [
                     bytes([i])
@@ -859,7 +866,7 @@
         if magicnumber is None:
             magicnumber = self.magicnumber
         if magicnumber not in NetpbmFile.MAGIC_NUMBER:
-            raise ValueError(f'invalid magicnumber {magicnumber!r}')
+            raise ValueError(f'invalid {magicnumber=!r}')
 
         fh.seek(0)
         fh.write(
@@ -874,28 +881,28 @@
             data = self._data
 
         # data type/shape verification done in fromdata() and _header()
-        if magicnumber in 'P1':
+        if magicnumber == 'P1':
             assert self.maxval == 1
             assert self.depth == 1
             assert data.dtype.kind == 'b'
             if self.frames > 1:
-                log_warning('writing non-compliant multi-image file')
+                logger().warning('writing non-compliant multi-image file')
             # one line per sample
             numpy.savetxt(fh, data.reshape(-1), fmt='%i')
         elif magicnumber == 'P2':
             if self.maxval > 65535:
-                log_warning('writing non-compliant maxval {self.maxval}')
+                logger().warning('writing non-compliant maxval {self.maxval}')
             if self.frames > 1:
-                log_warning('writing non-compliant multi-image file')
+                logger().warning('writing non-compliant multi-image file')
             assert self.depth == 1
             assert data.dtype.kind in 'iu'
             # one line per sample
             numpy.savetxt(fh, data.reshape(-1), fmt='%i')
         elif magicnumber == 'P3':
             if self.maxval > 65535:
-                log_warning('writing non-compliant maxval {self.maxval}')
+                logger().warning('writing non-compliant maxval {self.maxval}')
             if self.frames > 1:
-                log_warning('writing non-compliant multi-image file')
+                logger().warning('writing non-compliant multi-image file')
             assert self.depth == 3
             assert data.dtype.kind in 'iu'
             # one line per sample
@@ -972,13 +979,13 @@
                     f'{self.width} ' f'{self.height}\n',
                 )
             )
-        if magicnumber in 'P1 P4':
+        if magicnumber in {'P1', 'P4'}:
             if self.maxval != 1 or self.depth != 1 or self.dtype.kind != 'b':
                 raise ValueError(
                     f'data not compatible with {magicnumber!r} format'
                 )
             return f'{magicnumber}{comment}{self.width} {self.height}\n'
-        if magicnumber in 'P2 P5':
+        if magicnumber in {'P2', 'P5'}:
             if self.depth != 1 or self.dtype.kind not in 'ui':
                 raise ValueError(
                     f'data not compatible with {magicnumber!r} format'
@@ -987,7 +994,7 @@
                 f'{magicnumber}{comment}'
                 f'{self.width} {self.height} {self.maxval}\n'
             )
-        if magicnumber in 'P3 P6':
+        if magicnumber in {'P3', 'P6'}:
             if self.depth != 3 or self.dtype.kind not in 'ui':
                 raise ValueError(
                     f'data not compatible with {magicnumber!r} format'
@@ -1001,7 +1008,7 @@
     def __enter__(self) -> NetpbmFile:
         return self
 
-    def __exit__(self, exc_type, exc_value, traceback):  # type: ignore
+    def __exit__(self, exc_type: Any, exc_value: Any, traceback: Any) -> None:
         self.close()
 
     def __repr__(self) -> str:
@@ -1023,7 +1030,7 @@
             # f'byteorder: {self.byteorder}',
             (
                 f'scale: {self.scale}'
-                if self.magicnumber in 'PF4 Pf'
+                if self.magicnumber in {'PF', 'PF4', 'Pf'}
                 else f'maxval: {self.maxval}'
             ),
         )
@@ -1045,11 +1052,9 @@
     )[2:]
 
 
-def log_warning(msg: object, *args: object, **kwargs: Any) -> None:
-    """Log message with level WARNING."""
-    import logging
-
-    logging.getLogger('netpbmfile').warning(msg, *args, **kwargs)
+def logger() -> logging.Logger:
+    """Return logger for netpbmfile module."""
+    return logging.getLogger('netpbmfile')
 
 
 def main(argv: list[str] | None = None) -> int:
@@ -1062,20 +1067,15 @@
 
     from matplotlib import pyplot
 
+    tifffile: Any
     try:
         import tifffile
     except ImportError:
-        tifffile = None  # type: ignore
+        tifffile = None
 
     if argv is None:
         argv = sys.argv
 
-    if len(argv) > 1 and '--doctest' in argv:
-        import doctest
-
-        doctest.testmod()
-        return 0
-
     if len(argv) == 1:
         files = glob('*.p*')
     elif '*' in argv[1]:
@@ -1111,7 +1111,9 @@
             if img.shape[-1] in {3, 4} and pam.maxval != 255:
                 warnings.warn('converting RGB image for display')
                 maxval = float(
-                    numpy.max(img) if pam.maxval is None else pam.maxval
+                    numpy.max(img)
+                    if pam.maxval is None  # type: ignore[redundant-expr]
+                    else pam.maxval
                 )
                 if maxval > 0.0:
                     img = img / maxval
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/netpbmfile-2024.5.24/pyproject.toml 
new/netpbmfile-2025.5.8/pyproject.toml
--- old/netpbmfile-2024.5.24/pyproject.toml     1970-01-01 01:00:00.000000000 
+0100
+++ new/netpbmfile-2025.5.8/pyproject.toml      2025-05-09 06:44:40.000000000 
+0200
@@ -0,0 +1,3 @@
+[build-system]
+requires = ["setuptools"]
+build-backend = "setuptools.build_meta"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/netpbmfile-2024.5.24/setup.py 
new/netpbmfile-2025.5.8/setup.py
--- old/netpbmfile-2024.5.24/setup.py   2024-05-25 18:08:59.000000000 +0200
+++ new/netpbmfile-2025.5.8/setup.py    2025-05-09 06:44:40.000000000 +0200
@@ -10,7 +10,7 @@
 buildnumber = ''
 
 
-def search(pattern, string, flags=0):
+def search(pattern: str, string: str, flags: int = 0) -> str:
     """Return first match of pattern in string."""
     match = re.search(pattern, string, flags)
     if match is None:
@@ -18,7 +18,7 @@
     return match.groups()[0]
 
 
-def fix_docstring_examples(docstring):
+def fix_docstring_examples(docstring: str) -> str:
     """Return docstring with examples fixed for GitHub."""
     start = True
     indent = False
@@ -67,7 +67,7 @@
     license = license.replace('# ', '').replace('#', '')
 
     with open('LICENSE', 'w', encoding='utf-8') as fh:
-        fh.write('BSD 3-Clause License\n\n')
+        fh.write('BSD-3-Clause license\n\n')
         fh.write(license)
 
     revisions = search(
@@ -89,7 +89,7 @@
 setup(
     name='netpbmfile',
     version=version,
-    license='BSD',
+    license='BSD-3-Clause',
     description=description,
     long_description=readme,
     long_description_content_type='text/x-rst',
@@ -106,20 +106,19 @@
     entry_points={
         'console_scripts': ['netpbmfile = netpbmfile.netpbmfile:main']
     },
-    python_requires='>=3.9',
+    python_requires='>=3.10',
     install_requires=['numpy'],
     extras_require={'all': ['tifffile', 'matplotlib']},
     platforms=['any'],
     classifiers=[
         'Development Status :: 4 - Beta',
-        'License :: OSI Approved :: BSD License',
         'Intended Audience :: Science/Research',
         'Intended Audience :: Developers',
         'Operating System :: OS Independent',
         'Programming Language :: Python :: 3 :: Only',
-        'Programming Language :: Python :: 3.9',
         'Programming Language :: Python :: 3.10',
         'Programming Language :: Python :: 3.11',
         'Programming Language :: Python :: 3.12',
+        'Programming Language :: Python :: 3.13',
     ],
 )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/netpbmfile-2024.5.24/tests/test_netpbmfile.py 
new/netpbmfile-2025.5.8/tests/test_netpbmfile.py
--- old/netpbmfile-2024.5.24/tests/test_netpbmfile.py   2024-05-25 
18:08:59.000000000 +0200
+++ new/netpbmfile-2025.5.8/tests/test_netpbmfile.py    2025-05-09 
06:44:40.000000000 +0200
@@ -1,6 +1,6 @@
 # test_netpbmfile.py
 
-# Copyright (c) 2011-2024, Christoph Gohlke
+# Copyright (c) 2011-2025, Christoph Gohlke
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -27,9 +27,12 @@
 # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 # POSSIBILITY OF SUCH DAMAGE.
 
+# mypy: allow-untyped-defs
+# mypy: check-untyped-defs=False
+
 """Unittests for the netpbmfile package.
 
-:Version: 2024.5.24
+:Version: 2025.5.8
 
 """
 
@@ -399,7 +402,7 @@
         axes = axes[1:]
         shape = shape[1:]
 
-    with NetpbmFile(filepath, byteorder=byteorder) as fh:  # type: ignore
+    with NetpbmFile(filepath, byteorder=byteorder) as fh:
         assert str(fh)
         assert fh.magicnumber == magicnumber
         # assert fh.tupltype == tupltype

Reply via email to