Skip to content

REL: Prepare 2.5.0 and move the development configuration into pyproject.toml - #508

Merged
bashtage merged 2 commits into
mainfrom
wip-release-2-5-0
Nov 4, 2026
Merged

bashtage merged 2 commits into
mainfrom
wip-release-2-5-0

Conversation

@bashtage

@bashtage bashtage commented Nov 4, 2026

Copy link
Copy Markdown
Owner

Prepares the 2.5.0 release. It sets the version and minimum versions decided for the release, fixes a meson deprecation warning, and moves the development configuration into pyproject.toml, deleting the config files it replaces.

Version and minimums

  • The release is 2.5.0, not 2.6.0: NumPy's latest release is 2.5.4, and there is no NumPy 2.6 yet. Renamed:
    • the change-log heading and its note ("there was no version 2.4.0");
    • the stream-changes-2-5-0 label and its reference;
    • the seven versionadded/versionchanged directives in pcg64.pyx and pcg32.pyx.
  • requires-python = ">=3.10". It said >=3.8, but CI only tests 3.10 to 3.15, and randomgen/typing.py already used int | Sequence[int], which needs 3.10. The 3.8 classifier is dropped and Python :: 3 :: Only added.
  • NumPy >=1.26,!=2.4.0,<3, the oldest NumPy CI tests (Azure python310_last_numpy_1 uses 1.26.4). It said 1.22.3.
  • The README's requirements and platform list are updated, including free-threaded 3.15t. The change log says what changed since 2.3.0 (Python 3.9, NumPy 1.22.3) and that there are no free-threaded 3.13 wheels.

Meson warning

  • The compat module was removed in a41395c, but randomgen/meson.build still had install_subdir('compat', ...). Meson installed an empty randomgen/compat directory and warned:

    Project targets '>= 1.9.0' but uses feature deprecated since '0.60.0': install_subdir with empty directory.

    The line is removed.

pyproject.toml

  • PEP 735 dependency groups replace the three requirements files:

    • build: everything pip install -e . --no-build-isolation needs;
    • test and lint;
    • doc: what was in doc/requirements.txt;
    • dev: build, test and lint, plus jinja2 and joblib for tools/.

    CI installs them with python -m pip install --group ... (pip 25.1 or later): the docs workflow, the lint workflow and the Azure Windows template. The README explains how.

  • The stale test, doc and dev extras are removed. Among other things they listed setuptools, oldest-supported-numpy and pytest<9.

  • pytest uses pytest 9's native [tool.pytest] table.

    • strict = true replaces addopts = "--strict". In pytest 9, --strict sets exactly this option, which turns on strict_config, strict_markers, strict_xfail and strict_parametrization_ids. So CI is exactly as strict as before.
    • minversion is now 9.0, and the test group needs pytest>=9.
  • black and ruff take their target versions from requires-python, so the explicit target-version settings are gone. With a 3.10 target, ruff reported five issues, now fixed:

    • PEP 604 unions in randomgen/typing.py;
    • TypeAlias imported from typing in dsfmt.pyi and wrapper.pyi;
    • zip(..., strict=True) in one test.
  • The mypy settings for randomgen.conftest and randomgen._version were INI-style [tool.mypy-...] tables, which mypy ignores in pyproject.toml. They are now an [[tool.mypy.overrides]] entry.

  • Smaller changes:

    • removed the empty [tool.meson-python.args] table;
    • setuptools-scm no longer has the obsolete [toml] extra;
    • added an issues URL.

Deleted config files

  • .flake8, together with the flake8 step in the lint workflow. ruff already runs pyflakes and the flake8-pyi rules (select = ["ALL", ...]), and black covers pycodestyle's whitespace checks.
  • .pep8speaks.yml: the bot hasn't commented on any of the last 100 issue and PR comments.
  • codecov.yml: it only set branch: main, which is Codecov's default for this repository.
  • requirements.txt, requirements-dev.txt and doc/requirements.txt, now dependency groups.
  • In .gitattributes:
    • the export-ignore entries for files that no longer exist (.cirrus.yml, .pep8speaks.yml, codecov.yml) are removed;
    • so is the export-subst on randomgen/_version.py, which isn't tracked, so the attribute did nothing.

Kept because they can't move into pyproject.toml:

  • meson.options and the meson build files;
  • .gitattributes, .gitignore and the CI files;
  • doc/Makefile;
  • randomgen/conftest.py, which registers the markers and options for tests run on the installed package, where there is no pyproject.toml;
  • the example randomgen/examples/cython/setup.py.

