Skip to content

Bump CI tooling and testing dependencies in /Tools#24

Merged
plfj merged 4 commits intomainfrom
dr
Feb 23, 2026
Merged

Bump CI tooling and testing dependencies in /Tools#24
plfj merged 4 commits intomainfrom
dr

Conversation

@George-Codr
Copy link
Collaborator

@George-Codr George-Codr commented Feb 23, 2026

This PR updates several development dependencies used for linters, type checking, and property-based testing in CI.

Updated Dependencies

Package Old Version New Version Purpose / Scope
mypy 1.17.1 1.19.1 Static type checking for CI tools (Tools/clinic, Tools/cases_generator/, Tools/peg_generator/)
types-psutil 7.0.0.20250801 7.2.2.20260130 Type stubs needed for peg_generator
types-setuptools 80.9.0.20250801 82.0.0.20260210 Type stubs needed for peg_generator
hypothesis 6.135.26 6.151.9 Property-based testing in CI (Tools/requirements-hypothesis.txt)

Release Notes / Changelog

  • CI and Type Checking

    • Upgraded mypy and type stubs to improve static analysis and maintain compatibility with the latest Python versions.
    • Improves reliability and stability of CI checks for Tools/clinic, Tools/cases_generator/, and Tools/peg_generator/.
  • Testing

    • Upgraded hypothesis to ensure property-based tests run with the latest features and fixes.
    • Enhances compatibility and stability of tests in CI.

Why These Updates Matter

  • Ensures CI tools remain compatible with new Python versions.
  • Improves type safety and developer feedback during development.
  • Keeps property-based testing reliable with the latest hypothesis fixes and enhancements.
  • Reduces potential CI failures due to outdated tooling.

Summary by Sourcery

Update development tooling and testing dependencies under Tools to keep CI checks and property-based tests current and compatible with newer Python versions.

Build:

  • Bump mypy and related type stub packages in Tools/requirements-dev.txt for improved static analysis and compatibility.

Tests:

  • Update Hypothesis version in Tools/requirements-hypothesis.txt to run property-based tests with the latest features and fixes.

Summary by CodeRabbit

  • Chores

    • Bumped development and typing-related dependencies (including mypy and typing stubs) to newer versions.
    • Updated test tooling dependency (hypothesis) to a newer version.
    • Relaxed a type annotation in test utilities (no runtime behavior changes).
  • New Features

    • Publicly exposed an additional submodule to make its functionality directly importable.

Updated versions of external linters and type stubs used in CI:

- mypy: 1.17.1 → 1.19.1
- types-psutil: 7.0.0.20250801 → 7.2.2.20260130
- types-setuptools: 80.9.0.20250801 → 82.0.0.20260210

These upgrades ensure compatibility with the latest Python versions
and improve type checking and CI reliability for:
- Tools/clinic
- Tools/cases_generator/
- Tools/peg_generator/
@sourcery-ai
Copy link

sourcery-ai bot commented Feb 23, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Updates CI development tooling by bumping mypy, related type stub packages, and Hypothesis to newer versions to keep static analysis and property-based testing dependencies current in the Tools directory.

File-Level Changes

Change Details Files
Bump static type checking tooling and associated type stubs used by CI tooling in Tools.
  • Update mypy to version 1.19.1 for static type checking of various Tools utilities
  • Update types-psutil stubs to align with newer psutil versions used by the Tools code
  • Update types-setuptools stubs to maintain compatibility with current setuptools APIs in Tools
Tools/requirements-dev.txt
Update property-based testing dependency used in CI for Tools.
  • Bump hypothesis to version 6.151.9 to pick up latest fixes and features for property-based tests in CI
Tools/requirements-hypothesis.txt

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@George-Codr George-Codr requested review from Aasyaco and plfj February 23, 2026 09:10
Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@coderabbitai
Copy link

coderabbitai bot commented Feb 23, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e756110 and d7e7573.

📒 Files selected for processing (1)
  • Tools/clinic/libclinic/__init__.py

📝 Walkthrough

