From d897d1864888e742e8fb86f21cc8e6a56030379b Mon Sep 17 00:00:00 2001 From: Dan LaManna Date: Wed, 22 Nov 2023 11:38:19 -0500 Subject: [PATCH] Upgrade to Python 3.12 --- .github/workflows/ci.yml | 2 +- README.md | 2 +- dev/django.Dockerfile | 2 +- pyproject.toml | 2 +- runtime.txt | 2 +- setup.py | 6 ++++-- 6 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0d90eebf..d257e046 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,7 +36,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: "3.10" + python-version: "3.12" - name: Install tox run: | pip install --upgrade pip diff --git a/README.md b/README.md index 7e94b00f..d330a08f 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ but allows developers to run Python code on their native system. ### Initial Setup 1. Run `docker-compose -f ./docker-compose.yml up -d` -2. Install Python 3.10 +2. Install Python 3.12 3. Install [`psycopg2` build prerequisites](https://www.psycopg.org/docs/install.html#build-prerequisites) 4. Create and activate a new Python virtualenv diff --git a/dev/django.Dockerfile b/dev/django.Dockerfile index c463c09c..e1d7a4cb 100644 --- a/dev/django.Dockerfile +++ b/dev/django.Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.10-slim +FROM python:3.12-slim # Install system librarires for Python packages: # * psycopg2 RUN apt-get update && \ diff --git a/pyproject.toml b/pyproject.toml index 0197352d..ce3d64ff 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [tool.black] line-length = 100 skip-string-normalization = true -target-version = ["py310"] +target-version = ["py312"] exclude='\.eggs|\.git|\.mypy_cache|\.tox|\.venv|_build|buck-out|build|dist' [tool.isort] diff --git a/runtime.txt b/runtime.txt index 119ff102..44f8fbe3 100644 --- a/runtime.txt +++ b/runtime.txt @@ -1 +1 @@ -python-3.10.7 +python-3.12.0 diff --git a/setup.py b/setup.py index 7f41f66c..66525948 100644 --- a/setup.py +++ b/setup.py @@ -29,10 +29,10 @@ 'License :: OSI Approved :: Apache Software License', 'Operating System :: OS Independent', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.12', 'Programming Language :: Python', ], - python_requires='>=3.10', + python_requires='>=3.12', packages=find_packages(), include_package_data=True, install_requires=[ @@ -51,6 +51,8 @@ 'djangorestframework', 'drf-yasg', 'isic-challenge-scoring>=5.6', + # See https://github.com/axnsan12/drf-yasg/issues/874 + 'pkg_resources', 'requests', 'rules', 'uritemplate',