Commits: the deletions of the replaced config files landed in the first commit (BLD: Stop installing the removed compat directory), because they were already staged. The rest of the configuration change is in the second commit.

Checked (WSL, Python 3.12)

  • The build log has no deprecation warnings. Built from main, it showed the install_subdir warning.
  • The wheel has no randomgen/compat entries. Its metadata has:
    • Requires-Python: >=3.10;
    • Requires-Dist: numpy!=2.4.0,<3,>=1.26;
    • classifiers 3.10 to 3.15 plus 3 :: Only;
    • no Provides-Extra.
  • Full suite on the installed wheel, using this branch's [tool.pytest] configuration (pytest -c pyproject.toml, pytest 9.2.0): 8754 passed, 158 skipped.
  • Strict mode is in effect: a test with an unregistered marker fails at collection.
  • With pip 26.3, --group lint, --group dev and --group dev --group doc all resolve: 30, 52 and 105 packages, including black 26.10.1, pytest 9.2.0 and NumPy 2.5.4.
  • ruff (target inferred as 3.10), black (targets 3.10 to 3.14 inferred) and isort pass.
  • The change log parses with docutils. The only message is the old ipython directive in the 2.3.0 notes, which needs Sphinx.

Heads-up

  • Snyk: the "pinned by Snyk" pins (zipp, pygments, requests) were in the requirements files and are now in the dependency groups. Snyk may not read dependency groups, so its projects for the deleted files may need re-importing.
  • Anyone using pip install randomgen[test] now gets a warning that the extra doesn't exist.
  • Before tagging, the conda-forge recipe needs the new minimums. That's in the release checklist, outside this repository.

🤖 Generated with Claude Code

bashtage and others added 2 commits November 4, 2026 14:34
The compat module was removed in a41395c, but meson.build still
called install_subdir('compat', ...). Meson then installed an empty
randomgen/compat directory and warned that install_subdir with an empty
directory is deprecated since 0.60.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ect.toml

Version and minimums:
- The release is 2.5.0, matching NumPy's latest release (2.5.4), not
  2.6.0: rename the change-log heading, its note, the stream-changes
  label and the seven versionadded/versionchanged directives.
- requires-python is >=3.10 (the 3.8 classifier is dropped, and
  "3 :: Only" added), and NumPy is >=1.26 (still !=2.4.0), the oldest
  NumPy that CI tests. The README and the change log say so, and the
  change log notes that there are no free-threaded 3.13 wheels.

pyproject.toml:
- PEP 735 dependency groups (build, test, lint, doc, dev) replace
  requirements.txt, requirements-dev.txt and doc/requirements.txt. CI
  installs them with "pip install --group". The stale test, doc and
  dev extras are removed.
- pytest uses the native [tool.pytest] table of pytest 9, with
  strict = true, which is what the old "--strict" option means there.
- black and ruff take their targets from requires-python. Targeting
  3.10 makes ruff ask for PEP 604 unions in randomgen/typing.py,
  TypeAlias from typing in the stubs, and zip(strict=True).
- The mypy settings for conftest and _version were INI-style tables
  that mypy ignores; they are now a [[tool.mypy.overrides]] entry.
- Drop the empty [tool.meson-python.args] table and the obsolete [toml]
  extra of setuptools-scm, and add an issues URL.

Other configuration files:
- Remove .flake8 and the flake8 lint step. ruff runs pyflakes and the
  flake8-pyi rules, and black covers pycodestyle's whitespace checks.
- Remove .pep8speaks.yml (the bot no longer comments) and codecov.yml
  (it only set Codecov's default branch, main).
- .gitattributes drops entries for files that no longer exist and the
  export-subst for the untracked randomgen/_version.py.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.80%. Comparing base (0a3fcf3) to head (7c1cae3).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #508      +/-   ##
==========================================
- Coverage   94.81%   94.80%   -0.01%     
==========================================
  Files          56       56              
  Lines        9923     9922       -1     
  Branches      214      214              
==========================================
- Hits         9408     9407       -1     
  Misses        495      495              
  Partials       20       20              
Flag Coverage Δ
adder 94.74% <100.00%> (-0.01%) ⬇️
subtractor 94.74% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bashtage
bashtage marked this pull request as ready for review November 4, 2026 14:45
@bashtage
bashtage merged commit 1a1886d into main Nov 4, 2026
42 of 44 checks passed
@bashtage
bashtage deleted the wip-release-2-5-0 branch November 4, 2026 15:11
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