Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-ase for openSUSE:Factory checked in at 2026-09-11 18:05:31 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-ase (Old) and /work/SRC/openSUSE:Factory/.python-ase.new.1265 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-ase" Fri Sep 11 18:05:31 2026 rev:8 rq:1377395 version:3.29.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-ase/python-ase.changes 2026-04-28 13:22:43.291572428 +0200 +++ /work/SRC/openSUSE:Factory/.python-ase.new.1265/python-ase.changes 2026-09-11 18:08:29.574819939 +0200 @@ -1,0 +2,9 @@ +Fri Sep 11 12:01:28 UTC 2026 - Markéta Machová <[email protected]> + +- update to 3.29.0: + * Read and write support for the RuNNer input format + * The SocketIO calculator client supports future defaults from the i-PI +- Add numpy25.patch to fix tests with NumPy 2.5 +- Convert to libalternatives on SLE-16-based and newer systems + +------------------------------------------------------------------- Old: ---- ase-3.28.0.tar.gz New: ---- ase-3.29.0.tar.gz numpy25.patch ----------(New B)---------- New: * The SocketIO calculator client supports future defaults from the i-PI - Add numpy25.patch to fix tests with NumPy 2.5 - Convert to libalternatives on SLE-16-based and newer systems ----------(New E)---------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-ase.spec ++++++ --- /var/tmp/diff_new_pack.HXEuQu/_old 2026-09-11 18:08:30.258848577 +0200 +++ /var/tmp/diff_new_pack.HXEuQu/_new 2026-09-11 18:08:30.259848618 +0200 @@ -16,18 +16,31 @@ # +%if 0%{?suse_version} > 1500 +%bcond_without libalternatives +%else +%bcond_with libalternatives +%endif Name: python-ase -Version: 3.28.0 +Version: 3.29.0 Release: 0 Summary: Atomic Simulation Environment License: LGPL-2.1-or-later URL: https://ase-lib.org/ Source: https://files.pythonhosted.org/packages/source/a/ase/ase-%{version}.tar.gz +# PATCH-FIX-UPSTREAM https://gitlab.com/ase/ase/-/merge_requests/4175 Numpy2.5 fixes +Patch0: numpy25.patch BuildRequires: %{python_module base >= 3.10} BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools >= 77.0.3} BuildRequires: %{python_module wheel} +BuildRequires: fdupes BuildRequires: python-rpm-macros +Requires: python-matplotlib >= 3.5.2 +Requires: python-numpy >= 1.21.6 +Requires: python-scipy >= 1.8.1 +Requires: python-typing_extensions +BuildArch: noarch # SECTION test requirements BuildRequires: %{python_module matplotlib >= 3.5.2} BuildRequires: %{python_module numpy >= 1.21.6} @@ -35,14 +48,15 @@ BuildRequires: %{python_module pytest-xdist >= 3.2.0} BuildRequires: %{python_module scipy >= 1.8.1} BuildRequires: %{python_module tk} +BuildRequires: %{python_module typing_extensions} # /SECTION -BuildRequires: fdupes -Requires: python-matplotlib >= 3.5.2 -Requires: python-numpy >= 1.21.6 -Requires: python-scipy >= 1.8.1 +%if %{with libalternatives} +BuildRequires: alts +Requires: alts +%else Requires(post): update-alternatives Requires(postun): update-alternatives -BuildArch: noarch +%endif %python_subpackages %description @@ -72,6 +86,9 @@ %postun %python_uninstall_alternative ase +%pre +%python_libalternatives_reset_alternative ase + %files %{python_files} %doc CHANGELOG.rst README.rst %license COPYING COPYING.LESSER LICENSE ++++++ ase-3.28.0.tar.gz -> ase-3.29.0.tar.gz ++++++ ++++ 57877 lines of diff (skipped) ++++++ numpy25.patch ++++++ >From ba28a69af6f447440f886187bdcabbad1a16d0e2 Mon Sep 17 00:00:00 2001 From: Ask Hjorth Larsen <[email protected]> Date: Sun, 21 Jun 2026 23:31:39 +0200 Subject: [PATCH 1/6] numpy 2.5 deprecation: use reshape() instead of assigning directly to array.shape --- ase/atoms.py | 8 +++----- ase/geometry/geometry.py | 5 +---- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/ase/atoms.py b/ase/atoms.py index 87dffcdb92..40821afa67 100644 --- a/ase/atoms.py +++ b/ase/atoms.py @@ -429,7 +429,7 @@ class _LimitedAtoms: if dtype is not None: a = np.array(a, dtype, order='C') if len(a) == 0 and shape is not None: - a.shape = (-1,) + shape + a = a.reshape((-1, *shape)) else: if not a.flags['C_CONTIGUOUS']: a = np.ascontiguousarray(a) @@ -1545,11 +1545,9 @@ class _LimitedAtoms: D, D_len = get_distances(p1, p2, cell=cell, pbc=pbc) if vector: - D.shape = (-1, 3) - return D + return D.reshape((-1, 3)) else: - D_len.shape = (-1,) - return D_len + return D_len.ravel() def get_all_distances(self, mic=False, vector=False): """Return distances of all of the atoms with all of the atoms. diff --git a/ase/geometry/geometry.py b/ase/geometry/geometry.py index 3843b3f980..fd80d8ead1 100644 --- a/ase/geometry/geometry.py +++ b/ase/geometry/geometry.py @@ -400,10 +400,7 @@ def get_distances(p1, p2=None, cell=None, pbc=None): return Dout, Dout_len # Expand back to matrix indexing - D.shape = (-1, len(p2), 3) - D_len.shape = (-1, len(p2)) - - return D, D_len + return D.reshape((-1, len(p2), 3)), D_len.reshape((-1, len(p2))) def get_distances_derivatives(v0, cell=None, pbc=None): -- GitLab >From c7357e29dbe6a3bd4a111ae0837e40dd69493712 Mon Sep 17 00:00:00 2001 From: Ask Hjorth Larsen <[email protected]> Date: Sun, 21 Jun 2026 23:46:40 +0200 Subject: [PATCH 2/6] fix multiple npdarray shape assignments --- ase/calculators/test.py | 3 +-- ase/db/core.py | 3 +-- ase/db/sqlite.py | 2 +- ase/dft/stm.py | 6 ++++-- ase/gui/view.py | 4 ++-- ase/io/cfg.py | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ase/calculators/test.py b/ase/calculators/test.py index 110d07d409..ffaa374800 100644 --- a/ase/calculators/test.py +++ b/ase/calculators/test.py @@ -58,8 +58,7 @@ class TestCalculator: np.cos(2 * pi * self.ibzk[:, 0]) + np.cos(2 * pi * self.ibzk[:, 1]) ) - ) - self.eps.shape = (nibzk, nbands) + ).reshape((nibzk, nbands)) self.psi = np.zeros((nibzk, 20, 20, 60), complex) phi = np.empty((2, 2, 20, 20, 60)) diff --git a/ase/db/core.py b/ase/db/core.py index 84b9c3ae9e..081d7328dc 100644 --- a/ase/db/core.py +++ b/ase/db/core.py @@ -789,8 +789,7 @@ def b2o(obj: Any, b: bytes) -> Any: shape, name, offset = x dtype = np.dtype(name) size = dtype.itemsize * np.prod(shape).astype(int) - a = np.frombuffer(b[offset : offset + size], dtype) - a.shape = shape + a = np.frombuffer(b[offset : offset + size], dtype).reshape(shape) if not np.little_endian: a = a.byteswap() return a diff --git a/ase/db/sqlite.py b/ase/db/sqlite.py index cb7ced5a6e..3634bd45ac 100644 --- a/ase/db/sqlite.py +++ b/ase/db/sqlite.py @@ -176,7 +176,7 @@ class SQLite3Database(Database): if not np.little_endian: array = array.byteswap() if shape is not None: - array.shape = shape + array = array.reshape(shape) return array def _connect(self): diff --git a/ase/dft/stm.py b/ase/dft/stm.py index ce53100558..f18b1c23eb 100644 --- a/ase/dft/stm.py +++ b/ase/dft/stm.py @@ -141,7 +141,8 @@ class STM: for i, a in enumerate(ldos): heights[i] = find_height(a, current, h, z0) - s0 = heights.shape = self.ldos.shape[:2] + s0 = self.ldos.shape[:2] + heights = heights.reshape(s0) heights = np.tile(heights, repeat) s = heights.shape @@ -176,7 +177,8 @@ class STM: for i, a in enumerate(ldos): current[i] = self.find_current(a, zp) - s0 = current.shape = self.ldos.shape[:2] + s0 = self.ldos.shape[:2] + current = current.reshape(s0) current = np.tile(current, repeat) s = current.shape diff --git a/ase/gui/view.py b/ase/gui/view.py index c63efa4496..45b629dc49 100644 --- a/ase/gui/view.py +++ b/ase/gui/view.py @@ -48,8 +48,8 @@ def get_cell_coordinates(cell, shifted=False): B2[:, :, n1:n2] = B1[:, :, n1:n2] B2[:, :, n1:n2, c] += h n1 = n2 - B1.shape = (-1, 3) - B2.shape = (-1, 3) + B1 = B1.reshape((-1, 3)) + B2 = B2.reshape((-1, 3)) if shifted: B1 -= 0.5 B2 -= 0.5 diff --git a/ase/io/cfg.py b/ase/io/cfg.py index 1b9db08f95..ce4c68627c 100644 --- a/ase/io/cfg.py +++ b/ase/io/cfg.py @@ -112,7 +112,7 @@ def write_clr(fd, atoms): for a in atoms: radius[a.index] = default_radius[a.symbol] - radius.shape = (-1, 1) + radius = radius.reshape((-1, 1)) for c1, c2, c3, r in np.append(color, radius, axis=1): fd.write(f'{c1:f} {c2:f} {c3:f} {r:f}\n') -- GitLab >From adad2d91e307d61cc34058807302334e971b8313 Mon Sep 17 00:00:00 2001 From: Ask Hjorth Larsen <[email protected]> Date: Sun, 21 Jun 2026 23:53:13 +0200 Subject: [PATCH 3/6] fix many more .shape assignments --- ase/io/pov.py | 7 +++---- ase/io/ulm.py | 2 +- ase/io/utils.py | 5 +++-- ase/md/md.py | 6 +++--- ase/test/bandstructure/test_bandstructure.py | 5 +++-- ase/test/neighbor/test_neighbor.py | 2 +- ase/test/neighbor/test_neighbor_kernel.py | 3 +-- 7 files changed, 15 insertions(+), 15 deletions(-) diff --git a/ase/io/pov.py b/ase/io/pov.py index a80296cdb8..acc7cade29 100644 --- a/ase/io/pov.py +++ b/ase/io/pov.py @@ -262,10 +262,9 @@ class POVRAY: self.positions = positions - self.offset if cell_vertices is not None: - self.cell_vertices = cell_vertices - self.offset - self.cell_vertices.shape = (2, 2, 2, 3) - else: - self.cell_vertices = None + cell_vertices = (cell_vertices - self.offset).reshape((2, 2, 2, 3)) + + self.cell_vertices = cell_vertices ratio = float(self.image_width) / self.image_height if canvas_width is None: diff --git a/ase/io/ulm.py b/ase/io/ulm.py index 667e1d03b5..a15789f35e 100644 --- a/ase/io/ulm.py +++ b/ase/io/ulm.py @@ -655,7 +655,7 @@ class NDArrayReader: # Not as fast, but works for reading from tar-files: a = np.frombuffer(self.fd.read(int(count * self.itemsize)), self.dtype) - a.shape = (stop - start,) + self.shape[1:] + a = a.reshape((stop - start,) + self.shape[1:]) if step != 1: a = a[::step].copy() if self.little_endian != np.little_endian: diff --git a/ase/io/utils.py b/ase/io/utils.py index dce5a4eb6b..aab79c6fc7 100644 --- a/ase/io/utils.py +++ b/ase/io/utils.py @@ -58,12 +58,13 @@ def get_cell_vertex_points(cell, disp=(0.0, 0.0, 0.0)): """Returns 8x3 list of the cell vertex coordinates""" cell_vertices = np.empty((2, 2, 2, 3)) displacement = np.array(disp) + for c1 in range(2): for c2 in range(2): for c3 in range(2): cell_vertices[c1, c2, c3] = [c1, c2, c3] @ cell + displacement - cell_vertices.shape = (8, 3) - return cell_vertices + + return cell_vertices.reshape((8, 3)) def update_line_order_for_atoms(L, T, D, atoms, radii): diff --git a/ase/md/md.py b/ase/md/md.py index 0a2135ab89..086d90b975 100644 --- a/ase/md/md.py +++ b/ase/md/md.py @@ -118,14 +118,14 @@ class MolecularDynamics(BaseDynamics): # That way we won't need to test multiple cases. Currently, # we do not test /any/ kind of MD with any kind of Filter in ASE. self.atoms = atoms - self.masses = self.atoms.get_masses() + masses = self.atoms.get_masses() - if 0 in self.masses: + if 0 in masses: warnings.warn('Zero mass encountered in atoms; this will ' 'likely lead to errors if the massless atoms ' 'are unconstrained.') - self.masses.shape = (-1, 1) + self.masses = masses.reshape((-1, 1)) if not self.atoms.has('momenta'): self.atoms.set_momenta(np.zeros([len(self.atoms), 3])) diff --git a/ase/test/bandstructure/test_bandstructure.py b/ase/test/bandstructure/test_bandstructure.py index eadfdd0bc3..9b36e595c0 100644 --- a/ase/test/bandstructure/test_bandstructure.py +++ b/ase/test/bandstructure/test_bandstructure.py @@ -36,8 +36,9 @@ def test_bandstructure(bs_cu, testdir, plt): print(labels) assert ''.join(labels) == 'GXWKGLUWLKUX' bs_cu.plot(emax=10, filename='bs.png') - cols = np.linspace(-1.0, 1.0, bs_cu.energies.size) - cols.shape = bs_cu.energies.shape + cols = np.linspace(-1.0, 1.0, bs_cu.energies.size).reshape( + bs_cu.energies.shape + ) bs_cu.plot(emax=10, point_colors=cols, filename='bs2.png') diff --git a/ase/test/neighbor/test_neighbor.py b/ase/test/neighbor/test_neighbor.py index 27ce975a52..6d1083d42c 100644 --- a/ase/test/neighbor/test_neighbor.py +++ b/ase/test/neighbor/test_neighbor.py @@ -95,7 +95,7 @@ def test_supercell(sorted): nl2.update(atoms2) d2, c2 = count(nl2, atoms2) - c2.shape = (-1, 10) # row: images, column: atoms + c2 = c2.reshape((-1, 10)) # row: images, column: atoms # if the sum of nearest-neighbor distances gets larger # according to the supercell size diff --git a/ase/test/neighbor/test_neighbor_kernel.py b/ase/test/neighbor/test_neighbor_kernel.py index 80ada15b73..61aeea7da8 100644 --- a/ase/test/neighbor/test_neighbor_kernel.py +++ b/ase/test/neighbor/test_neighbor_kernel.py @@ -191,8 +191,7 @@ def test_neighbor_kernel(): i2, j2, d2, _D2, _S2 = neighbor_list( 'ijdDS', atoms2, atoms2.numbers * 0.2 + 0.5 ) - c2 = np.bincount(i2, minlength=len(atoms)) - c2.shape = (-1, nat) + c2 = np.bincount(i2, minlength=len(atoms)).reshape((-1, nat)) dd = d.sum() * (p1 + 1) * (p2 + 1) * (p3 + 1) - d2.sum() pos = atoms.positions dr = np.linalg.solve( -- GitLab >From 827254bafb27e2255c7b919c4623477959253e9d Mon Sep 17 00:00:00 2001 From: Ask Hjorth Larsen <[email protected]> Date: Mon, 22 Jun 2026 11:36:02 +0200 Subject: [PATCH 4/6] fix deprecations about setting .dtype --- ase/io/jsonio.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ase/io/jsonio.py b/ase/io/jsonio.py index 1534ae3916..b9d50980e8 100644 --- a/ase/io/jsonio.py +++ b/ase/io/jsonio.py @@ -32,7 +32,7 @@ def default(obj): if isinstance(obj, np.ndarray): flatobj = obj.ravel() if np.iscomplexobj(obj): - flatobj.dtype = obj.real.dtype + flatobj = flatobj.view(obj.real.dtype) # We use str(obj.dtype) here instead of obj.dtype.name, because # they are not always the same (e.g. for numpy arrays of strings). # Using obj.dtype.name can break the ability to recursively decode/ @@ -94,7 +94,7 @@ def create_ndarray(shape, dtype, data): array = np.empty(shape, dtype=dtype) flatbuf = array.ravel() if np.iscomplexobj(array): - flatbuf.dtype = array.real.dtype + flatbuf = flatbuf.view(array.real.dtype) flatbuf[:] = data return array -- GitLab >From 11c2223e5024b40d5e969a6f71ceeef0d26f5bb3 Mon Sep 17 00:00:00 2001 From: Ask Hjorth Larsen <[email protected]> Date: Mon, 22 Jun 2026 11:57:24 +0200 Subject: [PATCH 5/6] do not use deprecated chararray type. This may be mildly breaking --- ase/io/onetep.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ase/io/onetep.py b/ase/io/onetep.py index 5b59cbcb88..7044422c90 100644 --- a/ase/io/onetep.py +++ b/ase/io/onetep.py @@ -956,7 +956,7 @@ class _OnetepHelper: tmp = np.loadtxt( self.fdo_lines[idx + offset : idx + n], dtype='str' ).reshape(-1, 4) - els = np.char.array(tmp[:, 0]) + els = tmp[:, 0] if offset == 2: pos = tmp[:, 1:].astype(np.float64) else: @@ -1004,7 +1004,7 @@ class _OnetepHelper: dtype='str', usecols=(1, 3, 4, 5), ) - els = np.char.array(tmp[:, 0]) + els = tmp[:, 0] pos = tmp[:, 1:].astype(np.float64) * units['Bohr'] try: atoms = Atoms(els, pos) -- GitLab >From bce38750dbf711bc7aaaffdc87928213804b1bfe Mon Sep 17 00:00:00 2001 From: Ask Hjorth Larsen <[email protected]> Date: Mon, 22 Jun 2026 12:02:49 +0200 Subject: [PATCH 6/6] guard against errors from scikit-learn --- ase/test/fio/test_povray.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ase/test/fio/test_povray.py b/ase/test/fio/test_povray.py index 7514bb2da5..1dbb37809e 100644 --- a/ase/test/fio/test_povray.py +++ b/ase/test/fio/test_povray.py @@ -76,6 +76,8 @@ def isosurface_things(skimage): return cell, center_cell_position, surface +# This is triggered with numpy2.5+ and scikit-learn <=1.8.0 [email protected]('ignore:Setting the shape on a NumPy array') def test_compute_isosurface(isosurface_things): cell, center_cell_position, isosurf = isosurface_things @@ -83,6 +85,8 @@ def test_compute_isosurface(isosurface_things): assert np.allclose(vert_centroid, center_cell_position) +# This is triggered with numpy2.5+ and scikit-learn <=1.8.0 [email protected]('ignore:Setting the shape on a NumPy array') def test_render_isosurface(testdir, isosurface_things, povray_executable): cell, _center_cell_position, isosurf = isosurface_things -- GitLab
