From 4f0871b0fe0f2c68fad39d8b9815be9fbe1c5883 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20V=C3=A4lim=C3=A4ki?= <110451292+villevsv-upcloud@users.noreply.github.com> Date: Thu, 30 May 2024 09:51:34 +0300 Subject: [PATCH] chore(python): support versions from 3.8 to 3.12 (#145) --- .github/workflows/main.yml | 23 ++++++++++++----------- CHANGELOG.md | 4 ++++ README.md | 4 +++- pyproject.toml | 4 ++-- setup.cfg | 2 +- tox.ini | 2 +- 6 files changed, 23 insertions(+), 16 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 882b24e..25f47ee 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -8,29 +8,30 @@ jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Setup Python - uses: actions/setup-python@v4 + uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0 with: - python-version: 3.11 - - uses: pre-commit/action@v3.0.0 + python-version: 3.12 + - uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1 build: runs-on: ubuntu-latest strategy: matrix: tox_env: - - py37 - py38 - py39 - py310 + - py311 + - py312 - pypy3 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Fedora Tox with ${{ matrix.tox_env }} - uses: fedora-python/tox-github-action@v37.0 + uses: fedora-python/tox-github-action@6f0add50b32e4bedfd98976984ffa499af4c218b # v39.0 with: tox_env: ${{ matrix.tox_env }} - - uses: actions/setup-python@v4 + - uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0 with: cache: pip cache-dependency-path: | @@ -40,9 +41,9 @@ jobs: name: Build deploy runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - - uses: casperdcl/deploy-pypi@v2.3.2 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0 + - uses: casperdcl/deploy-pypi@10cf4cd83fc885003a8d4f37f93a5a0f0fc2d2f4 # v2.4.1 with: password: ${{ secrets.PYPI_TOKEN }} build: true diff --git a/CHANGELOG.md b/CHANGELOG.md index 581a77c..df5c659 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Added `encrypted` boolean flag to Storage for encryption at rest support +### Changed + +- Python versions supported: 3.8, 3.9, 3.10, 3.11, 3.12, PyPy3. Dropped support for 3.7. + ## [2.5.1] - 2023-09-19 ### Added diff --git a/README.md b/README.md index 68c2480..30c2313 100644 --- a/README.md +++ b/README.md @@ -24,9 +24,11 @@ python setup.py install ### Supported Python versions in API v2.5.1 -- Python 3.7 - Python 3.8 - Python 3.9 +- Python 3.10 +- Python 3.11 +- Python 3.12 - PyPy3 **Python 2 has been deprecated** diff --git a/pyproject.toml b/pyproject.toml index 6fb2a87..a13ebdf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,10 +1,10 @@ [tool.black] line-length = 99 -target-version = ['py37'] +target-version = ['py38'] skip-string-normalization = true [tool.ruff] -target-version = "py37" +target-version = "py38" exclude = [ ".git", "ENV", diff --git a/setup.cfg b/setup.cfg index 2c4d217..46b7c15 100644 --- a/setup.cfg +++ b/setup.cfg @@ -11,7 +11,7 @@ packages=['upcloud_api', 'upcloud_api.cloud_manager'] license = MIT [options] -python_requires = >=3.7, <4 +python_requires = >=3.8, <4 setup_requires = setuptools install_requires = diff --git a/tox.ini b/tox.ini index 3c70186..31ea22a 100644 --- a/tox.ini +++ b/tox.ini @@ -4,7 +4,7 @@ # and then run "tox" from this directory. [tox] -envlist = py37, py38, py39, py310, pypy3 +envlist = py38, py39, py310, py311, py312, pypy3 skip_missing_interpreters = True [testenv]