Walkthrough

Bumped development and testing dependency versions, exposed the cpp submodule in Tools/clinic by adding it to __all__, and broadened a test utility type annotation from Callable[..., None] | None to Callable[..., object] | None. No runtime behavior changes.

Changes

Cohort / File(s) Summary
Development Dependencies
Tools/requirements-dev.txt
Upgraded mypy to 1.19.1, types-psutil to 7.2.2.20260130, and types-setuptools to 82.0.0.20260210; comments around dependency blocks updated.
Hypothesis Testing
Tools/requirements-hypothesis.txt
Bumped hypothesis from 6.135.26 to 6.151.9.
Test utilities (typing)
Lib/test/libregrtest/utils.py
Changed module-level type annotation orig_threading_excepthook from `Callable[..., None]
Clinic tooling public API
Tools/clinic/libclinic/__init__.py
Imported cpp (from . import cpp) and added "cpp" to __all__, exposing the cpp submodule publicly.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐇 I hopped through pins and version threads,
I opened a door where cpp treads,
A type widened, tiny and neat—
A rabbit's nibble, quick and fleet. 🌿

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: bumping CI tooling and testing dependencies in the Tools directory, which aligns with all file changes (requirements files and tooling fixes).

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch dr

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Collaborator

@Aasyaco Aasyaco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very close

Fix a mypy type error in Lib/test/libregrtest/utils.py caused by an
outdated type annotation for threading.excepthook.

In recent Python versions, threading.excepthook returns `object`
instead of `None`. The existing annotation expected
Callable[..., None] | None, which caused an incompatible assignment
error when assigning threading.excepthook.

Update the annotation to Callable[..., object] | None to match the
current return type while keeping compatibility across supported
Python versions.
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
Lib/test/libregrtest/utils.py (1)

153-155: Remove commented-out dead code.

Line 153 contains a commented-out type annotation that should be removed entirely—version control preserves history, so old code does not need to be left as comments.

Proposed fix
-#orig_threading_excepthook: Callable[..., None] | None = None
-
 orig_threading_excepthook: Callable[..., object] | None = None

For consistency with sys.unraisablehook, consider updating orig_unraisablehook on line 129 from Callable[..., None] to Callable[..., Any], since typeshed types sys.unraisablehook as returning Any.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Lib/test/libregrtest/utils.py` around lines 153 - 155, Remove the
commented-out dead code line containing the old type annotation for
orig_threading_excepthook (delete the entire commented line) and update the
orig_unraisablehook annotation from Callable[..., None] to Callable[..., Any] |
None to match sys.unraisablehook's typeshed typing; also add/import Any from
typing if not already imported and leave orig_threading_excepthook as the active
declaration (orig_threading_excepthook: Callable[..., object] | None = None).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@Lib/test/libregrtest/utils.py`:
- Around line 153-155: Remove the commented-out dead code line containing the
old type annotation for orig_threading_excepthook (delete the entire commented
line) and update the orig_unraisablehook annotation from Callable[..., None] to
Callable[..., Any] | None to match sys.unraisablehook's typeshed typing; also
add/import Any from typing if not already imported and leave
orig_threading_excepthook as the active declaration (orig_threading_excepthook:
Callable[..., object] | None = None).

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 40481a0 and e756110.

📒 Files selected for processing (1)
  • Lib/test/libregrtest/utils.py

Fix a mypy error in Tools/clinic caused by the libclinic.cpp submodule
not being visible as an attribute of the libclinic package.

Add an explicit import and export in libclinic/__init__.py so that
static analysis can detect the submodule while preserving the existing
runtime behavior.
@Aasyaco Aasyaco added dependencies Pull requests that update a dependency file type-bug An unexpected behavior, bug, or error labels Feb 23, 2026
Copy link
Collaborator

@plfj plfj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great Job

@plfj plfj merged commit 6471f30 into main Feb 23, 2026
61 checks passed
@Aasyaco Aasyaco deleted the dr branch February 23, 2026 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file type-bug An unexpected behavior, bug, or error

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants