From 3c0e99732168ea15fb5c732f8ba2c83b62d2baff Mon Sep 17 00:00:00 2001 From: EarningsCall Date: Sun, 18 Oct 2026 13:51:08 -0500 Subject: [PATCH 1/2] chore: drop Python 3.10, add 3.15, and fix lint broken by ruff 0.16 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 --- .github/workflows/test.yml | 10 +++++----- CHANGELOG.md | 5 +++++ CLAUDE.md | 2 +- README.md | 2 +- earningscall/api.py | 1 + earningscall/event.py | 3 --- hatch.toml | 2 +- pyproject.toml | 15 +++++++++------ 8 files changed, 23 insertions(+), 17 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9b8af4b..7b0d446 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -24,7 +24,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest] - python-version: ['3.10'] + python-version: ['3.11'] steps: - uses: actions/checkout@v6 @@ -37,13 +37,13 @@ jobs: - name: Install Hatch run: pip install --upgrade hatch - - if: matrix.python-version == '3.10' && runner.os == 'Linux' + - if: matrix.python-version == '3.11' && runner.os == 'Linux' name: Lint run: hatch run lint:all - name: Run tests and track code coverage run: hatch run cov - - if: matrix.python-version == '3.10' && runner.os == 'Linux' + - if: matrix.python-version == '3.11' && runner.os == 'Linux' name: Publish Coverage to Coveralls run: hatch run coveralls env: @@ -56,10 +56,10 @@ jobs: steps: - uses: actions/checkout@v6 - - name: Set up Python 3.10 + - name: Set up Python 3.11 uses: actions/setup-python@v6 with: - python-version: '3.10' + python-version: '3.11' - name: Install Hatch run: pip install --upgrade hatch hatch-containers diff --git a/CHANGELOG.md b/CHANGELOG.md index 7d14d55..5486e57 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## Release `3.0.0` - Unreleased + +* **Breaking**: Drop support for Python 3.10, which reached end-of-life in October 2026. Minimum required version is now Python 3.11. +* Add Python 3.15 to supported versions. + ## Release `2.0.1` - 2026-03-11 * Bugfix: `get_symbols_v2()`, `get_sp500_companies_txt_file()`, `get_events()`, and `get_exchanges_json()` now raise `HTTPError` on failed API responses instead of silently returning the raw response. Previously, non-200 responses were passed through to callers, which would then crash with `AttributeError` (e.g., calling `.split()` on a non-text response) or return corrupt data. diff --git a/CLAUDE.md b/CLAUDE.md index 3f6bc38..57037a8 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -40,7 +40,7 @@ vars, defaulting to `"demo"` (AAPL-only sample access; other symbols raise - Build/test/lint via Hatch (hatchling backend) — commands in [DEVELOPMENT.md](DEVELOPMENT.md). CI (`.github/workflows/test.yml`) runs `hatch run lint:all` (ruff, black, mypy), `hatch run cov` (Coveralls), and a - containerized matrix `hatch run all:test` on Python 3.10–3.14. + containerized matrix `hatch run all:test` on Python 3.11–3.15. - Releases: bump the static `version` in `pyproject.toml` `[project]`, add a `## Release \`X.Y.Z\` - YYYY-MM-DD` entry to `CHANGELOG.md`, then push a `vX.Y.Z` tag. `.github/workflows/release.yml` builds and publishes to PyPI diff --git a/README.md b/README.md index 441f090..7f8eb77 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ responses. # Requirements -* Python 3.10+ +* Python 3.11+ # Installation diff --git a/earningscall/api.py b/earningscall/api.py index 20fa4aa..ea3cc91 100644 --- a/earningscall/api.py +++ b/earningscall/api.py @@ -141,6 +141,7 @@ def do_get( delay = retry_strategy["base_delay"] max_attempts = int(retry_strategy["max_attempts"]) + response: requests.Response for attempt in range(max_attempts): if use_cache and earningscall.enable_requests_cache: response = cache_session().get(url, params=params) diff --git a/earningscall/event.py b/earningscall/event.py index 688597f..b9da223 100644 --- a/earningscall/event.py +++ b/earningscall/event.py @@ -14,9 +14,6 @@ def _parse_conference_date(date_str: str) -> Optional[datetime]: """Parse conference date string, handling both timezone offsets and 'Z' UTC suffix.""" if not date_str: return None - # Handle 'Z' suffix by converting to '+00:00' for UTC - if date_str.endswith('Z'): - date_str = date_str[:-1] + '+00:00' return datetime.fromisoformat(date_str) diff --git a/hatch.toml b/hatch.toml index 596a635..c8f7716 100644 --- a/hatch.toml +++ b/hatch.toml @@ -21,7 +21,7 @@ cov = [ type = "container" [[envs.all.matrix]] -python = ["3.10", "3.11", "3.12", "3.13", "3.14"] +python = ["3.11", "3.12", "3.13", "3.14", "3.15"] [envs.lint] detached = true diff --git a/pyproject.toml b/pyproject.toml index 840831b..d146bfc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,10 +1,10 @@ [project] name = "earningscall" -version = "2.0.1" +version = "3.0.0" description = "The EarningsCall Python library provides convenient access to the EarningsCall API. It includes a pre-defined set of classes for API resources that initialize themselves dynamically from API responses." readme = "README.md" authors = [{ name = "EarningsCall", email = "dev@earningscall.biz" }] -requires-python = ">= 3.10" +requires-python = ">= 3.11" dependencies = [ "dataclasses-json>=0.6.4", "requests>=2.30.0", @@ -42,11 +42,11 @@ classifiers = [ # Specify the Python versions you support here. "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.14", + "Programming Language :: Python :: 3.15", ] [project.urls] @@ -79,7 +79,7 @@ cov = "pytest --cov-report=term-missing --cov-config=pyproject.toml --cov=hatch_ no-cov = "cov --no-cov" [[tool.hatch.envs.test.matrix]] -python = ["3.10", "3.11", "3.12", "3.13", "3.14"] +python = ["3.11", "3.12", "3.13", "3.14", "3.15"] [tool.hatch.build.targets.wheel.hooks.mypyc] @@ -99,14 +99,17 @@ warn_unused_ignores = true [tool.black] -target-version = ["py310"] +target-version = ["py311"] line-length = 120 skip-string-normalization = true [tool.ruff] -target-version = "py310" +target-version = "py311" [tool.ruff.lint] +# Pin the rule set explicitly. Ruff 0.16 expanded its default selection, which +# broke CI without any code change. +select = ["E4", "E7", "E9", "F"] ignore = [ # Allow non-abstract empty methods in abstract base classes "B027", From e0bb9b04a2ef6b347310c43403eaad23fe0a84c4 Mon Sep 17 00:00:00 2001 From: EarningsCall Date: Sun, 18 Oct 2026 14:00:05 -0500 Subject: [PATCH 2/2] docs: date the 3.0.0 CHANGELOG entry Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5486e57..f783f1a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## Release `3.0.0` - Unreleased +## Release `3.0.0` - 2026-10-18 * **Breaking**: Drop support for Python 3.10, which reached end-of-life in October 2026. Minimum required version is now Python 3.11. * Add Python 3.15 to supported versions.