From 082815dfb39ecfd4c7fe5fa1d0a0a85c7fe958c8 Mon Sep 17 00:00:00 2001 From: Nate Prewitt Date: Mon, 14 Aug 2023 15:41:24 -0700 Subject: [PATCH] Add Python 3.12 support (#272) --- .changes/next-release/enhancement-Python-27390.json | 5 +++++ .github/workflows/run-tests.yml | 2 +- requirements-dev.txt | 1 + scripts/ci/install-dev-deps | 3 +++ setup.py | 2 ++ tox.ini | 2 +- 6 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 .changes/next-release/enhancement-Python-27390.json diff --git a/.changes/next-release/enhancement-Python-27390.json b/.changes/next-release/enhancement-Python-27390.json new file mode 100644 index 00000000..7629e6a2 --- /dev/null +++ b/.changes/next-release/enhancement-Python-27390.json @@ -0,0 +1,5 @@ +{ + "type": "enhancement", + "category": "Python", + "description": "Added provisional Python 3.12 support to s3transfer" +} diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 12b39b8c..be9cba13 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -15,7 +15,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] + python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12-dev"] steps: - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 diff --git a/requirements-dev.txt b/requirements-dev.txt index bfd0a688..05a8849d 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -2,6 +2,7 @@ psutil>=4.1.0,<5.0.0 tabulate==0.7.5 coverage==5.5 wheel==0.38.1 +setuptools==67.8.0;python_version>="3.12" # Pytest specific deps pytest==7.1.2 diff --git a/scripts/ci/install-dev-deps b/scripts/ci/install-dev-deps index df9fd15f..74773764 100755 --- a/scripts/ci/install-dev-deps +++ b/scripts/ci/install-dev-deps @@ -1,5 +1,6 @@ #!/usr/bin/env python import os +import sys from contextlib import contextmanager from subprocess import check_call @@ -25,4 +26,6 @@ def run(command): if __name__ == "__main__": with cd(REPO_ROOT): + if sys.version_info[:2] >= (3, 12): + run("pip install setuptools") run("pip install -r requirements-dev-lock.txt") diff --git a/setup.py b/setup.py index 91d55708..c194bdbe 100644 --- a/setup.py +++ b/setup.py @@ -41,10 +41,12 @@ def get_version(): 'License :: OSI Approved :: Apache Software License', 'Programming Language :: Python', 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3 :: Only', 'Programming Language :: Python :: 3.7', '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', ], ) diff --git a/tox.ini b/tox.ini index 3a4758cd..101927bb 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py37,py38,py39,py310,py311 +envlist = py37,py38,py39,py310,py311,py312 # Comment to build sdist and install into virtualenv # This is helpful to test installation but takes extra time