Skip to content

Commit 956cebf

Browse files
Drop Python 3.8 and 3.9 support, add 3.13 and 3.14 (#170)
* Drop Python 3.8 and 3.9 support, add 3.13 and 3.14 Both Python 3.8 (EOL Oct 2021) and 3.9 (EOL Oct 2025) are end-of-life and are not available on ubuntu-latest (26.04) GitHub Actions runners. Changes: - Update test matrix to use Python 3.10-3.14 - Update requires-python to >=3.10 - Remove Python 3.8/3.9 classifiers, add 3.13/3.14 - Remove conditional typing-extensions dependency (only needed for <3.10) - Update tool configs (black, ruff) to target py310+ - Update CHANGELOG.md with breaking change notice Co-authored-by: karlwaldman <karl.waldman@gmail.com> * Fix ruff B905: add explicit strict=False to zip() calls The B905 rule requires explicit strict= parameter for zip() when targeting Python 3.10+, where the parameter was introduced. Using strict=False maintains the existing behavior of not enforcing equal-length iterables. Co-authored-by: karlwaldman <karl.waldman@gmail.com> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com>
1 parent bfac7f2 commit 956cebf

4 files changed

Lines changed: 23 additions & 14 deletions

File tree

‎.github/workflows/test.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
strategy:
1818
fail-fast: false
1919
matrix:
20-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
20+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
2121

2222
steps:
2323
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7

‎CHANGELOG.md‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,17 @@ All notable changes to the OilPriceAPI Python SDK will be documented in this fil
44

55
## [Unreleased]
66

7+
### Changed
8+
9+
- **Dropped Python 3.8 and 3.9 support.** Both versions are end-of-life (Python 3.8
10+
reached EOL in October 2021, Python 3.9 in October 2025) and are no longer
11+
available on the latest Ubuntu GitHub Actions runners (ubuntu-26.04). The package
12+
now requires Python 3.10 or later. Added support for Python 3.13 and 3.14 in CI.
13+
- Updated `requires-python` from `>=3.8` to `>=3.10` in `pyproject.toml`
14+
- Removed Python 3.8 and 3.9 classifiers, added 3.13 and 3.14 classifiers
15+
- Removed conditional `typing-extensions` dependency (only needed for Python < 3.10)
16+
- Updated tool configuration targets (black, ruff, mypy) to reflect the new minimum
17+
718
## [1.17.0] - 2026-10-03
819

920
### Fixed

‎oilpriceapi/async_client.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ async def get_multiple(
541541
prices = []
542542
failures = []
543543

544-
for chunk, result in zip(chunks, results):
544+
for chunk, result in zip(chunks, results, strict=False):
545545
if isinstance(result, list):
546546
prices.extend(result)
547547
continue
@@ -552,7 +552,7 @@ async def get_multiple(
552552
retry = await asyncio.gather(
553553
*(self.get(code) for code in chunk), return_exceptions=True
554554
)
555-
for code, item in zip(chunk, retry):
555+
for code, item in zip(chunk, retry, strict=False):
556556
if isinstance(item, Price):
557557
prices.append(item)
558558
else:

‎pyproject.toml‎

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
[build-system]
2-
# Setuptools 77+ warns on the legacy license table, while the older backend
3-
# available on supported Python 3.8 cannot parse the replacement string form.
2+
# Setuptools 77+ warns on the legacy license table
43
requires = ["setuptools>=70.1,<77", "wheel"]
54
build-backend = "setuptools.build_meta"
65

@@ -30,22 +29,21 @@ classifiers = [
3029
"Operating System :: OS Independent",
3130
"Programming Language :: Python",
3231
"Programming Language :: Python :: 3",
33-
"Programming Language :: Python :: 3.8",
34-
"Programming Language :: Python :: 3.9",
3532
"Programming Language :: Python :: 3.10",
3633
"Programming Language :: Python :: 3.11",
3734
"Programming Language :: Python :: 3.12",
35+
"Programming Language :: Python :: 3.13",
36+
"Programming Language :: Python :: 3.14",
3837
"Topic :: Office/Business :: Financial",
3938
"Topic :: Scientific/Engineering :: Information Analysis",
4039
"Topic :: Software Development :: Libraries :: Python Modules",
4140
"Typing :: Typed",
4241
]
43-
requires-python = ">=3.8"
42+
requires-python = ">=3.10"
4443
dependencies = [
4544
"httpx>=0.24.0",
4645
"pydantic>=2.0.0",
4746
"python-dateutil>=2.8.0",
48-
"typing-extensions>=4.5.0; python_version < '3.10'",
4947
]
5048

5149
[project.optional-dependencies]
@@ -113,12 +111,12 @@ oilpriceapi = ["py.typed"]
113111

114112
[tool.black]
115113
line-length = 100
116-
target-version = ['py38', 'py39', 'py310', 'py311']
114+
target-version = ['py310', 'py311', 'py312', 'py313']
117115
include = '\.pyi?$'
118116

119117
[tool.ruff]
120118
line-length = 100
121-
target-version = "py38"
119+
target-version = "py310"
122120

123121
[tool.ruff.lint]
124122
select = [
@@ -139,9 +137,9 @@ ignore = [
139137
fixable = ["ALL"]
140138

141139
[tool.mypy]
142-
# Type-check target; mypy 2.x requires >=3.10 (it rejects "3.8"). The package
143-
# itself still supports Python >=3.8 (see requires-python above); python_version
144-
# here only controls which language features mypy assumes when type-checking.
140+
# Type-check target; mypy 2.x requires >=3.10. The package supports Python >=3.10
141+
# (see requires-python above); python_version here only controls which language
142+
# features mypy assumes when type-checking.
145143
python_version = "3.10"
146144
strict = true
147145
warn_return_any = true

0 commit comments

Comments
 (0)