From f52fae20dbf85ab42bb73dfbe6f83c12ed9eff6e Mon Sep 17 00:00:00 2001 From: Steve Lacey Date: Wed, 4 Jan 2023 13:30:04 +0800 Subject: [PATCH] Support Python 3.11 on Django 4.1 --- .github/workflows/ci.yml | 11 +++++++++-- .python-version | 2 +- Dockerfile | 4 ++-- README.md | 2 +- bin/python | 5 +++++ setup.py | 1 + 6 files changed, 19 insertions(+), 6 deletions(-) create mode 100755 bin/python diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a563303..e0de0c7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,12 +23,18 @@ concurrency: jobs: test: - name: test runs-on: ubuntu-latest + strategy: matrix: - python: [3.8, 3.9, "3.10"] + python: [3.8, 3.9, "3.10", 3.11] django: [3.2, "4.0", 4.1] + exclude: + - python: 3.11 + django: 3.2 + - python: 3.11 + django: 4.0 + steps: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 @@ -41,6 +47,7 @@ jobs: lint: runs-on: ubuntu-latest + steps: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 diff --git a/.python-version b/.python-version index 54c5196..371cfe3 100644 --- a/.python-version +++ b/.python-version @@ -1 +1 @@ -3.10.9 +3.11.1 diff --git a/Dockerfile b/Dockerfile index 89bf969..da94110 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.10.9-buster +FROM python:3.11.1-buster RUN apt-get update -y && \ apt-get install -y git && \ @@ -13,4 +13,4 @@ COPY Pipfile.lock Pipfile.lock COPY setup.py setup.py COPY worf/ worf/ -RUN pipenv install --dev --deploy --python 3.10.9 +RUN pipenv install --dev --deploy --python 3.11.1 diff --git a/README.md b/README.md index e8ee135..fb50ef7 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,7 @@ INSTALLED_APPS = [ Requirements ------------ -- Python (3.8, 3.9, 3.10) +- Python (3.8, 3.9, 3.10, 3.11) - Django (3.2, 4.0, 4.1) diff --git a/bin/python b/bin/python new file mode 100755 index 0000000..f7e6545 --- /dev/null +++ b/bin/python @@ -0,0 +1,5 @@ +#!/bin/bash + +set -eou pipefail + +$(dirname "$0")/pipenv run python "$@" diff --git a/setup.py b/setup.py index 5e2541d..c49d186 100644 --- a/setup.py +++ b/setup.py @@ -45,6 +45,7 @@ def get_version(rel_path): "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules", ],