Version 0.66.0 (TBD) ==================== This is a major Numba release. Numba now upgrades to llvmlite 0.48 with LLVM 22 and restores ``sys.monitoring`` on Python 3.14.4 and later. This release also adds support for typed ``set`` containers and multi-dimensional fancy indexing. Please note that the Intel SVML library remains unsupported as of this release. This loss of support was first noted in Numba 0.62.0 and was caused by the SVML patch not applying cleanly to the LLVM 20 code base when upgrading llvmlite. The impact is a loss of performance in cases where SVML would previously have been used. This will be addressed in a future release. Please find a summary of all noteworthy items below. Highlights ~~~~~~~~~~ Add support for typed ``set`` containers ---------------------------------------- Typed ``set`` containers have now been introduced in Numba. This can be initialised using ``numba.typed.Set`` and supports a subset of the Python set API. The following set methods are currently supported: - ``len(set())`` - ``set().add()`` - ``set().discard()`` - ``set().__contains__()`` - ``set().__iter__()`` - ``set().__eq__()`` For more details, see the ::ref::`Numba documentation `. (`PR-#10131 `__) Add support for Fancy Indexing with Multiple Multi-Dimensional Array Indices in Numba ------------------------------------------------------------------------------------- This PR adds complete support for fancy indexing with multiple array indices and/or multidimensional array indices, in accordance with NumPy semantics. Cases that were previously unsupported, such as using multiple fancy indices simultaneously or using multidimensional fancy index arrays, are now fully supported along with inclusion of ``None`` / ``np.newaxis`` for additional resulting dimensions. For more details, and example usage see the ::ref::`Numba documentation `. (`PR-#10432 `__) Improvements ~~~~~~~~~~~~ Added traceback printing capability while NRT debugging ------------------------------------------------------- This improvement adds the capability to print the traceback of the NRT incref and decref calls. This adds a flag ``NUMBA_DEBUG_NRT_STACK_LIMIT`` that helps user configure the stack limit for traceback. By default, the stack limit is set to 0, which means no traceback will be printed. Setting the stack limit to a positive integer will enable traceback printing up to that many frames. This flag is only effective when the NRT debugging mode is enabled. i.e when the environment variable ``NUMBA_DEBUG_NRT`` is set to a non-empty value. Otherwise, the flag will be ignored and no traceback will be printed regardless of its value. Note that this functionality isn't cache friendly, so it should be used with caution. It changes ABI call interface so users are required to clean the cache and recompile their code after setting the flag. (`PR-#8704 `__) Use ``ctypes`` instead of NumPy for checking the size of C types ---------------------------------------------------------------- This change replaces the use of NumPy's ``dtype`` to check the size of C types with the use of Python's built-in ``ctypes`` library. (`PR-#10467 `__) Static ``__all__`` declarations ------------------------------- ``numba.__all__`` and ``numba.core.errors.__all__`` are now statically defined. This improves compatibility with type-checkers and IDE tooling, fixing missing autocomplete suggestions and false-positive diagnostics. (`PR-#10478 `__) Shifted ``NPDatetime`` and ``NPTimedelta`` to ``numba.np.types.datetime`` module. --------------------------------------------------------------------------------- This PR moves the definitions of ``NPDatetime`` and ``NPTimedelta`` from ``numba.core.types`` to ``numba.np.types.datetime``. This change is part of a larger effort to refactor the NumPy support in Numba and to better organize the codebase. The datatypes can still be accessed via ``numba.core.types`` for backward compatibility. (`PR-#10489 `__) Removed NumPy based Unicode Character Sequence type width detection and indexing -------------------------------------------------------------------------------- This PR removes the dependency of CPython module on NumPy for automatic detection of width of the Unicode Characters. This functionality is now provided by the ``ctypes`` module. (`PR-#10490 `__) Accelerate Processing for Large Control Flow Graphs --------------------------------------------------- The asymptotic runtime of the algorithm to compute dominators in the control flow graph (CFG) is significantly improved. It now uses a memoization technique to avoid re-computing results by deriving the dominators from the immediate dominators as determined by the CHK (Cooper, Harvey & Kennedy) algorithm. This has a profound effect on the runtime of the CFG analysis for programs with large CFGs. (`PR-#10494 `__) Type annotations for ``jit``, ``njit``, ``cfunc``, and ``jit_module`` --------------------------------------------------------------------- Numba now ships type annotations for the ``jit``, ``njit``, and ``cfunc`` decorators, plus ``jit_module``. This improves type checker and IDE support for these APIs. (`PR-#10505 `__) Removed legacy NRT reference pruning pass ``removerefctpass`` ------------------------------------------------------------- The NRT reference pruning pass ``removerefctpass`` has been removed as it is no longer valid. It depends on an old assumption of Numba, removing refcounts (deemed unnecessary) from functions that return array object, take arguments that need refcounting except array or call function(s) that return refcounted object. Hence making it such that the function will not capture or create references that extend the lifetime of any refcounted objects beyond the lifetime of the function. (`PR-#10511 `__) Performance Improvements and Changes ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Precompute variable assignments ------------------------------- Significantly improved compilation time for functions with many singly-assigned variables. (`PR-#10387 `__) Bug Fixes ~~~~~~~~~ Fix comparison between ``Optional`` and ``None`` ------------------------------------------------ Comparisons ``==`` (``operator.eq``) and ``!=`` (``operator.ne``) between ``Optional`` and ``None`` are now handled correctly. Also, comparisons of any type other than ``Optional`` with ``None`` now yield a boolean literal. (`PR-#10418 `__) Fix ZeroDivisionError for empty arrays in ``np.mean`` ----------------------------------------------------- Fixed a ``ZeroDivisionError`` that occurred when passing an empty array to the ``np.mean`` function. Empty arrays are now handled correctly and return ``nan`` as expected. (`PR-#10469 `__) Fix scalar handling in ``np.std`` --------------------------------- Fix scalar handling in ``np.std`` function. Previously, this function would fail when called with scalar inputs. Now scalar arguments are handled properly: - Integer and boolean inputs return ``float64(0.0)`` - Float and complex inputs preserve the input dtype (e.g., ``np.float32`` in returns ``float32(0.0)``) (`PR-#10493 `__) arraymath: add temporal scalar support for np.min, np.max, np.all, np.any and np.mean. -------------------------------------------------------------------------------------- Fix temporal scalar handling in ``np.min``, ``np.max``, ``np.all``, ``np.any`` and ``np.mean`` functions. Previously, these functions would fail when called with temporal scalar inputs. They now properly handle both temporal scalar, scalar and array inputs, returning the original value when a temporal scalar is provided. (`PR-#10533 `__) Fix 1D pndindex error --------------------- Made pndindex not force the use of a tuple for 1D. (`PR-#10587 `__) Fix crash when running coverage with the ``sysmon`` core -------------------------------------------------------- Fixed a ``TypeError`` that occurred when using ``NUMBA_JIT_COVERAGE=1`` with ``coverage >= 7.13.1``, where the ``sysmon`` core (default on Python 3.14) injects a ``tool_id`` keyword argument that ``NumbaTracer`` did not previously accept. (`PR-#10604 `__) Changes ~~~~~~~ Remove ``NumPy AVX512_SKX support detected`` from ``numba -s`` output --------------------------------------------------------------------- The ``NumPy AVX512_SKX support detected`` field has been removed from the ``numba -s`` (system information) output. This field was added to provide debug information for an AVX512_SKX accuracy bug that can no longer be reproduced. (`PR-#10444 `__) Use public ``PyMonitoring_*`` C API for ``sys.monitoring`` on Python 3.13+ -------------------------------------------------------------------------- Numba's dispatcher integration with ``sys.monitoring`` on Python 3.13 and later now goes through the public ``PyMonitoring_*`` C API instead of CPython internal headers. This restores ``sys.monitoring`` support on Python 3.14.4 and newer (`#10538 `_), which had been disabled due to ABI changes in interpreter internals Numba previously relied on. ``NUMBA_ENABLE_SYS_MONITORING`` again takes effect on those versions and the associated ``UserWarning`` is no longer emitted. The Python 3.12 code path is unchanged. (`PR-#10578 `__) Update LLVM IR parameter attributes for LLVM 22 compatibility ------------------------------------------------------------- Numba now emits ``captures(none)`` instead of the deprecated ``nocapture`` parameter attribute when generating LLVM IR. This change is required for compatibility with LLVM 22 and the accompanying llvmlite upgrade (`numba/llvmlite#1421 `_). (`PR-#10630 `__) Documentation Changes ~~~~~~~~~~~~~~~~~~~~~ Document Tier 1.5 support policy -------------------------------- The :ref:`Support Tiers ` documentation now describes a new "Tier 1.5" category covering experimental releases for emerging release configurations. This support tier currently includes the previously released Python 3.14 free-threading builds. (`PR-#10548 `__) Remove Gitter ------------- References to the Numba Gitter channels have been removed from the documentation and source code. Users seeking help should use the `Numba Discourse forum `_ instead. (`PR-#10599 `__) Update contribution and coding convention guides ------------------------------------------------ Consolidated coding style and convention documentation into the contribution guide. Added a best practices section in the new ``docs/source/developer/coding_guidelines.rst``, aimed at both contributors and code reviewers. (`PR-#10602 `__) Pull-Requests: * PR `#8704 `_: Added traceback printing capability while NRT debugging (`kc611 `_) * PR `#10131 `_: Added initial typed set implementation based on typed dict implementation (Kaustubh Milind Chaudhari `kc611 `_ `swap357 `_) * PR `#10387 `_: Precompute variable assignments (`esc `_ `JonAnCla `_ `sklam `_) * PR `#10418 `_: fix and test for 10414 (`esc `_) * PR `#10432 `_: Add support for Fancy Indexing in Numba (`kc611 `_ `sklam `_ `stuartarchibald `_) * PR `#10444 `_: CI: remove avx512 disabling logic from test steps (`swap357 `_) * PR `#10467 `_: Use `ctypes.itemsize()` to determine datatype length instead of NumPy `.itemsizes` attribute (`kc611 `_) * PR `#10469 `_: Fix ZeroDivisionError for np.mean([]) (`auderson `_ `swap357 `_) * PR `#10478 `_: static `__all__` (`jorenham `_) * PR `#10482 `_: fix `RecursionError` on large, generated CFGs (`esc `_) * PR `#10484 `_: Fix jit decorator docstring formatting (`kyleaoman `_) * PR `#10489 `_: Shifted Numpy Datetime to numba.np module (`esc `_ `kc611 `_) * PR `#10490 `_: Removed NumPy based unicode charseq type width detection and indexing (Kaustubh Milind Chaudhari) * PR `#10493 `_: add scalar handling for np.std overload (Part of #10408) (`ElijahKas0 `_) * PR `#10494 `_: Accelerate CFG processing (`esc `_ `JonAnCla `_) * PR `#10496 `_: update llvmlite version to 0.48.0dev (`swap357 `_) * PR `#10499 `_: Fix swapped shapes in slice assignment error message - Fixes #10402 (`Meenakshi-1802 `_) * PR `#10500 `_: Pin pypa/gh-action-pypi-publish action to ed0c539 (`renovate[bot] `_) * PR `#10503 `_: bump ubuntu image for RTD (`esc `_) * PR `#10505 `_: type annotations for `jit`, `njit`, `cfunc`, and `jit_module` (`jorenham `_ `swap357 `_) * PR `#10507 `_: update release date and version support table 0.65 (`swap357 `_) * PR `#10508 `_: update `core/types/__init__.pyi` typing stubs (`jorenham `_) * PR `#10510 `_: remove Python 2 `__nonzero__` methods (`jorenham `_) * PR `#10511 `_: Removed special NRT refcount removal (`kc611 `_) * PR `#10512 `_: Cherry pick 0.65.0 (`swap357 `_) * PR `#10513 `_: type annotations for `numba.core.abstract.*` (`jorenham `_) * PR `#10515 `_: unique overload function names in `numba.cpython` (`jorenham `_) * PR `#10516 `_: rename classmethod param from ``self`` to ``cls`` in ``cuda.cudadrv.driver`` (`jorenham `_) * PR `#10523 `_: Support native containers `list`, `dict`, `set`, `tuple` as Numba types (`esc `_ `izruff `_) * PR `#10525 `_: configure stubtest and add a `maint/stubtest.py` script (`jorenham `_ `swap357 `_) * PR `#10526 `_: Update pypa/gh-action-pypi-publish digest to cef2210 (`renovate[bot] `_) * PR `#10529 `_: Updated ``int_`` to map to int64 instead of ``ctypes.c_long`` (kc611) * PR `#10531 `_: Update actions/upload-artifact action to v7.0.1 (`renovate[bot] `_) * PR `#10532 `_: CI: remove build-env LC_RPATH from osx-arm64 wheel (`swap357 `_) * PR `#10533 `_: arraymath: add temporal scalar support for np reduction functions (`amishhaa `_) * PR `#10541 `_: GHA: replace json matrices with python evaluation scripts (`swap357 `_) * PR `#10543 `_: Refactored min/max functionality into overloads (`esc `_ `kc611 `_) * PR `#10544 `_: Refactored int constructor into overload API (`kc611 `_) * PR `#10548 `_: add tier 1.5 description as per #10406 (`seibert `_) * PR `#10551 `_: type annotations for `Dispatcher` (`jorenham `_ `swap357 `_) * PR `#10552 `_: type annotations for `CFunc` (Copilot `jorenham `_) * PR `#10558 `_: `numba.core.types.function_type` type stubs (Guilherme Leobas `jorenham `_) * PR `#10562 `_: Cherry pick and changelog update for 0.65.1 (`esc `_ `stuartarchibald `_ `swap357 `_) * PR `#10566 `_: `numba.core.types.functions` type stubs (Guilherme Leobas `jorenham `_ `swap357 `_) * PR `#10568 `_: Update conda-incubator/setup-miniconda action to v4 (`renovate[bot] `_) * PR `#10570 `_: Cherry pick 0.65.1 (`swap357 `_) * PR `#10575 `_: Run stubtest and mypy with Python 3.11 in CI (`jorenham `_) * PR `#10577 `_: refactor: conda build command on GHA workflows (`swap357 `_) * PR `#10578 `_: Fix for ABI changes on python 3.14.4 (`swap357 `_) * PR `#10579 `_: Fix and complete the type stubs for `core.extending` (`jorenham `_) * PR `#10583 `_: `numba.np.ufunc.{ufunc_base,dufunc,gufunc}` type stubs (`jorenham `_ `swap357 `_) * PR `#10584 `_: Fix stubtest error on Python 3.12+ (`jorenham `_) * PR `#10585 `_: Global ``py.typed`` (PEP 561) (`jorenham `_) * PR `#10586 `_: Fixing Zenodo badge (`esc `_ `travishathaway `_) * PR `#10587 `_: Don't force tuple for single-dim pndindex. (`DrTodd13 `_) * PR `#10588 `_: Update dependency mypy to v2 (`renovate[bot] `_) * PR `#10590 `_: Fixed accidentally excluded dtypes in sum tests and optimized tests for better test suite runtime (`kc611 `_) * PR `#10592 `_: Fix incorrect docstring for TypeRefAttribute (fixes #8023) (`lucap123 `_) * PR `#10595 `_: remove code path for < cpython 3.10 (`esc `_) * PR `#10599 `_: Remove gitter (`sklam `_) * PR `#10602 `_: Update contribution and coding convention guides (`esc `_ `sklam `_) * PR `#10604 `_: Fix coverage.py with sysmon support (`guilhermeleobas `_) * PR `#10613 `_: Update actions/stale action to v10.3.0 (`renovate[bot] `_) * PR `#10627 `_: Update actions/checkout action to v6.0.3 (`renovate[bot] `_) * PR `#10630 `_: llvm 22 support: replace `nocapture` to `captures(none)` (`swap357 `_) * PR `#10632 `_: update version support table for `0.66.0rc1` (`swap357 `_) * PR `#10633 `_: update deprecation notice doc for `0.66` (`swap357 `_) * PR `#10635 `_: Changelog `0.66.0rc1` (`swap357 `_) Authors: * `amishhaa `_ * `auderson `_ * `DrTodd13 `_ * `ElijahKas0 `_ * `esc `_ * `guilhermeleobas `_ * `izruff `_ * `JonAnCla `_ * `jorenham `_ * `kc611 `_ * `kyleaoman `_ * `lucap123 `_ * `Meenakshi-1802 `_ * `renovate[bot] `_ * `seibert `_ * `sklam `_ * `stuartarchibald `_ * `swap357 `_ * `travishathaway `_