Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-numba for openSUSE:Factory checked in at 2026-02-24 15:38:35 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-numba (Old) and /work/SRC/openSUSE:Factory/.python-numba.new.1977 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-numba" Tue Feb 24 15:38:35 2026 rev:57 rq:1334568 version:0.64.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-numba/python-numba.changes 2025-12-29 15:17:02.623601234 +0100 +++ /work/SRC/openSUSE:Factory/.python-numba.new.1977/python-numba.changes 2026-02-24 15:39:33.720811551 +0100 @@ -1,0 +2,10 @@ +Fri Feb 20 10:52:02 UTC 2026 - Markéta Machová <[email protected]> + +- update to 64.0 + * NumPy 2.4 support + * Add support for np.moveaxis + * Fix scalar handling in np.all and np.any + * Fix precision loss in integer power operations on Python 3.11 + * cleanup on python 3.14 official support + +------------------------------------------------------------------- Old: ---- numba-0.63.1.tar.gz New: ---- numba-0.64.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-numba.spec ++++++ --- /var/tmp/diff_new_pack.COEicv/_old 2026-02-24 15:39:34.360838038 +0100 +++ /var/tmp/diff_new_pack.COEicv/_new 2026-02-24 15:39:34.360838038 +0100 @@ -1,7 +1,7 @@ # # spec file for package python-numba # -# Copyright (c) 2025 SUSE LLC and contributors +# 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 @@ -19,7 +19,7 @@ %define plainpython python # upper bound is exclusive: min-numpy_ver <= numpy < max_numpy_ver %define min_numpy_ver 2.0 -%define max_numpy_ver 2.4 +%define max_numpy_ver 2.5 %{?sle15_python_module_pythons} @@ -32,9 +32,6 @@ %else %bcond_without test %define psuffix -%{flavor} -%if "%{flavor}" != "test-py310" -%define skip_python310 1 -%endif %if "%{flavor}" != "test-py311" %define skip_python311 1 %endif @@ -44,10 +41,11 @@ %if "%{flavor}" != "test-py313" %define skip_python313 1 %endif -# Python 3.14 not supported yet +%if "%{flavor}" != "test-py314" %define skip_python314 1 -# The obs server-side interpreter cannot use lua or rpm shrink -%if "%pythons" == "" || "%pythons" == " " || "%pythons" == " " || "%pythons" == " " || "%pythons" == " " || ( "%pythons" == "python311" && 0%{?skip_python311} ) +%endif +# Skip empty buildsets on tumbleweed and leap16 or flavors other than python311 on leap with sle15_python_module_pythons +%if "%{shrink:%{pythons}}" == "" || ("%pythons" == "python311" && 0%{?skip_python311}) ExclusiveArch: donotbuild %define python_module() %flavor-not-enabled-in-buildset-for-suse-%{?suse_version} %else @@ -56,7 +54,7 @@ %endif %endif Name: python-numba%{?psuffix} -Version: 0.63.1 +Version: 0.64.0 Release: 0 Summary: NumPy-aware optimizing compiler for Python using LLVM License: BSD-2-Clause ++++++ _multibuild ++++++ --- /var/tmp/diff_new_pack.COEicv/_old 2026-02-24 15:39:34.396839528 +0100 +++ /var/tmp/diff_new_pack.COEicv/_new 2026-02-24 15:39:34.404839859 +0100 @@ -2,5 +2,6 @@ <package>test-py311</package> <package>test-py312</package> <package>test-py313</package> + <package>test-py314</package> </multibuild> ++++++ numba-0.63.1.tar.gz -> numba-0.64.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/numba-0.63.1/PKG-INFO new/numba-0.64.0/PKG-INFO --- old/numba-0.63.1/PKG-INFO 2025-12-10 00:43:49.467103500 +0100 +++ new/numba-0.64.0/PKG-INFO 2026-02-18 08:51:07.986870500 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.4 Name: numba -Version: 0.63.1 +Version: 0.64.0 Summary: compiling Python code using LLVM Home-page: https://numba.pydata.org License: BSD @@ -20,7 +20,7 @@ License-File: LICENSE License-File: LICENSES.third-party Requires-Dist: llvmlite<0.47,>=0.46.0dev0 -Requires-Dist: numpy<2.4,>=1.22 +Requires-Dist: numpy<2.5,>=1.22 Dynamic: classifier Dynamic: description Dynamic: home-page diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/numba-0.63.1/docs/source/developer/contributing.rst new/numba-0.64.0/docs/source/developer/contributing.rst --- old/numba-0.63.1/docs/source/developer/contributing.rst 2025-12-10 00:42:43.000000000 +0100 +++ new/numba-0.64.0/docs/source/developer/contributing.rst 2026-02-18 08:50:20.000000000 +0100 @@ -290,19 +290,6 @@ flake8 numba -Optionally, you may wish to setup `pre-commit hooks <https://pre-commit.com/>`_ -to automatically run ``flake8`` when you make a git commit. This can be -done by installing ``pre-commit``:: - - pip install pre-commit - -and then running:: - - pre-commit install - -from the root of the Numba repository. Now ``flake8`` will be run each time -you commit changes. You can skip this check with ``git commit --no-verify``. - Numba has started the process of using `type hints <https://www.python.org/dev/peps/pep-0484/>`_ in its code base. This will be a gradual process of extending the number of files that use type hints, as well as going from voluntary to mandatory type hints for new features. `Mypy <http://mypy-lang.org/>`_ is used for automated static checking. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/numba-0.63.1/docs/source/developer/repomap.rst new/numba-0.64.0/docs/source/developer/repomap.rst --- old/numba-0.63.1/docs/source/developer/repomap.rst 2025-12-10 00:42:43.000000000 +0100 +++ new/numba-0.64.0/docs/source/developer/repomap.rst 2026-02-18 08:50:20.000000000 +0100 @@ -19,7 +19,6 @@ installed package from git tags - :ghfile:`.flake8` - Preferences for code formatting. Files should be fixed and removed from the exception list as time allows. -- :ghfile:`.pre-commit-config.yaml` - Configuration file for pre-commit hooks. - :ghfile:`.readthedocs.yml` - Configuration file for Read the Docs. - :ghfile:`buildscripts/condarecipe.local` - Conda build recipe diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/numba-0.63.1/docs/source/reference/numpysupported.rst new/numba-0.64.0/docs/source/reference/numpysupported.rst --- old/numba-0.63.1/docs/source/reference/numpysupported.rst 2025-12-10 00:42:43.000000000 +0100 +++ new/numba-0.64.0/docs/source/reference/numpysupported.rst 2026-02-18 08:50:20.000000000 +0100 @@ -529,6 +529,7 @@ * :func:`numpy.in1d` (matching pre-1.24 behaviour without the ``kind`` keyword) * :func:`numpy.linspace` (only the 3-argument form) * :func:`numpy.logspace` (only the 3 first arguments) +* :func:`numpy.moveaxis` * :func:`numpy.nan_to_num` * :class:`numpy.ndenumerate` * :class:`numpy.ndindex` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/numba-0.63.1/docs/source/reference/support_tiers.rst new/numba-0.64.0/docs/source/reference/support_tiers.rst --- old/numba-0.63.1/docs/source/reference/support_tiers.rst 2025-12-10 00:42:43.000000000 +0100 +++ new/numba-0.64.0/docs/source/reference/support_tiers.rst 2026-02-18 08:50:20.000000000 +0100 @@ -161,7 +161,10 @@ Examples include: -* Conda and wheel packages not listed in Tier 1 +* Conda and wheel packages not listed in Tier 1: + + * ``osx-64`` (As of Numba ``0.63.*``) + * Hardware targets: * ``s390x`` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/numba-0.63.1/docs/source/release/0.64.0-notes.rst new/numba-0.64.0/docs/source/release/0.64.0-notes.rst --- old/numba-0.63.1/docs/source/release/0.64.0-notes.rst 1970-01-01 01:00:00.000000000 +0100 +++ new/numba-0.64.0/docs/source/release/0.64.0-notes.rst 2026-02-18 08:50:20.000000000 +0100 @@ -0,0 +1,133 @@ + +Version 0.64.0 (18 February 2026) +================================= + +This is a major Numba release. Numba now supports NumPy 2.4. + +Please find a summary of all noteworthy items below. + +Highlights +~~~~~~~~~~ + +Support for NumPy 2.4 +--------------------- + +Numba now supports NumPy 2.4, with the following notable changes: + +- ``np.trapz`` has been removed in NumPy 2.4. Use ``np.trapezoid`` instead + (available since NumPy 2.0). + +- ``np.in1d`` has been removed in NumPy 2.4. Use ``np.isin`` instead. + +(`PR-#10393 <https://github.com/numba/numba/pull/10393>`__) + + +NumPy Support +~~~~~~~~~~~~~ + +Add support for np.moveaxis +--------------------------- + +Support is added for NumPy ``moveaxis`` function. + +(`PR-#10366 <https://github.com/numba/numba/pull/10366>`__) + + +Bug Fixes +~~~~~~~~~ + +Fix scalar handling in ``np.all`` +--------------------------------- + +Fixed scalar handling in the ``np.all`` function. Previously, this +function would fail when called with scalar inputs. Now it properly handles +both scalar and array inputs, converting scalars to boolean values as +expected. + +(`PR-#10223 <https://github.com/numba/numba/pull/10223>`__) + +Fix scalar handling in ``np.any`` +--------------------------------- + +Fix scalar handling in ``np.any`` function. Previously, this function would +fail when called with scalar inputs. Now it properly handles both scalar +and array inputs, converting scalars to boolean values as expected. + +(`PR-#10224 <https://github.com/numba/numba/pull/10224>`__) + +Fix ``np.asfortranarray`` and ``np.ascontiguousarray`` readonly handling +------------------------------------------------------------------------ + +Fix readonly input producing readonly output even when a copy is made +using ``np.asfortranarray`` or ``np.ascontiguousarray``. + +(`PR-#10390 <https://github.com/numba/numba/pull/10390>`__) + +Support integer type promotion in Python API +-------------------------------------------- + +Fixes a segmentation fault on s390x (IBM Z) by ensuring integer types are +properly promoted to full register width in the CPU and Python API lowering +layers, as required by the SystemZ ABI. + +(`PR-#10396 <https://github.com/numba/numba/pull/10396>`__) + +Fix precision loss in integer power operations on Python 3.11 +------------------------------------------------------------- + +Fixed precision loss in integer power operations (e.g., ``x ** 2``) for large +integer values on Python 3.11. Integer results now preserve full precision +for values greater than 2^53. + +(`PR-#10398 <https://github.com/numba/numba/pull/10398>`__) + +Pull-Requests: + +* PR `#9172 <https://github.com/numba/numba/pull/9172>`_: Remove an undefined name (`munahaf <https://github.com/munahaf>`_) +* PR `#10154 <https://github.com/numba/numba/pull/10154>`_: Revert "Merge pull request #10152 from kc611/ci_fix" (`esc <https://github.com/esc>`_) +* PR `#10223 <https://github.com/numba/numba/pull/10223>`_: Fix: add scalar handling for `np.all` overload (`swap357 <https://github.com/swap357>`_) +* PR `#10224 <https://github.com/numba/numba/pull/10224>`_: Fix: scalar handling for `np.any` overload (`swap357 <https://github.com/swap357>`_) +* PR `#10256 <https://github.com/numba/numba/pull/10256>`_: GHA/ cleanup on python 3.14 official support (`swap357 <https://github.com/swap357>`_) +* PR `#10324 <https://github.com/numba/numba/pull/10324>`_: gha/ numba scheduled testing (`swap357 <https://github.com/swap357>`_) +* PR `#10339 <https://github.com/numba/numba/pull/10339>`_: Update dependency python to 3.14 (`renovate[bot] <https://github.com/apps/renovate>`_) +* PR `#10342 <https://github.com/numba/numba/pull/10342>`_: Update actions/checkout action to v6 (`renovate[bot] <https://github.com/apps/renovate>`_) +* PR `#10345 <https://github.com/numba/numba/pull/10345>`_: update numba first release checklist post `0.63.0rc1` (`swap357 <https://github.com/swap357>`_) +* PR `#10347 <https://github.com/numba/numba/pull/10347>`_: Extend PR#10344 to remove osx64 azure and some fixes (`sklam <https://github.com/sklam>`_ `swap357 <https://github.com/swap357>`_) +* PR `#10348 <https://github.com/numba/numba/pull/10348>`_: Update actions/setup-python action to v6.1.0 (`renovate[bot] <https://github.com/apps/renovate>`_) +* PR `#10351 <https://github.com/numba/numba/pull/10351>`_: remove pre-commit (`esc <https://github.com/esc>`_) +* PR `#10359 <https://github.com/numba/numba/pull/10359>`_: gha/ add version constraint for conda-libmamba-solver `<25.11` (`swap357 <https://github.com/swap357>`_) +* PR `#10362 <https://github.com/numba/numba/pull/10362>`_: Update actions/stale action to v10.1.1 (`renovate[bot] <https://github.com/apps/renovate>`_) +* PR `#10366 <https://github.com/numba/numba/pull/10366>`_: Support for np.moveaxis (`kc611 <https://github.com/kc611>`_ `ricardoV94 <https://github.com/ricardoV94>`_) +* PR `#10369 <https://github.com/numba/numba/pull/10369>`_: minor docs fix: `omp` requirement on macOS updated to match the text above (`AgnieszkaZaba <https://github.com/AgnieszkaZaba>`_) +* PR `#10371 <https://github.com/numba/numba/pull/10371>`_: Cherry pick 0.63.0 (`swap357 <https://github.com/swap357>`_) +* PR `#10378 <https://github.com/numba/numba/pull/10378>`_: Cherry pick 0.63.1 (`swap357 <https://github.com/swap357>`_) +* PR `#10382 <https://github.com/numba/numba/pull/10382>`_: Update GitHub Artifact Actions (major) (`renovate[bot] <https://github.com/apps/renovate>`_) +* PR `#10384 <https://github.com/numba/numba/pull/10384>`_: adding osx-64 to the Tier 2 listing (`esc <https://github.com/esc>`_) +* PR `#10390 <https://github.com/numba/numba/pull/10390>`_: Fix #10357 `np.asfortranarray` mutability (`swap357 <https://github.com/swap357>`_) +* PR `#10391 <https://github.com/numba/numba/pull/10391>`_: update wheel builder workflows to install pre-release llvmlite versions (`swap357 <https://github.com/swap357>`_) +* PR `#10393 <https://github.com/numba/numba/pull/10393>`_: add Numpy 2.4 support (`mscheltienne <https://github.com/mscheltienne>`_ `swap357 <https://github.com/swap357>`_) +* PR `#10396 <https://github.com/numba/numba/pull/10396>`_: Add missing type promotions for pythonapi (`MarkVeerasingam <https://github.com/MarkVeerasingam>`_) +* PR `#10398 <https://github.com/numba/numba/pull/10398>`_: Fix #9931 integer power precision issue for python3.11 (`swap357 <https://github.com/swap357>`_) +* PR `#10401 <https://github.com/numba/numba/pull/10401>`_: Fix: add main label on upload workflow (`swap357 <https://github.com/swap357>`_) +* PR `#10405 <https://github.com/numba/numba/pull/10405>`_: Update conda-incubator/setup-miniconda action to v3.3.0 (`renovate[bot] <https://github.com/apps/renovate>`_) +* PR `#10409 <https://github.com/numba/numba/pull/10409>`_: Update actions/setup-python action to v6.2.0 (`renovate[bot] <https://github.com/apps/renovate>`_) +* PR `#10411 <https://github.com/numba/numba/pull/10411>`_: Update actions/checkout action to v6.0.2 (`renovate[bot] <https://github.com/apps/renovate>`_) +* PR `#10413 <https://github.com/numba/numba/pull/10413>`_: Improve gitlog2changelog.py (`esc <https://github.com/esc>`_) +* PR `#10417 <https://github.com/numba/numba/pull/10417>`_: Fix: NumPy2.4 CI test error (`swap357 <https://github.com/swap357>`_) +* PR `#10419 <https://github.com/numba/numba/pull/10419>`_: Enh: refactor array reshaping in tests to use reshape method (`swap357 <https://github.com/swap357>`_) +* PR `#10422 <https://github.com/numba/numba/pull/10422>`_: update version support table for `0.64.0rc1` (`swap357 <https://github.com/swap357>`_) +* PR `#10423 <https://github.com/numba/numba/pull/10423>`_: Changelog 0.64 (`swap357 <https://github.com/swap357>`_) +* PR `#10438 <https://github.com/numba/numba/pull/10438>`_: update release date and version table 0.64 (`swap357 <https://github.com/swap357>`_) + +Authors: + +* `AgnieszkaZaba <https://github.com/AgnieszkaZaba>`_ +* `esc <https://github.com/esc>`_ +* `kc611 <https://github.com/kc611>`_ +* `MarkVeerasingam <https://github.com/MarkVeerasingam>`_ +* `mscheltienne <https://github.com/mscheltienne>`_ +* `munahaf <https://github.com/munahaf>`_ +* `renovate[bot] <https://github.com/apps/renovate>`_ +* `ricardoV94 <https://github.com/ricardoV94>`_ +* `sklam <https://github.com/sklam>`_ +* `swap357 <https://github.com/swap357>`_ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/numba-0.63.1/docs/source/user/installing.rst new/numba-0.64.0/docs/source/user/installing.rst --- old/numba-0.63.1/docs/source/user/installing.rst 2025-12-10 00:42:43.000000000 +0100 +++ new/numba-0.64.0/docs/source/user/installing.rst 2026-02-18 08:50:20.000000000 +0100 @@ -245,6 +245,9 @@ +----------++--------------+---------------------------+---------------------------------------------+------------------------------+-------------------+-----------------------------+ | Numba | Release date | Python | NumPy | llvmlite | LLVM | TBB | +===========+==============+===========================+=============================================+==============================+===================+=============================+ +| 0.64.0 | 2026-02-18 | 3.10.x <= version < 3.15 | 1.22 <= version < 1.27 ; | 0.46.x | 20.x | 2021.6 <= version | +| | | | 2.0 <= version < 2.5 ; | | | | ++-----------+--------------+---------------------------+---------------------------------------------+------------------------------+-------------------+-----------------------------+ | 0.63.1 | 2025-12-09 | 3.10.x <= version < 3.15 | 1.22 <= version < 1.27 ; | 0.46.x | 20.x | 2021.6 <= version | | | | | 2.0 <= version < 2.4 ; | | | | +-----------+--------------+---------------------------+---------------------------------------------+------------------------------+-------------------+-----------------------------+ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/numba-0.63.1/docs/source/user/threading-layer.rst new/numba-0.64.0/docs/source/user/threading-layer.rst --- old/numba-0.63.1/docs/source/user/threading-layer.rst 2025-12-10 00:42:43.000000000 +0100 +++ new/numba-0.64.0/docs/source/user/threading-layer.rst 2026-02-18 08:50:20.000000000 +0100 @@ -154,9 +154,8 @@ | | Windows | MS OpenMP libraries (very likely this will| | | | already exist) | | | | | -| | OSX | Either the ``intel-openmp`` package or the| -| | | ``llvm-openmp`` package | -| | | (``conda install`` the package as named). | +| | OSX | The ``llvm-openmp`` package (``$ conda | +| | (arm64) | install llvm-openmp``) | +----------------------+-----------+-------------------------------------------+ | ``workqueue`` | All | None | +----------------------+-----------+-------------------------------------------+ @@ -187,7 +186,7 @@ ``spawn`` is essentially ``fork`` followed by ``exec`` it is safe to ``spawn`` from a non-main thread, but as this cannot be differentiated from just a ``fork`` call the warning message will still be displayed. -* On OSX, the ``intel-openmp`` package is required to enable the OpenMP based +* On OSX (arm64), the ``llvm-openmp`` package is required to enable the OpenMP based threading layer. .. _setting_the_number_of_threads: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/numba-0.63.1/numba/__init__.py new/numba-0.64.0/numba/__init__.py --- old/numba-0.63.1/numba/__init__.py 2025-12-10 00:42:43.000000000 +0100 +++ new/numba-0.64.0/numba/__init__.py 2026-02-18 08:50:20.000000000 +0100 @@ -39,8 +39,8 @@ f"{numpy_version[0]}.{numpy_version[1]}.") raise ImportError(msg) - if numpy_version > (2, 3): - msg = (f"Numba needs NumPy 2.3 or less. Got NumPy " + if numpy_version > (2, 4): + msg = (f"Numba needs NumPy 2.4 or less. Got NumPy " f"{numpy_version[0]}.{numpy_version[1]}.") raise ImportError(msg) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/numba-0.63.1/numba/_version.py new/numba-0.64.0/numba/_version.py --- old/numba-0.63.1/numba/_version.py 2025-12-10 00:43:49.468761000 +0100 +++ new/numba-0.64.0/numba/_version.py 2026-02-18 08:51:07.987392700 +0100 @@ -8,11 +8,11 @@ version_json = ''' { - "date": "2025-12-09T10:17:19-0800", + "date": "2026-02-17T15:58:12-0800", "dirty": false, "error": null, - "full-revisionid": "7484a86bd9ce4d7dbc386da887f62a7bd54be597", - "version": "0.63.1" + "full-revisionid": "fd67a63b98026ebba9a7faef4ecf4b8ea5551ea8", + "version": "0.64.0" } ''' # END VERSION_JSON diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/numba-0.63.1/numba/core/base.py new/numba-0.64.0/numba/core/base.py --- old/numba-0.63.1/numba/core/base.py 2025-12-10 00:42:43.000000000 +0100 +++ new/numba-0.64.0/numba/core/base.py 2026-02-18 08:50:20.000000000 +0100 @@ -412,6 +412,7 @@ def declare_function(self, module, fndesc): fnty = self.call_conv.get_function_type(fndesc.restype, fndesc.argtypes) fn = cgutils.get_or_insert_function(module, fnty, fndesc.mangled_name) + self.apply_target_attributes(fn, fndesc.argtypes, fndesc.restype) self.call_conv.decorate_function(fn, fndesc.args, fndesc.argtypes, noalias=fndesc.noalias) if fndesc.inline: fn.attributes.add('alwaysinline') @@ -420,6 +421,13 @@ fn.attributes.discard('optnone') return fn + # Define the hook as a no-op so other contexts (like GPU) don't break + def apply_target_attributes(self, llvm_func, argtypes=None, restype=None): + """ + Hook for subclasses to apply target-specific attributes (e.g. signext). + """ + pass + def declare_external_function(self, module, fndesc): fnty = self.get_external_function_type(fndesc) fn = cgutils.get_or_insert_function(module, fnty, fndesc.mangled_name) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/numba-0.63.1/numba/core/cpu.py new/numba-0.64.0/numba/core/cpu.py --- old/numba-0.63.1/numba/core/cpu.py 2025-12-10 00:42:43.000000000 +0100 +++ new/numba-0.64.0/numba/core/cpu.py 2026-02-18 08:50:20.000000000 +0100 @@ -50,13 +50,50 @@ self.is32bit = (utils.MACHINE_BITS == 32) self._internal_codegen = codegen.JITCPUCodegen("numba.exec") - # Add ARM ABI functions from libgcc_s - if platform.machine() == 'armv7l': + # Add s390x ABI functions from libgcc_s + if platform.machine() == 's390x': ll.load_library_permanently('libgcc_s.so.1') # Map external C functions. externals.c_math_functions.install(self) + def apply_target_attributes(self, llvm_func, argtypes=None, restype=None): + """ + Implementation of caller Type Promotions for s390x ABI requirement. + See https://github.com/numba/numba/issues/9640 + + On s390x, the ABI requires that any integer argument or return + value smaller than 64 bits must be promoted to 64 bits by the caller. + The callee can then safely assume the high-order bits of the register + are correctly filled (sign-extended or zero-extended). + Without these attributes, LLVM may leave garbage in the high bits, + leading to undefined behavior (e.g., segfaults) when the callee + performs 64-bit operations on 32-bit values. + """ + if self.address_size == 64 and platform.machine() == 's390x': + def get_ext_attr(numba_ty): + """ + Map Numba types to LLVM extension attributes. + Signed integers -> signext (sign extension) + Unsigned/Booleans -> zeroext (zero extension) + """ + if isinstance(numba_ty, types.Integer): + return 'signext' if numba_ty.signed else 'zeroext' + return 'signext' # Default fallback + + # Handle Arguments: i32 and smaller must be extended to 64-bit + for i, arg in enumerate(llvm_func.args): + if isinstance(arg.type, ir.IntType) and arg.type.width < 64: + n_ty = None + if argtypes and i < len(argtypes): + n_ty = argtypes[i] + arg.add_attribute(get_ext_attr(n_ty)) + + # Handle Return Value + retty = llvm_func.return_value.type + if isinstance(retty, ir.IntType) and retty.width < 64: + llvm_func.return_value.add_attribute(get_ext_attr(restype)) + def load_additional_registries(self): # Only initialize the NRT once something is about to be compiled. The # "initialized" state doesn't need to be threadsafe, there's a lock diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/numba-0.63.1/numba/core/pythonapi.py new/numba-0.64.0/numba/core/pythonapi.py --- old/numba-0.63.1/numba/core/pythonapi.py 2025-12-10 00:42:43.000000000 +0100 +++ new/numba-0.64.0/numba/core/pythonapi.py 2026-02-18 08:50:20.000000000 +0100 @@ -1305,7 +1305,9 @@ # ------ utils ----- def _get_function(self, fnty, name): - return cgutils.get_or_insert_function(self.module, fnty, name) + fn = cgutils.get_or_insert_function(self.module, fnty, name) + self.context.apply_target_attributes(fn) + return fn def alloca_obj(self): return self.builder.alloca(self.pyobj) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/numba-0.63.1/numba/cpython/numbers.py new/numba-0.64.0/numba/cpython/numbers.py --- old/numba-0.63.1/numba/cpython/numbers.py 2025-12-10 00:42:43.000000000 +0100 +++ new/numba-0.64.0/numba/cpython/numbers.py 2026-02-18 08:50:20.000000000 +0100 @@ -240,7 +240,9 @@ exp >>= 1 a *= a - return 1.0 / r if invert else r + if invert: + return 1.0 / r + return r res = context.compile_internal(builder, int_power, sig, args) return impl_ret_untracked(context, builder, sig.return_type, res) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/numba-0.63.1/numba/cuda/tests/cudapy/test_atomics.py new/numba-0.64.0/numba/cuda/tests/cudapy/test_atomics.py --- old/numba-0.63.1/numba/cuda/tests/cudapy/test_atomics.py 2025-12-10 00:42:43.000000000 +0100 +++ new/numba-0.64.0/numba/cuda/tests/cudapy/test_atomics.py 2026-02-18 08:50:20.000000000 +0100 @@ -1272,7 +1272,7 @@ np.random.shuffle(res) res = np.asarray(res, dtype=dtype) if ndim == 2: - res.shape = (10, -1) + res = res.reshape((10, -1)) out = np.zeros_like(res) ary = np.random.randint(1, 10, size=res.shape).astype(res.dtype) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/numba-0.63.1/numba/np/arraymath.py new/numba-0.64.0/numba/np/arraymath.py --- old/numba-0.63.1/numba/np/arraymath.py 2025-12-10 00:42:43.000000000 +0100 +++ new/numba-0.64.0/numba/np/arraymath.py 2026-02-18 08:50:20.000000000 +0100 @@ -801,13 +801,23 @@ @overload(np.all) @overload_method(types.Array, "all") def np_all(a): - def flat_all(a): - for v in np.nditer(a): - if not v.item(): - return False - return True - return flat_all + # for scalar + if isinstance(a, (types.Number, types.Boolean)): + def scalar_all(a): + return bool(a) + return scalar_all + + # for array + if isinstance(a, types.Array): + def flat_all(a): + for v in np.nditer(a): + if not v.item(): + return False + return True + return flat_all + + return None @register_jitable @@ -907,13 +917,22 @@ @overload(np.any) @overload_method(types.Array, "any") def np_any(a): - def flat_any(a): - for v in np.nditer(a): - if v.item(): - return True - return False + # for scalar + if isinstance(a, (types.Number, types.Boolean)): + def scalar_any(a): + return bool(a) + return scalar_any - return flat_any + # for array + if isinstance(a, types.Array): + def flat_any(a): + for v in np.nditer(a): + if v.item(): + return True + return False + return flat_any + + return None @overload(np.average) @@ -2222,9 +2241,8 @@ return impl -@overload(np.trapz) -def np_trapz(y, x=None, dx=1.0): - +def _trapz_impl(y, x=None, dx=1.0): + """Shared implementation for both np.trapz and np.trapezoid.""" if isinstance(y, (types.Number, types.Boolean)): raise TypingError('y cannot be a scalar') elif isinstance(y, types.Array) and y.ndim == 0: @@ -2244,9 +2262,18 @@ return impl -# numpy 2.0 rename np.trapz to np.trapezoid +# np.trapz exists in NumPy < 2.4 (deprecated in 2.0, removed in 2.4) +if numpy_version < (2, 4): + @overload(np.trapz) + def np_trapz(y, x=None, dx=1.0): + return _trapz_impl(y, x, dx) + + +# np.trapezoid introduced in NumPy 2.0 as replacement for np.trapz if numpy_version >= (2, 0): - overload(np.trapezoid)(np_trapz) + @overload(np.trapezoid) + def np_trapezoid(y, x=None, dx=1.0): + return _trapz_impl(y, x, dx) @register_jitable @@ -4924,6 +4951,67 @@ return np_setxor1d_impl +# Internal helper for in1d functionality, used by isin and setdiff1d +# This is needed because np.in1d was removed in NumPy 2.4 +@register_jitable +def _in1d_impl(ar1, ar2, assume_unique=False, invert=False): + # https://github.com/numpy/numpy/blob/03b62604eead0f7d279a5a4c094743eb29647368/numpy/lib/arraysetops.py#L525 # noqa: E501 + + # Ravel both arrays, behavior for the first array could be different + ar1 = np.asarray(ar1).ravel() + ar2 = np.asarray(ar2).ravel() + + # This code is run when it would make the code significantly faster + # Sorting is also not guaranteed to work on objects but numba does + # not support object arrays. + if len(ar2) < 10 * len(ar1) ** 0.145: + if invert: + mask = np.ones(len(ar1), dtype=np.bool_) + for a in ar2: + mask &= (ar1 != a) + else: + mask = np.zeros(len(ar1), dtype=np.bool_) + for a in ar2: + mask |= (ar1 == a) + return mask + + # Otherwise use sorting + if not assume_unique: + # Equivalent to ar1, inv_idx = np.unique(ar1, return_inverse=True) + # https://github.com/numpy/numpy/blob/03b62604eead0f7d279a5a4c094743eb29647368/numpy/lib/arraysetops.py#L358C8-L358C8 # noqa: E501 + order1 = np.argsort(ar1) + aux = ar1[order1] + mask = np.empty(aux.shape, dtype=np.bool_) + mask[:1] = True + mask[1:] = aux[1:] != aux[:-1] + ar1 = aux[mask] + imask = np.cumsum(mask) - 1 + inv_idx = np.empty(mask.shape, dtype=np.intp) + inv_idx[order1] = imask + ar2 = np.unique(ar2) + + ar = np.concatenate((ar1, ar2)) + # We need this to be a stable sort, so always use 'mergesort' + # here. The values from the first array should always come before + # the values from the second array. + order = ar.argsort(kind='mergesort') + sar = ar[order] + flag = np.empty(sar.size, np.bool_) + if invert: + flag[:-1] = (sar[1:] != sar[:-1]) + else: + flag[:-1] = (sar[1:] == sar[:-1]) + flag[-1:] = invert + ret = np.empty(ar.shape, dtype=np.bool_) + ret[order] = flag + + # return ret[:len(ar1)] + if assume_unique: + return ret[:len(ar1)] + else: + return ret[inv_idx] + + @overload(np.setdiff1d) def jit_np_setdiff1d(ar1, ar2, assume_unique=False): if not (type_can_asarray(ar1) or type_can_asarray(ar2)): @@ -4941,12 +5029,11 @@ else: ar1 = np.unique(ar1) ar2 = np.unique(ar2) - return ar1[np.in1d(ar1, ar2, assume_unique=True, invert=True)] + return ar1[_in1d_impl(ar1, ar2, assume_unique=True, invert=True)] return np_setdiff1d_impl -@overload(np.in1d) def jit_np_in1d(ar1, ar2, assume_unique=False, invert=False): if not (type_can_asarray(ar1) or type_can_asarray(ar2)): raise TypingError('in1d: first two args must be array-like') @@ -4956,63 +5043,14 @@ raise TypingError('in1d: Argument "invert" must be boolean') def np_in1d_impl(ar1, ar2, assume_unique=False, invert=False): - # https://github.com/numpy/numpy/blob/03b62604eead0f7d279a5a4c094743eb29647368/numpy/lib/arraysetops.py#L525 # noqa: E501 - - # Ravel both arrays, behavior for the first array could be different - ar1 = np.asarray(ar1).ravel() - ar2 = np.asarray(ar2).ravel() - - # This code is run when it would make the code significantly faster - # Sorting is also not guaranteed to work on objects but numba does - # not support object arrays. - if len(ar2) < 10 * len(ar1) ** 0.145: - if invert: - mask = np.ones(len(ar1), dtype=np.bool_) - for a in ar2: - mask &= (ar1 != a) - else: - mask = np.zeros(len(ar1), dtype=np.bool_) - for a in ar2: - mask |= (ar1 == a) - return mask + return _in1d_impl(ar1, ar2, assume_unique, invert) - # Otherwise use sorting - if not assume_unique: - # Equivalent to ar1, inv_idx = np.unique(ar1, return_inverse=True) - # https://github.com/numpy/numpy/blob/03b62604eead0f7d279a5a4c094743eb29647368/numpy/lib/arraysetops.py#L358C8-L358C8 # noqa: E501 - order1 = np.argsort(ar1) - aux = ar1[order1] - mask = np.empty(aux.shape, dtype=np.bool_) - mask[:1] = True - mask[1:] = aux[1:] != aux[:-1] - ar1 = aux[mask] - imask = np.cumsum(mask) - 1 - inv_idx = np.empty(mask.shape, dtype=np.intp) - inv_idx[order1] = imask - ar2 = np.unique(ar2) - - ar = np.concatenate((ar1, ar2)) - # We need this to be a stable sort, so always use 'mergesort' - # here. The values from the first array should always come before - # the values from the second array. - order = ar.argsort(kind='mergesort') - sar = ar[order] - flag = np.empty(sar.size, np.bool_) - if invert: - flag[:-1] = (sar[1:] != sar[:-1]) - else: - flag[:-1] = (sar[1:] == sar[:-1]) - flag[-1:] = invert - ret = np.empty(ar.shape, dtype=np.bool_) - ret[order] = flag + return np_in1d_impl - # return ret[:len(ar1)] - if assume_unique: - return ret[:len(ar1)] - else: - return ret[inv_idx] - return np_in1d_impl +# np.in1d was removed in NumPy 2.4 +if numpy_version < (2, 4): + overload(np.in1d)(jit_np_in1d) @overload(np.isin) @@ -5028,7 +5066,7 @@ def np_isin_impl(element, test_elements, assume_unique=False, invert=False): element = np.asarray(element) - return np.in1d(element, test_elements, assume_unique=assume_unique, - invert=invert).reshape(element.shape) + return _in1d_impl(element, test_elements, assume_unique=assume_unique, + invert=invert).reshape(element.shape) return np_isin_impl diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/numba-0.63.1/numba/np/arrayobj.py new/numba-0.64.0/numba/np/arrayobj.py --- old/numba-0.63.1/numba/np/arrayobj.py 2025-12-10 00:42:43.000000000 +0100 +++ new/numba-0.64.0/numba/np/arrayobj.py 2026-02-18 08:50:20.000000000 +0100 @@ -301,6 +301,59 @@ return impl +def normalize_axis_tuple(func_name, arg_name, ndim, axis): + """Normalizes an axis argument into a tuple of non-negative integer axes.""" + raise NotImplementedError() + + +@overload(normalize_axis_tuple) +def normalize_axis_tuple_overloads(func_name, arg_name, ndim, axis): + if not isinstance(func_name, StringLiteral): + raise errors.TypingError("func_name must be a str literal.") + if not isinstance(arg_name, StringLiteral): + raise errors.TypingError("arg_name must be a str literal.") + + invalid_axis_msg = ( + f"{func_name.literal_value}: Argument {arg_name.literal_value} " + "out of bounds for dimensions of the array" + ) + + repeated_axis_msg = ( + f"{func_name.literal_value}: repeated axis in " + f"{arg_name.literal_value} argument" + ) + + if isinstance(axis, types.Integer): + + def impl(func_name, arg_name, ndim, axis): + if axis < 0: + axis += ndim + if axis < 0 or axis >= ndim: + raise ValueError(invalid_axis_msg) + + return (axis,) + + else: + axis_len = len(axis) + norm_axis_init = (0,) * axis_len + + def impl(func_name, arg_name, ndim, axis): + norm_axis = norm_axis_init + for i, ax in enumerate(axis): + if ax < 0: + ax += ndim + if ax < 0 or ax >= ndim: + raise ValueError(invalid_axis_msg) + norm_axis = tuple_setitem(norm_axis, i, ax) + + if len(set(norm_axis)) != axis_len: + raise ValueError(repeated_axis_msg) + + return norm_axis + + return impl + + @lower_builtin('getiter', types.Buffer) def getiter_array(context, builder, sig, args): [arrayty] = sig.args @@ -5172,7 +5225,11 @@ if not isinstance(output_layout, types.StringLiteral): raise errors.RequireLiteralValue(output_layout) - ret = a.copy(layout=output_layout.literal_value, ndim=max(a.ndim, 1)) + # copies are writable + ret = a.copy( + layout=output_layout.literal_value, + ndim=max(a.ndim, 1), + readonly=False) sig = ret(a, output_layout) return sig, lambda c, b, s, a: _as_layout_array( @@ -6975,19 +7032,67 @@ def impl(a, axis1, axis2): axis1 = normalize_axis("np.swapaxes", "axis1", ndim, axis1) axis2 = normalize_axis("np.swapaxes", "axis2", ndim, axis2) - - # to ensure tuple_setitem support of negative values - if axis1 < 0: - axis1 += ndim - if axis2 < 0: - axis2 += ndim - axes_tuple = tuple_setitem(axes_list, axis1, axis2) axes_tuple = tuple_setitem(axes_tuple, axis2, axis1) return np.transpose(a, axes_tuple) return impl + +@overload(np.moveaxis) +def numpy_moveaxis(a, source, destination): + if not isinstance(a, types.Array): + raise errors.TypingError('The first argument "a" must be an array') + if not ( + isinstance(source, types.Integer) + or ( + isinstance(source, types.Sequence) + and isinstance(source.dtype, types.Integer) + ) + ): + raise errors.TypingError( + 'The second argument "source" must be an integer ' + 'or sequence of integers' + ) + if not ( + isinstance(destination, types.Integer) + or ( + isinstance(destination, types.Sequence) + and isinstance(destination.dtype, types.Integer) + ) + ): + raise errors.TypingError( + 'The third argument "destination" must be an integer ' + 'or sequence of integers' + ) + + ndim = a.ndim + order_init = (1,) * a.ndim + + def impl(a, source, destination): + source = normalize_axis_tuple("np.moveaxis", "source", ndim, source) + destination = normalize_axis_tuple( + "np.moveaxis", "destination", ndim, destination + ) + if len(source) != len(destination): + raise ValueError( + "`source` and `destination` arguments must have " + "the same number of parameters" + ) + + order_list = [n for n in range(a.ndim) if n not in source] + + for dest, src in sorted(zip(destination, source)): + order_list.insert(dest, src) + + order = order_init + for i, o in enumerate(order_list): + order = tuple_setitem(order, i, o) + + return a.transpose(order) + + return impl + @register_jitable def _take_along_axis_impl( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/numba-0.63.1/numba/np/linalg.py new/numba-0.64.0/numba/np/linalg.py --- old/numba-0.63.1/numba/np/linalg.py 2025-12-10 00:42:43.000000000 +0100 +++ new/numba-0.64.0/numba/np/linalg.py 2026-02-18 08:50:20.000000000 +0100 @@ -534,26 +534,26 @@ @overload(np.dot) -def dot_2(left, right): +def dot_2(a, b): """ np.dot(a, b) """ - return dot_2_impl('np.dot()', left, right) + return dot_2_impl('np.dot()', a, b) @overload(operator.matmul) -def matmul_2(left, right): +def matmul_2(a, b): """ a @ b """ - return dot_2_impl("'@'", left, right) + return dot_2_impl("'@'", a, b) -def dot_2_impl(name, left, right): - if isinstance(left, types.Array) and isinstance(right, types.Array): +def dot_2_impl(name, a, b): + if isinstance(a, types.Array) and isinstance(b, types.Array): @intrinsic - def _impl(typingcontext, left, right): - ndims = (left.ndim, right.ndim) + def _impl(typingcontext, a, b): + ndims = (a.ndim, b.ndim) def _dot2_codegen(context, builder, sig, args): ensure_blas() @@ -570,27 +570,27 @@ else: raise AssertionError('unreachable') - if left.dtype != right.dtype: + if a.dtype != b.dtype: raise TypingError( "%s arguments must all have the same dtype" % name) if ndims == (2, 2): - return_type = types.Array(left.dtype, 2, 'C') + return_type = types.Array(a.dtype, 2, 'C') elif ndims == (2, 1) or ndims == (1, 2): - return_type = types.Array(left.dtype, 1, 'C') + return_type = types.Array(a.dtype, 1, 'C') elif ndims == (1, 1): - return_type = left.dtype + return_type = a.dtype else: raise TypingError(("%s: inputs must have compatible " "dimensions") % name) - return signature(return_type, left, right), _dot2_codegen + return signature(return_type, a, b), _dot2_codegen - if left.layout not in 'CF' or right.layout not in 'CF': + if a.layout not in 'CF' or b.layout not in 'CF': warnings.warn( "%s is faster on contiguous arrays, called on %s" % ( - name, (left, right),), NumbaPerformanceWarning) + name, (a, b),), NumbaPerformanceWarning) - return lambda left, right: _impl(left, right) + return lambda a, b: _impl(a, b) @overload(np.vdot) @@ -793,14 +793,14 @@ @overload(np.dot) -def dot_3(left, right, out): +def dot_3(a, b, out): """ np.dot(a, b, out) """ - if (isinstance(left, types.Array) and isinstance(right, types.Array) and + if (isinstance(a, types.Array) and isinstance(b, types.Array) and isinstance(out, types.Array)): @intrinsic - def _impl(typingcontext, left, right, out): + def _impl(typingcontext, a, b, out): def codegen(context, builder, sig, args): ensure_blas() @@ -813,19 +813,19 @@ return dot_3_vm(context, builder, sig, args) else: raise AssertionError('unreachable') - if left.dtype != right.dtype or left.dtype != out.dtype: + if a.dtype != b.dtype or a.dtype != out.dtype: raise TypingError( "np.dot() arguments must all have the same dtype") - return signature(out, left, right, out), codegen + return signature(out, a, b, out), codegen - if left.layout not in 'CF' or right.layout not in 'CF' or out.layout\ + if a.layout not in 'CF' or b.layout not in 'CF' or out.layout\ not in 'CF': warnings.warn( "np.vdot() is faster on contiguous arrays, called on %s" - % ((left, right),), NumbaPerformanceWarning) + % ((a, b),), NumbaPerformanceWarning) - return lambda left, right, out: _impl(left, right, out) + return lambda a, b, out: _impl(a, b, out) if config.USE_LEGACY_TYPE_SYSTEM: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/numba-0.63.1/numba/np/npyimpl.py new/numba-0.64.0/numba/np/npyimpl.py --- old/numba-0.63.1/numba/np/npyimpl.py 2025-12-10 00:42:43.000000000 +0100 +++ new/numba-0.64.0/numba/np/npyimpl.py 2026-02-18 08:50:20.000000000 +0100 @@ -868,12 +868,13 @@ return from_nb_type(nb_type) @overload(np.dtype) -def numpy_dtype(desc): +def numpy_dtype(dtype): """Provide an implementation so that numpy.dtype function can be lowered. """ - if isinstance(desc, (types.Literal, types.functions.NumberClass)): - def imp(desc): - return _make_dtype_object(desc) + if isinstance(dtype, (types.Literal, types.functions.NumberClass)): + def imp(dtype): + return _make_dtype_object(dtype) return imp else: - raise errors.NumbaTypeError('unknown dtype descriptor: {}'.format(desc)) + raise errors.NumbaTypeError( + 'unknown dtype descriptor: {}'.format(dtype)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/numba-0.63.1/numba/pycc/compiler.py new/numba-0.64.0/numba/pycc/compiler.py --- old/numba-0.63.1/numba/pycc/compiler.py 2025-12-10 00:42:43.000000000 +0100 +++ new/numba-0.64.0/numba/pycc/compiler.py 2026-02-18 08:50:20.000000000 +0100 @@ -20,7 +20,7 @@ logger = logging.getLogger(__name__) -__all__ = ['Compiler'] +__all__ = ['ModuleCompiler'] NULL = ir.Constant(lt._void_star, None) ZERO = ir.Constant(lt._int32, 0) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/numba-0.63.1/numba/testing/main.py new/numba-0.64.0/numba/testing/main.py --- old/numba-0.63.1/numba/testing/main.py 2025-12-10 00:42:43.000000000 +0100 +++ new/numba-0.64.0/numba/testing/main.py 2026-02-18 08:50:20.000000000 +0100 @@ -260,7 +260,7 @@ parser.add_argument('-g', '--gitdiff', dest='gitdiff', type=git_diff_str, default=False, nargs='?', help=('Run tests from changes made against ' - 'origin/release0.63 as identified by `git diff`. ' + 'origin/release0.64 as identified by `git diff`. ' 'If set to "ancestor", the diff compares ' 'against the common ancestor.')) return parser @@ -452,9 +452,9 @@ path = os.path.join('numba', 'tests') if use_common_ancestor: print(f"Git diff by common ancestor") - target = 'origin/release0.63...HEAD' + target = 'origin/release0.64...HEAD' else: - target = 'origin/release0.63..HEAD' + target = 'origin/release0.64..HEAD' gdiff_paths = repo.git.diff(target, path, name_only=True).split() # normalise the paths as they are unix style from repo.git.diff gdiff_paths = [os.path.normpath(x) for x in gdiff_paths] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/numba-0.63.1/numba/tests/npyufunc/test_dufunc.py new/numba-0.64.0/numba/tests/npyufunc/test_dufunc.py --- old/numba-0.63.1/numba/tests/npyufunc/test_dufunc.py 2025-12-10 00:42:43.000000000 +0100 +++ new/numba-0.64.0/numba/tests/npyufunc/test_dufunc.py 2026-02-18 08:50:20.000000000 +0100 @@ -661,7 +661,7 @@ def test_numpy_identityless_reduction_noncontig_unaligned(self): a = np.empty((3 * 4 * 5 * 8 + 1,), dtype='i1') a = a[1:].view(dtype='f8') - a.shape = (3, 4, 5) + a = a.reshape((3, 4, 5)) a = a[1:, 1:, 1:] self.check_identityless_reduction(a) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/numba-0.63.1/numba/tests/test_array_methods.py new/numba-0.64.0/numba/tests/test_array_methods.py --- old/numba-0.63.1/numba/tests/test_array_methods.py 2025-12-10 00:42:43.000000000 +0100 +++ new/numba-0.64.0/numba/tests/test_array_methods.py 2026-02-18 08:50:20.000000000 +0100 @@ -752,11 +752,55 @@ self.check_bad_array(np_asfortranarray) self.check_ascontiguousarray_scalar(np_asfortranarray) + def test_np_asfortranarray_readonly(self): + # Test for issue #10357: writeable if copied, else readonly preserved + pyfunc = np_asfortranarray + cfunc = njit(pyfunc) + + def check(arr, set_readonly=True): + if set_readonly: + arr.flags.writeable = False + expected = pyfunc(arr) + got = cfunc(arr) + self.assertPreciseEqual(expected, got) + self.assertEqual(got.flags.writeable, expected.flags.writeable) + + # A->F 2D readonly (copy made) - broadcast_to is already readonly + check(np.broadcast_to(np.zeros(2), (5, 2)), set_readonly=False) + # F->F 2D readonly (no copy, preserve readonly) + check(np.array([[1, 2], [3, 4], [5, 6]], order='F')) + # C->F 2D readonly (copy made) + check(np.array([[1, 2], [3, 4], [5, 6]], order='C')) + # C->F 1D readonly (1D special, no copy) + check(np.array([1, 2, 3, 4, 5], order='C')) + def test_np_ascontiguousarray(self): self.check_layout_dependent_func(np_ascontiguousarray) self.check_bad_array(np_asfortranarray) self.check_ascontiguousarray_scalar(np_ascontiguousarray) + def test_np_ascontiguousarray_readonly(self): + # Test for PR #10390: writeable if copied, else readonly preserved + pyfunc = np_ascontiguousarray + cfunc = njit(pyfunc) + + def check(arr, set_readonly=True): + if set_readonly: + arr.flags.writeable = False + expected = pyfunc(arr) + got = cfunc(arr) + self.assertPreciseEqual(expected, got) + self.assertEqual(got.flags.writeable, expected.flags.writeable) + + # A->C 2D readonly (copy made) - broadcast_to.T is already readonly + check(np.broadcast_to(np.zeros(2), (5, 2)).T, set_readonly=False) + # C->C 2D readonly (no copy, preserve readonly) + check(np.array([[1, 2], [3, 4], [5, 6]], order='C')) + # F->C 2D readonly (copy made) + check(np.array([[1, 2], [3, 4], [5, 6]], order='F')) + # F->C 1D readonly (1D special, no copy) + check(np.array([1, 2, 3, 4, 5], order='F')) + def check_np_frombuffer_allocated(self, pyfunc): cfunc = njit(pyfunc) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/numba-0.63.1/numba/tests/test_array_reductions.py new/numba-0.64.0/numba/tests/test_array_reductions.py --- old/numba-0.63.1/numba/tests/test_array_reductions.py 2025-12-10 00:42:43.000000000 +0100 +++ new/numba-0.64.0/numba/tests/test_array_reductions.py 2026-02-18 08:50:20.000000000 +0100 @@ -238,6 +238,52 @@ check(arr) check(arr[::-1]) + def test_array_all(self): + cfunc = jit(nopython=True)(array_all) + + def check(arg): + expected = array_all(arg) + got = cfunc(arg) + self.assertPreciseEqual(got, expected) + + # Test numpy array cases + check(np.array([True, True, True])) + check(np.array([True, False, True])) + check(np.array([1.0, 2.0, 3.0])) + check(np.array([0.0, 1.0, 2.0])) + + with self.assertTypingError() as e: + cfunc('hello') + + def test_np_all(self): + cfunc = jit(nopython=True)(array_all_global) + + def check(arg): + expected = array_all_global(arg) + got = cfunc(arg) + self.assertPreciseEqual(got, expected) + + # Test numpy scalar cases + check(np.float64(0.0)) + check(np.float64(0.2)) + check(np.bool_(True)) + check(np.bool_(False)) + + # Test special values + check(np.nan) + check(np.inf) + check(-np.inf) + check(-0.0) + + # Test numpy array cases + check(np.array([True, True, True])) + check(np.array([True, False, True])) + check(np.array([1.0, 2.0, 3.0])) + check(np.array([0.0, 1.0, 2.0])) + + with self.assertTypingError() as e: + cfunc([1,2,3]) + def test_any_basic(self, pyfunc=array_any): cfunc = jit(nopython=True)(pyfunc) def check(arr): @@ -255,6 +301,51 @@ check(arr) check(arr[::-1]) + def test_array_any(self): + cfunc = jit(nopython=True)(array_any) + def check(arg): + expected = array_any(arg) + got = cfunc(arg) + self.assertPreciseEqual(got, expected) + + # Test numpy array cases + check(np.array([True, True, True])) + check(np.array([True, False, True])) + check(np.array([1.0, 2.0, 3.0])) + check(np.array([0.0, 1.0, 2.0])) + + with self.assertTypingError() as e: + cfunc('hello') + + def test_np_any(self): + cfunc = jit(nopython=True)(array_any_global) + + def check(arg): + expected = array_any_global(arg) + got = cfunc(arg) + self.assertPreciseEqual(got, expected) + + # Test numpy scalar cases + check(np.float64(0.0)) + check(np.float64(0.2)) + check(np.bool_(True)) + check(np.bool_(False)) + + # Test special values + check(np.nan) + check(np.inf) + check(-np.inf) + check(-0.0) + + # Test numpy array cases + check(np.array([True, True, True])) + check(np.array([True, False, True])) + check(np.array([1.0, 2.0, 3.0])) + check(np.array([0.0, 1.0, 2.0])) + + with self.assertTypingError() as e: + cfunc([1,2,3]) + def test_sum_basic(self): self.check_reduction_basic(array_sum) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/numba-0.63.1/numba/tests/test_exceptions.py new/numba-0.64.0/numba/tests/test_exceptions.py --- old/numba-0.63.1/numba/tests/test_exceptions.py 2025-12-10 00:42:43.000000000 +0100 +++ new/numba-0.64.0/numba/tests/test_exceptions.py 2026-02-18 08:50:20.000000000 +0100 @@ -189,7 +189,7 @@ self.check_against_python(flags, pyfunc, cfunc, MyError, 1) self.check_against_python(flags, pyfunc, cfunc, ValueError, 2) self.check_against_python(flags, pyfunc, cfunc, - np.linalg.linalg.LinAlgError, 3) + np.linalg.LinAlgError, 3) def test_raise_class_nopython(self): self.check_raise_class(flags=no_pyobj_flags) @@ -207,7 +207,7 @@ self.check_against_python(flags, pyfunc, cfunc, clazz, 1) self.check_against_python(flags, pyfunc, cfunc, ValueError, 2) self.check_against_python(flags, pyfunc, cfunc, - np.linalg.linalg.LinAlgError, 3) + np.linalg.LinAlgError, 3) def test_raise_instance_objmode(self): self.check_raise_instance(flags=force_pyobj_flags) @@ -374,7 +374,7 @@ self.check_against_python(flags, pyfunc, cfunc, ValueError, 2, 'world') self.check_against_python(flags, pyfunc, cfunc, - np.linalg.linalg.LinAlgError, 3, 'linalg') + np.linalg.LinAlgError, 3, 'linalg') def test_raise_instance_with_runtime_args_objmode(self): self.check_raise_instance_with_runtime_args(flags=force_pyobj_flags) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/numba-0.63.1/numba/tests/test_import.py new/numba-0.64.0/numba/tests/test_import.py --- old/numba-0.63.1/numba/tests/test_import.py 2025-12-10 00:42:43.000000000 +0100 +++ new/numba-0.64.0/numba/tests/test_import.py 2026-02-18 08:50:20.000000000 +0100 @@ -1,6 +1,7 @@ import unittest from numba.tests.support import TestCase, run_in_subprocess from numba.core import utils +import os class TestNumbaImport(TestCase): @@ -104,7 +105,7 @@ # See: https://github.com/numba/numba/issues/6831 # bug in setuptools/packaging causing a deprecation warning flags = ["-Werror", "-Wignore::DeprecationWarning:packaging.version:"] - run_in_subprocess(code, flags) + run_in_subprocess(code, flags, env=os.environ.copy()) def test_import_star(self): # checks that "from numba import *" works. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/numba-0.63.1/numba/tests/test_np_functions.py new/numba-0.64.0/numba/tests/test_np_functions.py --- old/numba-0.63.1/numba/tests/test_np_functions.py 2025-12-10 00:42:43.000000000 +0100 +++ new/numba-0.64.0/numba/tests/test_np_functions.py 2026-02-18 08:50:20.000000000 +0100 @@ -478,6 +478,10 @@ return np.swapaxes(a, a1, a2) +def moveaxis(a, source, destination): + return np.moveaxis(a, source, destination) + + def nan_to_num(X, copy=True, nan=0.0, posinf=None, neginf=None): return np.nan_to_num(X, copy=copy, nan=nan, posinf=posinf, neginf=neginf) @@ -2626,7 +2630,7 @@ # check axis handling for multidimensional empty arrays a = np.array([]) - a.shape = (3, 2, 1, 0) + a = a.reshape((3, 2, 1, 0)) # include this with some other empty data structures for arr in a, (), np.array([]): @@ -2645,7 +2649,7 @@ # check axis handling for multidimensional empty arrays a = np.array([]) - a.shape = (3, 2, 1, 0) + a = a.reshape((3, 2, 1, 0)) # include this with some other empty data structures for arr in a, (), np.array([]): @@ -4155,6 +4159,7 @@ def test_np_trapezoid_basic(self): self.test_np_trapz_basic(pyfunc=np_trapezoid) + @unittest.skipIf(numpy_version >= (2, 4), "np.trapz removed in NumPy 2.4+") def test_np_trapz_basic(self, pyfunc=np_trapz): cfunc = jit(nopython=True)(pyfunc) _check = partial(self._check_output, pyfunc, cfunc) @@ -4193,6 +4198,7 @@ def test_np_trapezoid_x_basic(self): self.test_np_trapz_x_basic(pyfunc=np_trapezoid_x) + @unittest.skipIf(numpy_version >= (2, 4), "np.trapz removed in NumPy 2.4+") def test_np_trapz_x_basic(self, pyfunc=np_trapz_x): cfunc = jit(nopython=True)(pyfunc) _check = partial(self._check_output, pyfunc, cfunc) @@ -4255,6 +4261,7 @@ def test_trapezoid_numpy_questionable(self): self.test_trapz_numpy_questionable(pyfunc=np_trapezoid) + @unittest.skipIf(numpy_version >= (2, 4), "np.trapz removed in NumPy 2.4+") @unittest.skip('NumPy behaviour questionable') def test_trapz_numpy_questionable(self, pyfunc=np_trapz): # https://github.com/numpy/numpy/issues/12858 @@ -4273,6 +4280,7 @@ def test_np_trapezoid_dx_basic(self): self.test_np_trapz_dx_basic(pyfunc=np_trapezoid_dx) + @unittest.skipIf(numpy_version >= (2, 4), "np.trapz removed in NumPy 2.4+") def test_np_trapz_dx_basic(self, pyfunc=np_trapz_dx): cfunc = jit(nopython=True)(pyfunc) _check = partial(self._check_output, pyfunc, cfunc) @@ -4322,6 +4330,7 @@ def test_np_trapezoid_x_dx_basic(self): self.test_np_trapz_x_dx_basic(pyfunc=np_trapezoid_x_dx) + @unittest.skipIf(numpy_version >= (2, 4), "np.trapz removed in NumPy 2.4+") def test_np_trapz_x_dx_basic(self, pyfunc=np_trapz_x_dx): cfunc = jit(nopython=True)(pyfunc) _check = partial(self._check_output, pyfunc, cfunc) @@ -4350,6 +4359,7 @@ def test_np_trapezoid_x_dx_exceptions(self): self.test_np_trapz_x_dx_exceptions(pyfunc=np_trapezoid_x_dx) + @unittest.skipIf(numpy_version >= (2, 4), "np.trapz removed in NumPy 2.4+") def test_np_trapz_x_dx_exceptions(self, pyfunc=np_trapz_x_dx): cfunc = jit(nopython=True)(pyfunc) @@ -6258,6 +6268,74 @@ self.assertIn('np.swapaxes: Argument axis2 out of bounds', str(raises.exception)) + def test_moveaxis_basic(self): + pyfunc = moveaxis + cfunc = jit(nopython=True)(pyfunc) + + a = np.arange(120).reshape(1, 2, 3, 4, 5) + + for source, destination in ( + (0, -1), + (1, 3), + ((0, 1), (-1, -2)), + ((0, 1), (-2, -1)), + ((1, -3), (-2, 4)), + ): + expected = pyfunc(a, source, destination) + got = cfunc(a, source, destination) + self.assertPreciseEqual(expected, got) + + def test_moveaxis_exception(self): + pyfunc = moveaxis + cfunc = jit(nopython=True)(pyfunc) + + # Exceptions leak references + self.disable_leak_check() + + with self.assertRaises(TypingError) as raises: + cfunc('abc', 0, 1) + + self.assertIn('The first argument "a" must be an array', + str(raises.exception)) + + with self.assertRaises(TypingError) as raises: + cfunc(np.arange(4), 'abc', 0) + + self.assertIn( + 'second argument "source" must be an integer or sequence', + str(raises.exception)) + + with self.assertRaises(TypingError) as raises: + cfunc(np.arange(4), 0, 'abc') + + self.assertIn( + 'third argument "destination" must be an integer or sequence', + str(raises.exception)) + + with self.assertRaises(ValueError) as raises: + cfunc(np.arange(4), 1, 0) + + self.assertIn('np.moveaxis: Argument source out of bounds', + str(raises.exception)) + + with self.assertRaises(ValueError) as raises: + cfunc(np.arange(8).reshape(2, 4), (0, 1), (1, -3,)) + + self.assertIn('np.moveaxis: Argument destination out of bounds', + str(raises.exception)) + + with self.assertRaises(ValueError) as raises: + cfunc(np.arange(8).reshape(2, 4), (0, 0), (0, 1)) + + self.assertIn('np.moveaxis: repeated axis in source argument', + str(raises.exception)) + + with self.assertRaises(ValueError) as raises: + cfunc(np.arange(8).reshape(2, 4), (0, 1), (1, -1)) + + self.assertIn('np.moveaxis: repeated axis in destination argument', + str(raises.exception)) + def test_take_along_axis(self): a = np.arange(24).reshape((3, 1, 4, 2)) @@ -6651,6 +6729,7 @@ yield [2, 3], np.arange(20) # Test the "sorting" method. yield [2, 3], np.tile(np.arange(5), 4) + @unittest.skipIf(numpy_version >= (2, 4), "np.in1d removed in NumPy 2.4+") def test_in1d_2(self): np_pyfunc = np_in1d_2 np_nbfunc = njit(np_pyfunc) @@ -6667,6 +6746,7 @@ for a, b in self._in1d_arrays(): check(a, b) + @unittest.skipIf(numpy_version >= (2, 4), "np.in1d removed in NumPy 2.4+") def test_in1d_3a(self): np_pyfunc = np_in1d_3a np_nbfunc = njit(np_pyfunc) @@ -6685,6 +6765,7 @@ if len(np.unique(a)) == len(a) and len(np.unique(b)) == len(b): check(a, b, assume_unique=True) + @unittest.skipIf(numpy_version >= (2, 4), "np.in1d removed in NumPy 2.4+") def test_in1d_3b(self): np_pyfunc = np_in1d_3b np_nbfunc = njit(np_pyfunc) @@ -6702,6 +6783,7 @@ check(a, b, invert=False) check(a, b, invert=True) + @unittest.skipIf(numpy_version >= (2, 4), "np.in1d removed in NumPy 2.4+") def test_in1d_4(self): np_pyfunc = np_in1d_4 np_nbfunc = njit(np_pyfunc) @@ -6722,6 +6804,7 @@ check(a, b, assume_unique=True, invert=False) check(a, b, assume_unique=True, invert=True) + @unittest.skipIf(numpy_version >= (2, 4), "np.in1d removed in NumPy 2.4+") def test_in1d_errors(self): np_pyfunc = np_in1d_4 np_nbfunc = njit(np_pyfunc) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/numba-0.63.1/numba/tests/test_operators.py new/numba-0.64.0/numba/tests/test_operators.py --- old/numba-0.63.1/numba/tests/test_operators.py 2025-12-10 00:42:43.000000000 +0100 +++ new/numba-0.64.0/numba/tests/test_operators.py 2026-02-18 08:50:20.000000000 +0100 @@ -1336,6 +1336,17 @@ self.run_binary(pyfunc, control_signed, samples, signed_pairs, **extra_cast) + def test_pow_precision(self): + @njit + def pow2(x): + return x ** 2 + + x = 94906267 + expected = x * x + result = pow2(x) + self.assertEqual(result, expected) + self.assertEqual(result, pow2.py_func(x)) + def test_truediv(self): def control(a, b): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/numba-0.63.1/numba/tests/test_runtests.py new/numba-0.64.0/numba/tests/test_runtests.py --- old/numba-0.63.1/numba/tests/test_runtests.py 2025-12-10 00:42:43.000000000 +0100 +++ new/numba-0.64.0/numba/tests/test_runtests.py 2026-02-18 08:50:20.000000000 +0100 @@ -218,12 +218,12 @@ pipe_yml = yaml.load(data, Loader=Loader) templates = pipe_yml['jobs'] - # first look at the items in the first two templates, this is osx/linux + # first look at the items in the first template, this is linux. start_indexes = [] - for tmplt in templates[:2]: - matrix = tmplt['parameters']['matrix'] - for setup in matrix.values(): - start_indexes.append(setup['TEST_START_INDEX']) + tmplt = templates[0] + matrix = tmplt['parameters']['matrix'] + for setup in matrix.values(): + start_indexes.append(setup['TEST_START_INDEX']) # next look at the items in the windows only template winpath = ['..', '..', 'buildscripts', 'azure', 'azure-windows.yml'] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/numba-0.63.1/numba.egg-info/PKG-INFO new/numba-0.64.0/numba.egg-info/PKG-INFO --- old/numba-0.63.1/numba.egg-info/PKG-INFO 2025-12-10 00:43:49.000000000 +0100 +++ new/numba-0.64.0/numba.egg-info/PKG-INFO 2026-02-18 08:51:07.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.4 Name: numba -Version: 0.63.1 +Version: 0.64.0 Summary: compiling Python code using LLVM Home-page: https://numba.pydata.org License: BSD @@ -20,7 +20,7 @@ License-File: LICENSE License-File: LICENSES.third-party Requires-Dist: llvmlite<0.47,>=0.46.0dev0 -Requires-Dist: numpy<2.4,>=1.22 +Requires-Dist: numpy<2.5,>=1.22 Dynamic: classifier Dynamic: description Dynamic: home-page diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/numba-0.63.1/numba.egg-info/SOURCES.txt new/numba-0.64.0/numba.egg-info/SOURCES.txt --- old/numba-0.63.1/numba.egg-info/SOURCES.txt 2025-12-10 00:43:49.000000000 +0100 +++ new/numba-0.64.0/numba.egg-info/SOURCES.txt 2026-02-18 08:51:07.000000000 +0100 @@ -116,6 +116,7 @@ docs/source/release/0.62.1-notes.rst docs/source/release/0.63.0-notes.rst docs/source/release/0.63.1-notes.rst +docs/source/release/0.64.0-notes.rst docs/source/user/5minguide.rst docs/source/user/cfunc.rst docs/source/user/cli.rst diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/numba-0.63.1/numba.egg-info/requires.txt new/numba-0.64.0/numba.egg-info/requires.txt --- old/numba-0.63.1/numba.egg-info/requires.txt 2025-12-10 00:43:49.000000000 +0100 +++ new/numba-0.64.0/numba.egg-info/requires.txt 2026-02-18 08:51:07.000000000 +0100 @@ -1,2 +1,2 @@ llvmlite<0.47,>=0.46.0dev0 -numpy<2.4,>=1.22 +numpy<2.5,>=1.22 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/numba-0.63.1/setup.py new/numba-0.64.0/setup.py --- old/numba-0.63.1/setup.py 2025-12-10 00:42:43.000000000 +0100 +++ new/numba-0.64.0/setup.py 2026-02-18 08:50:20.000000000 +0100 @@ -23,7 +23,7 @@ max_python_version = "3.15" # exclusive min_numpy_build_version = "2.0.0rc1" min_numpy_run_version = "1.22" -max_numpy_run_version = "2.4" +max_numpy_run_version = "2.5" min_llvmlite_version = "0.46.0dev0" max_llvmlite_version = "0.47"
