Skip to content

chore: drop Python 3.10, add 3.15, and fix lint broken by ruff 0.16 - #48

Merged
EarningsCall merged 2 commits into
masterfrom
chore/drop-py310-fix-lint
Oct 18, 2026
Merged

EarningsCall merged 2 commits into
masterfrom
chore/drop-py310-fix-lint

Conversation

@EarningsCall

@EarningsCall EarningsCall commented Oct 18, 2026 •

Copy link
Copy Markdown
Owner

Summary

Fixes the red CI on master and updates the supported Python range.

Why CI broke

hatch run lint:all started failing on master (run 39155068553) with 129 ruff errors, with no code change. #46 touched only release.yml, which this workflow doesn't run.

  • The lint env installs ruff without an upper bound (ruff>=0.0.166), and [tool.ruff.lint] never set select, so the rule set was whatever ruff ships as defaults.
  • Ruff 0.16.0 (2026-07-23, two days after the last green run) expanded the default rule set (UP, I, PLR, TRY, LOG, …).
  • Bisected on the same code: ruff 0.15.22 passes and every release from 0.16.0 to 0.17.1 fails.

Fix: pin select = ["E4", "E7", "E9", "F"], the previous defaults, so future ruff upgrades can't change the rule set.

The latest mypy (2.4.0) also reported a real type error that CI hadn't reached yet: response in do_get() is assigned both CachedResponse and requests.Response. It now has a requests.Response annotation.

Python versions

  • Breaking: drop Python 3.10 (end of life since October 2026). requires-python = ">= 3.11", and CI's lint/coverage job moves to 3.11.
  • Add Python 3.15 to the container test matrix and classifiers.
  • Remove the Z-suffix workaround in _parse_conference_date(). datetime.fromisoformat() handles Z natively from 3.11, and the existing test still covers it.
  • Bump version to 3.0.0 with a 2026-10-18 CHANGELOG entry, following Drop Python 3.8 and 3.9 support, require 3.10+ #42.

Test plan

  • pytest on 3.11, 3.12, 3.13, 3.14, 3.15: 89 passed each
  • hatch run all:test (container matrix, incl. python:3.15 image): all pass locally
  • ruff 0.17.1 + 0.15.22, black 26.10.1, mypy 2.4.0: clean
  • CI green

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Compatibility
    • Version 3.0.0 requires Python 3.11 or later. Python 3.10 is no longer supported.
    • Support now includes Python 3.15, alongside Python 3.11 through 3.14.

CI on master started failing with 129 ruff errors without any code
change. The lint env installs ruff unpinned and pyproject.toml never set
`select`, so the rule set was ruff's defaults; ruff 0.16 (2026-07-23)
expanded those defaults. Pin `select` to the previous defaults
(E4, E7, E9, F) so ruff upgrades can no longer change the rule set.

The latest mypy (2.4.0) also flagged `response` in `do_get()` being
assigned both CachedResponse and requests.Response; annotate it as
requests.Response.

Python 3.10 reached end-of-life in October 2026. Require 3.11+, move CI
to 3.11, and add 3.15 to the test matrix and classifiers. Drop the 'Z'
suffix workaround in `_parse_conference_date()`, since
`datetime.fromisoformat()` handles it natively from 3.11.

Bump version to 3.0.0 (breaking: minimum Python version).

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

coderabbitai Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: EarningsCall/coderabbit/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 4dd66814-0b56-4b50-b860-38f3533d407c
📥 Commits

Reviewing files that changed from the base of the PR and between 3c0e997 and e0bb9b0.

📒 Files selected for processing: 1
  • CHANGELOG.md
🚧 Files skipped from review as they are similar to previous changes: 1
  • CHANGELOG.md

Included review availability: This review used your included allowance. 2 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.

📝 Walkthrough

The project now requires Python 3.11, tests Python 3.11–3.15, and reports version 3.0.0. CI, documentation, and tooling targets reflect this range. Runtime code adds a response annotation and changes conference date parsing.

Changes: Python support update

Layer / File(s) Summary
Support contract and validation matrices
pyproject.toml, hatch.toml, .github/workflows/test.yml, README.md, CLAUDE.md, CHANGELOG.md
The package requires Python 3.11, removes Python 3.10, adds Python 3.15, and updates the related CI matrices and documentation. The changelog adds the 3.0.0 release entry.
Tooling and lint targets
pyproject.toml
Black and Ruff target Python 3.11. Ruff explicitly selects rule groups E4, E7, E9, and F.
Runtime code adjustments
earningscall/api.py, earningscall/event.py
do_get annotates response as requests.Response. Conference dates pass directly to datetime.fromisoformat without trailing-Z rewriting.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~12 minutes

Change: Other

Merge Risk: ⚪ Minimal · up to e0bb9

No merge-blocking issue is established for this change; complete the normal validation before merging.

Pre-merge checks: Passed 5
Check name Status Explanation
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (1 skipped: 1 …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly summarizes the primary changes: dropping Python 3.10, adding Python 3.15, and fixing Ruff-related lint failures.
Full details: Docstring Coverage

Explanation

Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (1 skipped: 1 unsupported.)

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@EarningsCall
EarningsCall merged commit 467f298 into master Oct 18, 2026
9 checks passed
@EarningsCall
EarningsCall deleted the chore/drop-py310-fix-lint branch October 18, 2026 19:05
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