Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-mrcz for openSUSE:Factory checked in at 2026-03-25 21:18:29 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-mrcz (Old) and /work/SRC/openSUSE:Factory/.python-mrcz.new.8177 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-mrcz" Wed Mar 25 21:18:29 2026 rev:6 rq:1342312 version:0.5.9 Changes: -------- --- /work/SRC/openSUSE:Factory/python-mrcz/python-mrcz.changes 2025-06-05 20:36:38.447035258 +0200 +++ /work/SRC/openSUSE:Factory/.python-mrcz.new.8177/python-mrcz.changes 2026-03-27 06:48:21.839146643 +0100 @@ -1,0 +2,12 @@ +Tue Mar 24 17:22:46 UTC 2026 - Dirk Müller <[email protected]> + +- update to 0.5.9: + * Did not properly specify how to find source files so 0.5.8 + wheel was broken. (In my defense I've used src<package> + builds for almost five years now.) + * Suppress warnings about SyntaxError: invalid escape + sequences. + * Switch to using pyproject.toml over setup.py. +- refresh new-pythons.patch: remove setup.py hunk as it no longer exists. + +------------------------------------------------------------------- Old: ---- python-mrcz-0.5.7.tar.gz New: ---- mrcz-0.5.9.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-mrcz.spec ++++++ --- /var/tmp/diff_new_pack.7AXfCF/_old 2026-03-27 06:48:22.451171846 +0100 +++ /var/tmp/diff_new_pack.7AXfCF/_new 2026-03-27 06:48:22.451171846 +0100 @@ -1,7 +1,7 @@ # # spec file for package python-mrcz # -# Copyright (c) 2025 SUSE LLC +# Copyright (c) 2026 SUSE LLC and contributors # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,27 +18,30 @@ %{?sle15_python_module_pythons} Name: python-mrcz -Version: 0.5.7 +Version: 0.5.9 Release: 0 Summary: MRCZ meta-compressed image file-format library License: BSD-3-Clause URL: https://github.com/em-MRCZ/python-mrcz -Source: https://github.com/em-MRCZ/python-mrcz/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz +Source0: https://files.pythonhosted.org/packages/source/m/mrcz/mrcz-%{version}.tar.gz # PATCH-FIX-UPSTREAM https://github.com/em-MRCZ/python-mrcz/pull/15 Numpy 2.0 and deprecation fixes Patch: numpy2.patch # PATCH-FIX-UPSTREAM https://github.com/em-MRCZ/python-mrcz/pull/16 Remove distutils / support python >=3.12 Patch: new-pythons.patch -BuildRequires: %{python_module blosc} -BuildRequires: %{python_module numpy} +BuildRequires: %{python_module blosc >= 1.4} +BuildRequires: %{python_module build} +BuildRequires: %{python_module numpy >= 1.8} +BuildRequires: %{python_module packaging} BuildRequires: %{python_module pip} BuildRequires: %{python_module pytest} +BuildRequires: %{python_module setuptools_scm} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module wheel} BuildRequires: dos2unix BuildRequires: fdupes BuildRequires: python-rpm-macros -Requires: python-numpy -Recommends: python-blosc +Requires: python-numpy >= 1.8 +Recommends: python-blosc >= 1.4 BuildArch: noarch %python_subpackages @@ -50,8 +53,9 @@ microscopy. %prep -%autosetup -p1 -dos2unix README.rst +%setup -n mrcz-%{version} +dos2unix mrcz/ReliablePy.py mrcz/ioMRC.py mrcz/test_mrcz.py utils/update_mrcz_to_0.5.0.py +%autopatch -p1 %build %pyproject_wheel ++++++ new-pythons.patch ++++++ --- /var/tmp/diff_new_pack.7AXfCF/_old 2026-03-27 06:48:22.491173493 +0100 +++ /var/tmp/diff_new_pack.7AXfCF/_new 2026-03-27 06:48:22.495173658 +0100 @@ -49,20 +49,4 @@ test_result = unittest.TextTestRunner(verbosity=verbosity).run(theSuite) return test_result -diff --git a/setup.py b/setup.py -index ebda8b3..47914a7 100644 ---- a/setup.py -+++ b/setup.py -@@ -62,6 +62,11 @@ def exit_with_error(message): - Programming Language :: Python :: 3.6 - Programming Language :: Python :: 3.7 - Programming Language :: Python :: 3.8 -+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 - Topic :: Software Development :: Libraries :: Python Modules - Topic :: System :: Archiving :: Compression - Operating System :: Microsoft :: Windows ++++++ numpy2.patch ++++++ --- /var/tmp/diff_new_pack.7AXfCF/_old 2026-03-27 06:48:22.511174317 +0100 +++ /var/tmp/diff_new_pack.7AXfCF/_new 2026-03-27 06:48:22.519174646 +0100 @@ -51,77 +51,77 @@ --- a/mrcz/ioMRC.py +++ b/mrcz/ioMRC.py @@ -282,16 +282,16 @@ def readMRC(MRCfilename, idx=None, endian='le', - - if ( (header['compressor'] in REVERSE_COMPRESSOR_ENUM) - and (REVERSE_COMPRESSOR_ENUM[header['compressor']] > 0) -- and idx == None ): -+ and idx is None ): - return __MRCZImport(f, header, slices, endian=endian, fileConvention=fileConvention, - n_threads=n_threads) - # Else load as uncompressed MRC file - -- if idx != None: -+ if idx is not None: - # If specific images were requested: - # TO DO: add support to read all images within a range at once - -- if header['compressor'] != None: -+ if header['compressor'] is not None: - raise RuntimeError('Reading from arbitrary positions not supported for compressed files. Compressor = %s'%header['compressor']) - if np.isscalar( idx ): - indices = np.array([idx, idx], dtype='int') + + if ( (header['compressor'] in REVERSE_COMPRESSOR_ENUM) + and (REVERSE_COMPRESSOR_ENUM[header['compressor']] > 0) +- and idx == None ): ++ and idx is None ): + return __MRCZImport(f, header, slices, endian=endian, fileConvention=fileConvention, + n_threads=n_threads) + # Else load as uncompressed MRC file + +- if idx != None: ++ if idx is not None: + # If specific images were requested: + # TO DO: add support to read all images within a range at once + +- if header['compressor'] != None: ++ if header['compressor'] is not None: + raise RuntimeError('Reading from arbitrary positions not supported for compressed files. Compressor = %s'%header['compressor']) + if np.isscalar( idx ): + indices = np.array([idx, idx], dtype='int') @@ -370,7 +370,7 @@ def __MRCZImport(f, header, slices, endian='le', fileConvention='ccpem', - if not BLOSC_PRESENT: - raise ImportError( '`blosc` is not installed, cannot decompress file.' ) - -- if n_threads == None: -+ if n_threads is None: - blosc.nthreads = DEFAULT_N_THREADS - else: - blosc.nthreads = n_threads + if not BLOSC_PRESENT: + raise ImportError( '`blosc` is not installed, cannot decompress file.' ) + +- if n_threads == None: ++ if n_threads is None: + blosc.nthreads = DEFAULT_N_THREADS + else: + blosc.nthreads = n_threads @@ -751,7 +751,7 @@ def writeMRC(input_image, MRCfilename, meta=None, endian='le', dtype=None, - # the file exists, but idx is 'None', it will be replaced by a new file - # with new header anyway: - if os.path.isfile(MRCfilename): -- if idx == None: -+ if idx is None: - idxnewfile = True - else: - idxnewfile = False + # the file exists, but idx is 'None', it will be replaced by a new file + # with new header anyway: + if os.path.isfile(MRCfilename): +- if idx == None: ++ if idx is None: + idxnewfile = True + else: + idxnewfile = False @@ -760,11 +760,11 @@ def writeMRC(input_image, MRCfilename, meta=None, endian='le', dtype=None, - - - if idxnewfile: -- if dtype == 'uint4' and compressor != None: -+ if dtype == 'uint4' and compressor is not None: - raise TypeError('uint4 packing is not compatible with compression, use int8 datatype.') - - header = {'meta': meta} -- if dtype == None: -+ if dtype is None: - if slices > 0: - header['dtype'] = endchar + input_image[0].dtype.descr[0][1].strip('<>|') - else: + + + if idxnewfile: +- if dtype == 'uint4' and compressor != None: ++ if dtype == 'uint4' and compressor is not None: + raise TypeError('uint4 packing is not compatible with compression, use int8 datatype.') + + header = {'meta': meta} +- if dtype == None: ++ if dtype is None: + if slices > 0: + header['dtype'] = endchar + input_image[0].dtype.descr[0][1].strip('<>|') + else: @@ -816,7 +816,7 @@ def writeMRC(input_image, MRCfilename, meta=None, endian='le', dtype=None, - - header['compressor'] = compressor - header['clevel'] = clevel -- if n_threads == None and BLOSC_PRESENT: -+ if n_threads is None and BLOSC_PRESENT: - n_threads = DEFAULT_N_THREADS - header['n_threads'] = n_threads - + + header['compressor'] = compressor + header['clevel'] = clevel +- if n_threads == None and BLOSC_PRESENT: ++ if n_threads is None and BLOSC_PRESENT: + n_threads = DEFAULT_N_THREADS + header['n_threads'] = n_threads + @@ -848,8 +848,8 @@ def writeMRC(input_image, MRCfilename, meta=None, endian='le', dtype=None, - header['meta'] = meta - - # Now that we have a proper header, we go into the details of writing to a specific position: -- if idx != None: -- if header['compressor'] != None: -+ if idx is not None: -+ if header['compressor'] is not None: - raise RuntimeError('Writing at arbitrary positions not supported for compressed files. Compressor = %s' % header['compressor']) - - idx = int(idx) + header['meta'] = meta + + # Now that we have a proper header, we go into the details of writing to a specific position: +- if idx != None: +- if header['compressor'] != None: ++ if idx is not None: ++ if header['compressor'] is not None: + raise RuntimeError('Writing at arbitrary positions not supported for compressed files. Compressor = %s' % header['compressor']) + + idx = int(idx) diff --git a/mrcz/test_mrcz.py b/mrcz/test_mrcz.py index d76f5fa..9701cdc 100644 --- a/mrcz/test_mrcz.py @@ -151,41 +151,41 @@ --- a/mrcz/ioMRC.py +++ b/mrcz/ioMRC.py @@ -27,7 +27,7 @@ - raise ImportError('Get the backport for `concurrent.futures` for Py2.7 as `pip install futures`') - raise e - from mrcz.__version__ import __version__ --from distutils.version import StrictVersion -+from packaging.version import Version - - import logging - logger = logging.getLogger('MRCZ') + raise ImportError('Get the backport for `concurrent.futures` for Py2.7 as `pip install futures`') + raise e + from mrcz.__version__ import __version__ +-from distutils.version import StrictVersion ++from packaging.version import Version + + import logging + logger = logging.getLogger('MRCZ') @@ -195,7 +195,7 @@ def _getMRCZVersion(label): - - Returns - ------- -- version: Optional[distutils.version.StrictVersion] -+ version: Optional[packaging.version.Version] - areturns ``None`` if `label` cannot be parsed. - """ - if isinstance(label, bytes): + + Returns + ------- +- version: Optional[distutils.version.StrictVersion] ++ version: Optional[packaging.version.Version] + areturns ``None`` if `label` cannot be parsed. + """ + if isinstance(label, bytes): @@ -207,7 +207,7 @@ def _getMRCZVersion(label): - - label = label[4:] - try: -- version = StrictVersion(label) -+ version = Version(label) - return version - except ValueError: - return None + + label = label[4:] + try: +- version = StrictVersion(label) ++ version = Version(label) + return version + except ValueError: + return None @@ -537,7 +537,7 @@ def readMRCHeader(MRCfilename, slices=None, endian='le', fileConvention = 'ccpem - # is essentially unknown (and wrong). So we have this version - # check where we force slices to be 1 (i.e. we assume it is a - # stack of 2D images). -- if mrcz_version is not None and mrcz_version < StrictVersion('0.5.0'): -+ if mrcz_version is not None and mrcz_version < Version('0.5.0'): - logger.warning('MRCZ version < 0.5.0 for file {}, assuming slices == 1.'.format(MRCfilename)) - slices = 1 - else: + # is essentially unknown (and wrong). So we have this version + # check where we force slices to be 1 (i.e. we assume it is a + # stack of 2D images). +- if mrcz_version is not None and mrcz_version < StrictVersion('0.5.0'): ++ if mrcz_version is not None and mrcz_version < Version('0.5.0'): + logger.warning('MRCZ version < 0.5.0 for file {}, assuming slices == 1.'.format(MRCfilename)) + slices = 1 + else: From 1c367b3c3a5bfbffbebf36e2bf6a1eab9a668252 Mon Sep 17 00:00:00 2001 From: Eric Prestat <[email protected]> @@ -201,35 +201,35 @@ --- a/mrcz/ioMRC.py +++ b/mrcz/ioMRC.py @@ -711,12 +711,12 @@ def writeMRC(input_image, MRCfilename, meta=None, endian='le', dtype=None, - - if z_slice.dtype == np.float64 or z_slice.dtype == float: - if not WARNED_ABOUT_CASTING_F64: -- logger.warn('Casting {} to `numpy.float32`, further warnings will be suppressed.'.format(MRCfilename)) -+ logger.warning('Casting {} to `numpy.float32`, further warnings will be suppressed.'.format(MRCfilename)) - WARNED_ABOUT_CASTING_F64 = True - input_image[J] = z_slice.astype(np.float32) - elif z_slice.dtype == np.complex128: - if not WARNED_ABOUT_CASTING_C128: -- logger.warn('Casting {} to `numpy.complex64`, further warnings will be suppressed.'.format(MRCfilename)) -+ logger.warning('Casting {} to `numpy.complex64`, further warnings will be suppressed.'.format(MRCfilename)) - WARNED_ABOUT_CASTING_C128 = True - input_image[J] = z_slice.astype(np.complex64) - else: + + if z_slice.dtype == np.float64 or z_slice.dtype == float: + if not WARNED_ABOUT_CASTING_F64: +- logger.warn('Casting {} to `numpy.float32`, further warnings will be suppressed.'.format(MRCfilename)) ++ logger.warning('Casting {} to `numpy.float32`, further warnings will be suppressed.'.format(MRCfilename)) + WARNED_ABOUT_CASTING_F64 = True + input_image[J] = z_slice.astype(np.float32) + elif z_slice.dtype == np.complex128: + if not WARNED_ABOUT_CASTING_C128: +- logger.warn('Casting {} to `numpy.complex64`, further warnings will be suppressed.'.format(MRCfilename)) ++ logger.warning('Casting {} to `numpy.complex64`, further warnings will be suppressed.'.format(MRCfilename)) + WARNED_ABOUT_CASTING_C128 = True + input_image[J] = z_slice.astype(np.complex64) + else: @@ -732,12 +732,12 @@ def writeMRC(input_image, MRCfilename, meta=None, endian='le', dtype=None, - # Cast float64 -> float32, and complex128 -> complex64 - if input_image.dtype == np.float64 or input_image.dtype == float: - if not WARNED_ABOUT_CASTING_F64: -- logger.warn('Casting {} to `numpy.float64`'.format(MRCfilename)) -+ logger.warning('Casting {} to `numpy.float64`'.format(MRCfilename)) - WARNED_ABOUT_CASTING_F64 = True - input_image = input_image.astype(np.float32) - elif input_image.dtype == np.complex128: - if not WARNED_ABOUT_CASTING_C128: -- logger.warn('Casting {} to `numpy.complex64`'.format(MRCfilename)) -+ logger.warning('Casting {} to `numpy.complex64`'.format(MRCfilename)) - WARNED_ABOUT_CASTING_C128 = True - input_image = input_image.astype(np.complex64) - + # Cast float64 -> float32, and complex128 -> complex64 + if input_image.dtype == np.float64 or input_image.dtype == float: + if not WARNED_ABOUT_CASTING_F64: +- logger.warn('Casting {} to `numpy.float64`'.format(MRCfilename)) ++ logger.warning('Casting {} to `numpy.float64`'.format(MRCfilename)) + WARNED_ABOUT_CASTING_F64 = True + input_image = input_image.astype(np.float32) + elif input_image.dtype == np.complex128: + if not WARNED_ABOUT_CASTING_C128: +- logger.warn('Casting {} to `numpy.complex64`'.format(MRCfilename)) ++ logger.warning('Casting {} to `numpy.complex64`'.format(MRCfilename)) + WARNED_ABOUT_CASTING_C128 = True + input_image = input_image.astype(np.complex64) + From 97644c4a957946deb1c510d83dba3d3e2fa155ba Mon Sep 17 00:00:00 2001 From: Eric Prestat <[email protected]> @@ -246,21 +246,21 @@ --- a/mrcz/ioMRC.py +++ b/mrcz/ioMRC.py @@ -542,7 +542,7 @@ def readMRCHeader(MRCfilename, slices=None, endian='le', fileConvention = 'ccpem - slices = 1 - else: - f.seek(36) -- slices = int(np.fromfile(f, dtype=dtype_i4, count=1)) -+ slices = int(np.fromfile(f, dtype=dtype_i4, count=1)[0]) - - # Read in pixelsize - f.seek(40) + slices = 1 + else: + f.seek(36) +- slices = int(np.fromfile(f, dtype=dtype_i4, count=1)) ++ slices = int(np.fromfile(f, dtype=dtype_i4, count=1)[0]) + + # Read in pixelsize + f.seek(40) @@ -572,7 +572,7 @@ def readMRCHeader(MRCfilename, slices=None, endian='le', fileConvention = 'ccpem - - # Size of meta-data - f.seek(92) -- header['extendedBytes'] = int(np.fromfile(f, dtype=dtype_i4, count=1)) -+ header['extendedBytes'] = int(np.fromfile(f, dtype=dtype_i4, count=1)[0]) - if header['extendedBytes'] > 0: - f.seek(104) - header['metaId'] = f.read(4) + + # Size of meta-data + f.seek(92) +- header['extendedBytes'] = int(np.fromfile(f, dtype=dtype_i4, count=1)) ++ header['extendedBytes'] = int(np.fromfile(f, dtype=dtype_i4, count=1)[0]) + if header['extendedBytes'] > 0: + f.seek(104) + header['metaId'] = f.read(4)
