From 9e7833826d95fe7b5fdbf8bbbeb897fa2a397f66 Mon Sep 17 00:00:00 2001 From: oligirling Date: Fri, 13 Feb 2026 07:01:08 +0000 Subject: [PATCH] Add Python 3.14 support, raise minimum to 3.10 - Update Dockerfile to python:3.14-alpine base image - Bump package version to 1.1.0 - Set python_requires>=3.10 and add version classifiers (3.10-3.14) - Fix author_name -> author (correct setuptools field) - Fix unclosed file handle in setup.py (use context manager) - Modernize class syntax (remove redundant object inheritance) - Update CI matrix to test 3.10, 3.12, 3.14 - Update GitHub Actions to checkout@v4 and setup-python@v5 - Update README prerequisites - Add CHANGELOG.md All 36 tests pass with 100% coverage on Python 3.14.3. Co-Authored-By: Claude Sonnet 4.5 --- .github/workflows/tests.yml | 8 ++++---- CHANGELOG.md | 27 +++++++++++++++++++++++++++ Dockerfile | 2 +- README.md | 4 ++-- currencyapinet/currency.py | 2 +- currencyapinet/endpoints/endpoint.py | 2 +- setup.py | 15 +++++++++++---- 7 files changed, 47 insertions(+), 13 deletions(-) create mode 100644 CHANGELOG.md diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 5797617..b2cf77e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -8,14 +8,14 @@ jobs: strategy: matrix: - python-version: ["3.7", "3.9"] + python-version: ["3.10", "3.12", "3.14"] steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} @@ -26,4 +26,4 @@ jobs: run: python -m coverage run -m unittest discover - name: Upload coverage to Coveralls - uses: coverallsapp/github-action@v2 \ No newline at end of file + uses: coverallsapp/github-action@v2 diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..8833a26 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,27 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +## [1.1.0] - 2026-02-13 + +### Added +- Python 3.14 support +- Python version classifiers in package metadata (3.10-3.14) +- `python_requires` constraint in setup.py +- CHANGELOG.md + +### Changed +- Minimum Python version raised from 3.5 to 3.10 +- Dockerfile updated to use `python:3.14-alpine` base image +- GitHub Actions CI matrix updated to test Python 3.10, 3.12, and 3.14 +- GitHub Actions updated to use `actions/checkout@v4` and `actions/setup-python@v5` +- Modernized class syntax (removed redundant `object` inheritance) +- Fixed `author_name` to `author` in setup.py (correct setuptools field) +- Fixed unclosed file handle in setup.py (now uses context manager) + +### Removed +- Support for Python 3.5-3.9 (all EOL) + +## [1.0.4] - Previous release + +- Initial tracked version diff --git a/Dockerfile b/Dockerfile index 85703ce..10d6c99 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3-alpine +FROM python:3.14-alpine WORKDIR /app diff --git a/README.md b/README.md index 89925fc..3473a39 100644 --- a/README.md +++ b/README.md @@ -29,8 +29,8 @@ Alternatively keep reading below. #### Prerequisites -- Minimum Python version 3.5 -- Last tested and working on Python 3.11.5 +- Minimum Python version 3.10 +- Last tested and working on Python 3.14 - Free or Paid account with CurrencyApi.net #### Test Coverage diff --git a/currencyapinet/currency.py b/currencyapinet/currency.py index 6560e99..9595d7f 100644 --- a/currencyapinet/currency.py +++ b/currencyapinet/currency.py @@ -4,7 +4,7 @@ from currencyapinet.endpoints.timeframe import Timeframe from currencyapinet.endpoints.currencies import Currencies -class Currency(object): +class Currency: def __init__(self, api_key: str): self._api_key = api_key diff --git a/currencyapinet/endpoints/endpoint.py b/currencyapinet/endpoints/endpoint.py index f1ef2ec..884a7ab 100644 --- a/currencyapinet/endpoints/endpoint.py +++ b/currencyapinet/endpoints/endpoint.py @@ -6,7 +6,7 @@ DEFAULT_OUTPUT = 'JSON' XML_OUTPUT = 'XML' -class Endpoint(object): +class Endpoint: def __init__(self, api_key: str, endpoint: str): self.api_key = api_key self.endpoint = endpoint.lower() diff --git a/setup.py b/setup.py index 684a37e..7a8f355 100644 --- a/setup.py +++ b/setup.py @@ -1,26 +1,33 @@ from setuptools import setup, find_packages from os.path import abspath, dirname, join -README_MD = open(join(dirname(abspath(__file__)), "README.md")).read() +with open(join(dirname(abspath(__file__)), "README.md")) as f: + README_MD = f.read() setup( name="currencyapinet", - version="1.0.4", + version="1.1.0", packages=find_packages(exclude="tests"), description="Python wrapper for CurrencyApi.net", long_description=README_MD, long_description_content_type="text/markdown", url="https://currencyapi.net/sdk/python", - author_name="Oli Girling", + author="Oli Girling", author_email="support@currencyapi.net", + python_requires=">=3.10", classifiers=[ "License :: OSI Approved :: MIT License", "Intended Audience :: Developers", "Programming Language :: Python :: 3 :: Only", + "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 :: Software Development :: Libraries :: Python Modules", ], install_requires=[ "requests" ], keywords="currency feed, currency rates, currencyapi, currency", -) \ No newline at end of file +)