From 06d3211abe36af81ec5540e187dc4081dab2c013 Mon Sep 17 00:00:00 2001 From: Phil Starkey Date: Thu, 18 Apr 2024 17:22:08 +1000 Subject: [PATCH 1/4] Update CI to run on currently supported Python/Django versions --- .github/workflows/ci.yml | 24 +++++++++++++----------- tox.ini | 12 +++++------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 30aa87b..d4f02ad 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,22 +13,24 @@ jobs: fail-fast: false matrix: python-version: - - "3.6" - - "3.7" - "3.8" - "3.9" - - "pypy-3.6" - - "pypy-3.7" + - "3.10" + - "3.11" + - "3.12" + - "pypy-3.9" + - "pypy-3.10" tox-env: - - "dj22" # LTS - - "dj31" - - "dj32" # LTS + - "dj42" # LTS + - "dj50" exclude: - # Python 3.9 is compatible with Django 3.1+ + # Python 3.8/3.9 is incompatible with Django 5.0+ + - python-version: "3.8" + tox-env: "dj50" - python-version: "3.9" - tox-env: "dj22" - - python-version: "3.9" - tox-env: "dj30" + tox-env: "dj50" + - python-version: "pypy-3.9" + tox-env: "dj50" env: TOXENV: ${{ matrix.tox-env }} diff --git a/tox.ini b/tox.ini index 6e832a5..f0152f0 100644 --- a/tox.ini +++ b/tox.ini @@ -4,13 +4,12 @@ # By moving it out of the way (~500MB), we trim test execution time by > 80%. toxworkdir = {homedir}/.toxenvs/django-click envlist = - dj{22,31,32},flake8 + dj{42,50},flake8 [gh-actions] django = - 2.2: dj22 - 3.1: dj31 - 3.2: dj32 + 4.2: dj42 + 5.0: dj50 [testenv] usedevelop = true @@ -20,9 +19,8 @@ setenv = PYTHONPATH={toxinidir}/djclick/test/testprj deps = -rrequirements-test.txt - dj22: django>=2.2,<2.3 - dj31: django>=3.1,<3.2 - dj32: django>=3.2,<3.3 + dj42: django>=4.2,<4.3 + dj50: django>=5.0,<5.1 commands = py.test -rxs --cov-report= --cov-append --cov djclick {posargs:djclick} From 4e15ae1b5649c0c121dcd72bc1c15a01a20990cb Mon Sep 17 00:00:00 2001 From: Phil Starkey Date: Thu, 18 Apr 2024 17:37:09 +1000 Subject: [PATCH 2/4] Fix tox config and lint Python version --- .github/workflows/ci.yml | 4 ++-- tox.ini | 6 +----- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d4f02ad..f7180c8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -68,10 +68,10 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Set up Python 3.6 + - name: Set up Python 3.12 uses: actions/setup-python@v2 with: - python-version: '3.6' + python-version: '3.12' - name: Install tox and flake8 packages run: pip install tox tox-gh-actions flake8 diff --git a/tox.ini b/tox.ini index f0152f0..10adc01 100644 --- a/tox.ini +++ b/tox.ini @@ -1,8 +1,4 @@ [tox] -# Having the .tox directory in the project directory slows down the -# `pip install -e .` step required by `usedevelop = true` considerably. -# By moving it out of the way (~500MB), we trim test execution time by > 80%. -toxworkdir = {homedir}/.toxenvs/django-click envlist = dj{42,50},flake8 @@ -12,7 +8,7 @@ django = 5.0: dj50 [testenv] -usedevelop = true +package = editable passenv = LC_ALL, LANG, LC_CTYPE setenv = DJANGO_SETTINGS_MODULE=testprj.settings From d3dc8b59f02534898721376834a0b845da50553b Mon Sep 17 00:00:00 2001 From: Phil Starkey Date: Thu, 18 Apr 2024 17:48:22 +1000 Subject: [PATCH 3/4] Drop PyPy support which seems to be incompatible with type annotations in modern Django --- .github/workflows/ci.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f7180c8..bf8c922 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,8 +18,6 @@ jobs: - "3.10" - "3.11" - "3.12" - - "pypy-3.9" - - "pypy-3.10" tox-env: - "dj42" # LTS - "dj50" @@ -29,8 +27,6 @@ jobs: tox-env: "dj50" - python-version: "3.9" tox-env: "dj50" - - python-version: "pypy-3.9" - tox-env: "dj50" env: TOXENV: ${{ matrix.tox-env }} From 2c241984f0415acd098151307dac01653885e490 Mon Sep 17 00:00:00 2001 From: Phil Starkey Date: Thu, 18 Apr 2024 17:48:55 +1000 Subject: [PATCH 4/4] Update readme with supported version changes. Drop `requires.io` badge as the domain is for sale. --- README.rst | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/README.rst b/README.rst index f9aae3d..9e4e809 100644 --- a/README.rst +++ b/README.rst @@ -27,15 +27,12 @@ Automated code metrics: .. image:: https://img.shields.io/codeclimate/github/GaretJax/django-click.svg :target: https://codeclimate.com/github/GaretJax/django-click -.. image:: https://img.shields.io/requires/github/GaretJax/django-click.svg - :target: https://requires.io/github/GaretJax/django-click/requirements/?branch=master - ``django-click`` is a library to easily write Django management commands using the ``click`` command line library. * Free software: MIT license * Documentation for the Click command line library: https://click.palletsprojects.com/en/8.0.x/ -* Compatible with Django 2.2, 3.1, or 3.2 running on Python 3.6, 3.7, 3.8, 3.9, and PyPy. +* Compatible with Django 4.2 and 5.0 running on Python 3.8, 3.9, 3.10, 3.11, and 3.12 (note: 3.10+ required for Django 5.0). Installation