Releasing a version — NumPy v2.6.dev0 Manual
Skip to main content GitHub Releasing a version # The following guides include detailed information on how to prepare a NumPy release. How to prepare a release # These instructions give an overview of what is necessary to build binary releases for NumPy. Current build and release info # Useful info can be found in building-from-source in the docs as well as in these three files: HOWTO_RELEASE.rst RELEASE_WALKTHROUGH.rst BRANCH_WALKTHROUGH.rst Supported platforms and versions # NEP 29 outlines which Python versions are supported at a minimum .
We usually decide to keep support for a given Python version slightly longer than that minimum, to avoid giving other projects issues - this is at the discretion of the release manager. macOS We aim to support the same set of macOS versions as are supported by Python.org and cibuildwheel for any given Python version. We build binary wheels for macOS that are compatible with common Python installation methods, e.g., from python.org, python-build-standalone (the ones uv installs), system Python, conda-forge, Homebrew and MacPorts.
Windows We build 32- and 64-bit wheels on Windows. Windows 7, 8 and 10 are supported. We build NumPy using the most convenient compilers, which are (as of Aug 2025) MSVC for x86/x86-64 and Clang-cl for arm64, cibuildwheel and GitHub Actions. Linux We build and ship manylinux and musllinux wheels for x86-64 and aarch64 platforms on PyPI. Wheels for 32-bit platforms are not currently provided. We aim to support the lowest non-EOL versions, and upgrade roughly in sync with cibuildwheel .
See pypa/manylinux and this distro compatibility table for more details. BSD / Solaris / AIX No binary wheels are provided on PyPI, however we expect building from source on these platforms to work fine. Toolchains # For building wheels, we use the following toolchains: Linux: we use the default compilers in the manylinux / musllinux Docker images, which is usually a relatively recent GCC version. macOS: we use the Apple Clang compilers and XCode version installed on the GitHub Actions runner image.
Windows: for x86 and x86-64 we use the default MSVC and Visual Studio toolchain installed on the relevant GitHub actions runner image. Note that in the past it has sometimes been necessary to use an older toolchain to avoid causing problems through the static libnpymath library for SciPy - please inspect the numpy/numpy-release code and CI logs in case the exact version numbers need to be determined. For building from source, minimum compiler versions are tracked in the top-level meson.build file.
OpenBLAS # Most wheels link to a version of OpenBLAS supplied via the openblas-libs repo. The shared object (or DLL) is shipped within the wheel, renamed to prevent name collisions with other OpenBLAS shared objects that may exist in the filesystem. Building docs # We are no longer building pdf files. The requirements for building the html docs are no different than for regular development. See the README of the numpy/doc repository and the step by step instructions in doc/RELEASE_WALKTHROUGH.rst for more details.
Uploading to PyPI # Creating a release on PyPI and uploading wheels and sdist is automated in CI and uses PyPI’s trusted publishing . See the README in the numpy/numpy-release repository and the step by step instructions in doc/RELEASE_WALKTHROUGH.rst for more details. Generating author/PR lists # You will need a personal access token https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/ so that scripts can access the GitHub NumPy repository.
With that token, the author/PR changelog content can be generated by running spin changelog . It may require a few extra packages, like gitpython and pygithub . What is released # On PyPI we release wheels for a number of platforms (as discussed higher up), and an sdist. On GitHub Releases we only post the release notes. No artifacts are uploaded. GitHub’s autogenerated source archives are incomplete; the sdist and wheels are published to PyPI with Trusted Publishing.
Release process # Agree on a release schedule # A typical release schedule for a feature release is two release candidates and a final release. It’s best to discuss the timing on the mailing list first, in order for people to get their commits in on time. After a date is set, create a new maintenance/x.y.z branch, add new empty release notes for the next version in the main branch and update the Milestones on the issue tracker.
Check deprecations # Before the release branch is made , it should be checked that all deprecated code that should be removed is actually removed, and all new deprecations say in the docstring or deprecation warning what version the code will be removed. Check the C API version number # The C API version needs to be tracked in three places numpy/_core/meson.build numpy/_core/code_generators/cversions.txt numpy/_core/include/numpy/numpyconfig.h There are three steps to the process.
If the API has changed, increment the C_API_VERSION in numpy/core/meson.build. The API is unchanged only if any code compiled against the current API will be backward compatible with the last released NumPy version. Any changes to C structures or additions to the public interface will make the new API not backward compatible. If the C_API_VERSION in the first step has changed, or if the hash of the API has changed, the cversions.txt file needs to be updated.
To check the hash, run the script numpy/_core/cversions.py and note the API hash that is printed. If that hash does not match the last hash in numpy/_core/code_generators/cversions.txt the hash has changed. Using both the appropriate C_API_VERSION and hash, add a new entry to cversions.txt. If the API version was not changed, but the hash differs, you will need to comment out the previous entry for that API version. For instance, in NumPy 1.9 annotations were added, which changed the hash, but the API was the same as in 1.8.
The hash serves as a check for API changes, but it is not definitive. If steps 1 and 2 are done correctly, compiling the release should not give a warning “API mismatch detect at the beginning of the build”. The numpy/_core/include/numpy/numpyconfig.h will need a new NPY_X_Y_API_VERSION macro, where X and Y are the major and minor version numbers of the release. The value given to that macro only needs to be increased from the previous version if some of the functions or macros in the include files were deprecated.
The C ABI version number in numpy/_core/meson.build should only be updated for a major release. Check the release notes # Use towncrier to build the release note and commit the changes. This will remove all the fragments from doc/release/upcoming_changes and add doc/release/<version>-note.rst .: towncrier build -- version "<version>" git commit - m "Create release note" Check that the release notes are up-to-date. Update the release notes with a Highlights section.
Mention some of the following: major new features deprecated and removed features supported Python versions for SciPy, supported NumPy version(s) outlook for the near future Step-by-step directions # This is a walkthrough of the NumPy 2.4.0 release on Linux, which will be the first feature release using the numpy/numpy-release repository. The commands can be copied into the command line, but be sure to replace 2.4.0 with the correct version.
This should be read together with the general release guide . Facility preparation # Before beginning to make a release, use the dependency groups from pyproject.toml to ensure that you have the needed software. Most software can be installed with pip, but some will require apt-get, dnf, or whatever your system uses for software. You will also need a GitHub personal access token (PAT) to push the documentation. There are a few ways to streamline things: Git can be set up to use a keyring to store your GitHub personal access token.
Search online for the details. Prior to release
The rest of this page is on the live site.