diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ddbfab2..067432c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,7 +17,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f3fe2a..79ff5db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,17 @@ All notable changes to the OilPriceAPI Python SDK will be documented in this fil ## [Unreleased] +### Changed + +- **Dropped Python 3.8 and 3.9 support.** Both versions are end-of-life (Python 3.8 + reached EOL in October 2021, Python 3.9 in October 2025) and are no longer + available on the latest Ubuntu GitHub Actions runners (ubuntu-26.04). The package + now requires Python 3.10 or later. Added support for Python 3.13 and 3.14 in CI. + - Updated `requires-python` from `>=3.8` to `>=3.10` in `pyproject.toml` + - Removed Python 3.8 and 3.9 classifiers, added 3.13 and 3.14 classifiers + - Removed conditional `typing-extensions` dependency (only needed for Python < 3.10) + - Updated tool configuration targets (black, ruff, mypy) to reflect the new minimum + ## [1.17.0] - 2026-10-03 ### Fixed diff --git a/oilpriceapi/async_client.py b/oilpriceapi/async_client.py index d811d36..5b1e708 100644 --- a/oilpriceapi/async_client.py +++ b/oilpriceapi/async_client.py @@ -541,7 +541,7 @@ async def get_multiple( prices = [] failures = [] - for chunk, result in zip(chunks, results): + for chunk, result in zip(chunks, results, strict=False): if isinstance(result, list): prices.extend(result) continue @@ -552,7 +552,7 @@ async def get_multiple( retry = await asyncio.gather( *(self.get(code) for code in chunk), return_exceptions=True ) - for code, item in zip(chunk, retry): + for code, item in zip(chunk, retry, strict=False): if isinstance(item, Price): prices.append(item) else: diff --git a/pyproject.toml b/pyproject.toml index 0512f94..d5197ba 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,5 @@ [build-system] -# Setuptools 77+ warns on the legacy license table, while the older backend -# available on supported Python 3.8 cannot parse the replacement string form. +# Setuptools 77+ warns on the legacy license table requires = ["setuptools>=70.1,<77", "wheel"] build-backend = "setuptools.build_meta" @@ -30,22 +29,21 @@ classifiers = [ "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", "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", "Topic :: Office/Business :: Financial", "Topic :: Scientific/Engineering :: Information Analysis", "Topic :: Software Development :: Libraries :: Python Modules", "Typing :: Typed", ] -requires-python = ">=3.8" +requires-python = ">=3.10" dependencies = [ "httpx>=0.24.0", "pydantic>=2.0.0", "python-dateutil>=2.8.0", - "typing-extensions>=4.5.0; python_version < '3.10'", ] [project.optional-dependencies] @@ -113,12 +111,12 @@ oilpriceapi = ["py.typed"] [tool.black] line-length = 100 -target-version = ['py38', 'py39', 'py310', 'py311'] +target-version = ['py310', 'py311', 'py312', 'py313'] include = '\.pyi?$' [tool.ruff] line-length = 100 -target-version = "py38" +target-version = "py310" [tool.ruff.lint] select = [ @@ -139,9 +137,9 @@ ignore = [ fixable = ["ALL"] [tool.mypy] -# Type-check target; mypy 2.x requires >=3.10 (it rejects "3.8"). The package -# itself still supports Python >=3.8 (see requires-python above); python_version -# here only controls which language features mypy assumes when type-checking. +# Type-check target; mypy 2.x requires >=3.10. The package supports Python >=3.10 +# (see requires-python above); python_version here only controls which language +# features mypy assumes when type-checking. python_version = "3.10" strict = true warn_return_any = true