From 19d955c028c5b8e37e46358a02af1cbdbb1e48f0 Mon Sep 17 00:00:00 2001 From: Clinton Blackburn Date: Sun, 11 Aug 2024 09:08:20 -0700 Subject: [PATCH] Updated Python and Django version support --- .github/workflows/test.yml | 22 ++++++++++------------ runtests.py | 6 ------ setup.py | 7 +++++-- tox.ini | 13 ++++++++----- 4 files changed, 23 insertions(+), 25 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b5a371d..3b7d9b7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,20 +9,17 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.8', '3.9', '3.10'] - django-version: ['3.2', '4.2', 'main'] + python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] + django-version: ['4.2', '5.0', '5.1', 'main'] include: - - python-version: '3.7' - django-version: '3.2' - exclude: - python-version: '3.8' - django-version: 'main' + django-version: '4.2' - python-version: '3.9' - django-version: 'main' + django-version: '4.2' services: postgres: - image: postgres:13 + image: postgres:16 env: POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres @@ -36,12 +33,13 @@ jobs: --health-retries 5 mariadb: - image: mariadb:10 + image: mariadb:11.4 env: - MYSQL_ROOT_PASSWORD: mysql - MYSQL_DATABASE: mysql + MARIADB_USER: root + MARIADB_ROOT_PASSWORD: mysql + MARIADB_DATABASE: mysql options: >- - --health-cmd "mysqladmin ping" + --health-cmd "healthcheck.sh --connect --innodb_initialized" --health-interval 10s --health-timeout 5s --health-retries 5 diff --git a/runtests.py b/runtests.py index 2c1acb7..532810f 100755 --- a/runtests.py +++ b/runtests.py @@ -17,12 +17,6 @@ def runtests(*args): warnings.filterwarnings("ignore", module="distutils") - # Ignore a python 3.6 DeprecationWarning in ModelBase.__new__ that isn't - # fixed in Django 1.x - if sys.version_info > (3, 6) and django.VERSION < (2,): - warnings.filterwarnings( - "ignore", "__class__ not set defining", DeprecationWarning) - test_apps = list(args or DEFAULT_TEST_APPS) print([sys.argv[0], 'test', '--verbosity=1'] + test_apps) execute_from_command_line([sys.argv[0], 'test', '--verbosity=1'] + test_apps) diff --git a/setup.py b/setup.py index 051e0c3..153ce4f 100755 --- a/setup.py +++ b/setup.py @@ -45,8 +45,9 @@ def read(filename): 'Development Status :: 5 - Production/Stable', 'Environment :: Web Environment', 'Framework :: Django', - 'Framework :: Django :: 3.2', - 'Framework :: Django :: 4.0', + 'Framework :: Django :: 4.2', + 'Framework :: Django :: 5.0', + 'Framework :: Django :: 5.1', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Natural Language :: English', @@ -56,5 +57,7 @@ def read(filename): '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 722c019..567ade0 100644 --- a/tox.ini +++ b/tox.ini @@ -1,22 +1,24 @@ [tox] envlist = - {py37,py38,py39,py310}-django32-{sqlite3,mysql,postgresql} - {py38,py39,py310}-django{42,main}-{sqlite3,mysql,postgresql} + {py38,py39,py310,py311,py312}-django42-{sqlite3,mysql,postgresql} + {py310,py311,py312}-django{50,51,main}-{sqlite3,mysql,postgresql} quality dist-validation qunit [gh-actions] python = - 3.7: py37 3.8: py38 3.9: py39 3.10: py310 + 3.11: py311 + 3.12: py312 [gh-actions:env] DJANGO = - 3.2: django32 4.2: django42 + 5.0: django50 + 5.1: django51 main: djangomain [testenv] @@ -24,8 +26,9 @@ deps = coverage mysql: mysqlclient postgresql: psycopg2-binary - django32: Django>=3.2,<3.3 django42: Django>=4.2,<4.3 + django50: Django>=5.0,<5.1 + django51: Django>=5.1,<5.2 djangomain: https://github.com/django/django/archive/main.tar.gz ignore_outcome = main: True