Skip to content

MAINT: Require NumPy 2.0, SciPy 1.13 and pandas 2.2.2 - #11316

Merged
bashtage merged 1 commit into
statsmodels:mainfrom
bashtage:wip-numpy2-minimums
Nov 28, 2026
Merged

bashtage merged 1 commit into
statsmodels:mainfrom
bashtage:wip-numpy2-minimums

Conversation

@bashtage

Copy link
Copy Markdown
Member

Raise the minimum supported versions of the core numerical dependencies
to the first releases that support NumPy 2:

  • NumPy: 1.23.5 -> 2.0.0 (released June 2024)
  • SciPy: 1.8 -> 1.13 (released April 2024)
  • pandas: 1.4 -> 2.2.2 (released April 2024)

Building from source already required NumPy >= 2.0 and SciPy >= 1.13, so
the build and runtime floors now agree. The exclusions of SciPy 1.9.2 and
pandas 2.1.0 are dropped since both are below the new floors, as is the
pandas pin of the documentation requirements, which is now the same as
the runtime floor.

The python_310 Azure job, which tests the oldest supported Python with
the minimum dependencies, now pins NumPy 2.0.0, SciPy 1.13.0 and pandas
2.2.2. It previously ran pandas 1.5.3, newer than the declared floor of
1.4.

Verification

The steps of the python_310 leg were run as Azure runs them (each script:
step with bash --noprofile --norc, Ubuntu 24.04, CPython 3.10.22):
install-posix.sh installed NumPy 2.0.0, SciPy 1.13.0, pandas 2.2.2 and
Cython 3.0.10, the editable build succeeded, and the full suite including the
slow tests gave 33590 passed, 1122 skipped, 140 xfailed, with no failures and
no warnings in the summary. The skips are the matplotlib tests, as this leg
does not install matplotlib.

The minimums are the first releases that support NumPy 2, not the first
released after NumPy 2.0.0 (SciPy 1.14.0, pandas 2.2.3). The build
requirements already use SciPy 1.13.

AI Disclosure

Contributions must comply with the statsmodels AI Policy.

Tick exactly one of the following. If AI tools were used, replace the <...>
placeholders in the second option with the tool name(s) and how the tool's output was
used.

  • No AI tools were used to develop this pull request.
  • AI tools were used.
    Tool(s): Claude Code.
    Used for: updating the minimum versions and the CI job that tests them, and running the steps of that job against the minimum versions.
    I have personally read, understood, and can explain every line of this diff, and
    have verified the statistical/numerical correctness of the change.

Raise the minimum supported versions of the core numerical dependencies
to the first releases that support NumPy 2:

- NumPy: 1.23.5 -> 2.0.0 (released June 2024)
- SciPy: 1.8 -> 1.13 (released April 2024)
- pandas: 1.4 -> 2.2.2 (released April 2024)

Building from source already required NumPy >= 2.0 and SciPy >= 1.13, so
the build and runtime floors now agree. The exclusions of SciPy 1.9.2 and
pandas 2.1.0 are dropped since both are below the new floors, as is the
pandas pin of the documentation requirements, which is now the same as
the runtime floor.

The python_310 Azure job, which tests the oldest supported Python with
the minimum dependencies, now pins NumPy 2.0.0, SciPy 1.13.0 and pandas
2.2.2. It previously ran pandas 1.5.3, newer than the declared floor of
1.4.
@bashtage
bashtage marked this pull request as ready for review November 28, 2026 19:32
@bashtage
bashtage merged commit 470ffd1 into statsmodels:main Nov 28, 2026
9 of 11 checks passed
bashtage added a commit to bashtage/statsmodels that referenced this pull request Nov 28, 2026
Update the documentation for the minimum versions of statsmodels#11316 and statsmodels#11321,
now Python 3.11, NumPy 2.0, SciPy 1.14 and pandas 2.2.3:

- The release summary and "Minimum dependency versions raised" in the
  0.16.0 release notes, which also say that SciPy 1.14.0 and pandas
  2.2.3 are the first releases of each after NumPy 2.0.0 and that
  building from source requires SciPy 1.14.
- The supported Python versions and the minimum dependencies in
  docs/source/install.rst. INSTALL.txt is left alone, since statsmodels#11325
  removes it.
- The target Python version for ruff in AGENTS.md.
bashtage added a commit that referenced this pull request Nov 28, 2026
Raise the minimum supported versions further than #11316 did:

- Python: 3.10 -> 3.11
- SciPy: 1.13 -> 1.14 (released June 2024)
- pandas: 2.2.2 -> 2.2.3 (released September 2024)

SciPy 1.14.0 and pandas 2.2.3 are the first releases of each after NumPy
2.0.0. The build requirement on SciPy is raised to 1.14 as well, so that
the build and runtime floors agree. The Python 3.10 classifier is
removed, and ruff and black target Python 3.11 (ruff finds nothing new).

CI: the jobs on Python 3.10, which can no longer install statsmodels,
move to Python 3.11 (python_311, python_311_legacy_blas,
python311_macos_compat and python311_win_compat). python_311, which tests
the oldest supported Python with the minimum dependencies, pins NumPy
2.0.0, SciPy 1.14.0 and pandas 2.2.3.
@github-actions

Copy link
Copy Markdown

Thanks for the pull request! Neither box in the AI Disclosure section is ticked. Please tick the one that applies.

Per the AI Policy, every pull request must state whether AI tools were used. Please edit the PR description so it includes the section below, tick exactly one box, and, if AI tools were used, replace the placeholders with the tool name(s) and how they were used.

#### AI Disclosure

Contributions must comply with the statsmodels [AI Policy](https://www.statsmodels.org/devel/dev/ai-policy.html).

- [ ] No AI tools were used to develop this pull request.
- [ ] AI tools were used.
      Tool(s): `<name(s), e.g. Copilot, Claude, ChatGPT>`.
      Used for: `<e.g. drafting an implementation, writing tests, debugging, editing docstrings>`.
      I have personally read, understood, and can explain every line of this diff, and
      have verified the statistical/numerical correctness of the change.

This check re-runs automatically when the description is edited.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant