From adde8b66f670684a1335b1b6274ccd63e8b8de91 Mon Sep 17 00:00:00 2001 From: zerolab Date: Thu, 13 Jul 2023 20:02:20 +0100 Subject: [PATCH] Drop support for Python 3.7 --- .github/workflows/test.yml | 12 ++++++------ .pre-commit-config.yaml | 2 +- README.md | 4 ++-- docs/getting_started/tutorial.md | 4 ++-- docs/releases/upgrading.md | 4 ++-- ruff.toml | 2 ++ setup.py | 3 +-- tox.ini | 3 +-- 8 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5ed39a14a0..22ed4b3101 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -20,7 +20,7 @@ concurrency: # - test runs with USE_EMAIL_USER_MODEL=yes and DISABLE_TIMEZONE=yes # Current configuration: -# - django 3.2, python 3.7, postgres +# - django 3.2, python 3.8, postgres # - django 3.2, python 3.8, mysql # - django 4.1, python 3.9, sqlite # - django 4.2, python 3.10, mysql @@ -28,8 +28,8 @@ concurrency: # - django 4.2, python 3.11, postgres, DISABLE_TIMEZONE=yes # - django stable/4.2.x, python 3.10, postgres (allow failures) # - django main, python 3.10, postgres (allow failures) -# - elasticsearch 5, django 3.2, python 3.7, sqlite -# - elasticsearch 6, django 3.2, python 3.7, postgres +# - elasticsearch 5, django 3.2, python 3.8, sqlite +# - elasticsearch 6, django 3.2, python 3.8, postgres # - elasticsearch 7, django 4.1, python 3.8, postgres # - elasticsearch 7, django 4.2, python 3.9, sqlite, USE_EMAIL_USER_MODEL=yes @@ -73,7 +73,7 @@ jobs: strategy: matrix: include: - - python: '3.7' + - python: '3.8' django: 'Django>=3.2,<3.3' experimental: false - python: '3.11' @@ -191,7 +191,7 @@ jobs: strategy: matrix: include: - - python: '3.7' + - python: '3.8' django: 'Django>=3.2,<3.3' steps: - name: Configure sysctl limits @@ -285,7 +285,7 @@ jobs: strategy: matrix: include: - - python: '3.7' + - python: '3.8' django: 'Django>=3.2,<3.3' services: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 73f9fc886d..162209d1d3 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,7 +7,7 @@ repos: hooks: - id: black language_version: python3 - args: ['--target-version', 'py37'] + args: ['--target-version', 'py38'] - repo: https://github.com/astral-sh/ruff-pre-commit rev: 'v0.0.272' diff --git a/README.md b/README.md index 6bb0a3de75..9948530460 100644 --- a/README.md +++ b/README.md @@ -82,10 +82,10 @@ _(If you are reading this on GitHub, the details here may not be indicative of t Wagtail supports: - Django 3.2.x, 4.1.x and 4.2.x -- Python 3.7, 3.8, 3.9, 3.10 and 3.11 +- Python 3.8, 3.9, 3.10 and 3.11 - PostgreSQL, MySQL and SQLite (with JSON1) as database backends -[Previous versions of Wagtail](https://docs.wagtail.org/en/stable/releases/upgrading.html#compatible-django-python-versions) additionally supported Python 2.7 and earlier Django versions. +[Previous versions of Wagtail](https://docs.wagtail.org/en/stable/releases/upgrading.html#compatible-django-python-versions) additionally supported Python 2.7, 3.7 and earlier Django versions. --- diff --git a/docs/getting_started/tutorial.md b/docs/getting_started/tutorial.md index adffd68397..3db0ac2dd2 100644 --- a/docs/getting_started/tutorial.md +++ b/docs/getting_started/tutorial.md @@ -12,7 +12,7 @@ If you want to add Wagtail to an existing Django project instead, see [](integra ### Install dependencies -Wagtail supports Python 3.7, 3.8, 3.9, 3.10, and 3.11. +Wagtail supports Python 3.8, 3.9, 3.10, and 3.11. To check if you have an appropriate version of Python 3, run the following command: @@ -24,7 +24,7 @@ python3 --version py --version ``` -If none of the preceding commands return a version number, or return a version lower than 3.7, then [install Python 3](https://www.python.org/downloads/). +If none of the preceding commands return a version number, or return a version lower than 3.8, then [install Python 3](https://www.python.org/downloads/). (virtual_environment_creation)= diff --git a/docs/releases/upgrading.md b/docs/releases/upgrading.md index e008e3a245..f2cad1db1f 100644 --- a/docs/releases/upgrading.md +++ b/docs/releases/upgrading.md @@ -58,8 +58,8 @@ New feature releases frequently add support for newer versions of Django and Pyt The compatible versions of Django and Python for each Wagtail release are: | Wagtail release | Compatible Django versions | Compatible Python versions | -| --------------- | -------------------------- | -------------------------- | -| 5.1 | 3.2, 4.1, 4.2 | 3.7, 3.8, 3.9, 3.10, 3.11 | +| --------------- | -------------------------- |----------------------------| +| 5.1 | 3.2, 4.1, 4.2 | 3.8, 3.9, 3.10, 3.11 | | 5.0 | 3.2, 4.1, 4.2 | 3.7, 3.8, 3.9, 3.10, 3.11 | | 4.2 | 3.2, 4.0, 4.1 | 3.7, 3.8, 3.9, 3.10, 3.11 | | 4.1 LTS | 3.2, 4.0, 4.1 | 3.7, 3.8, 3.9, 3.10, 3.11 | diff --git a/ruff.toml b/ruff.toml index 0176566151..8232b75ec2 100644 --- a/ruff.toml +++ b/ruff.toml @@ -9,6 +9,8 @@ ignore = ["D100","D101","D102","D103","D105","N806","E501"] exclude = ["wagtail/project_template/*","node_modules","venv",".venv","migrations"] line-length = 88 +target-version = "py38" # minimum target version + # E: pycodestyle errors # F: Pyflakes # I: isort diff --git a/setup.py b/setup.py index 3370734ae0..0c56bcb756 100755 --- a/setup.py +++ b/setup.py @@ -106,7 +106,6 @@ https://github.com/wagtail/wagtail/.", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", @@ -118,7 +117,7 @@ https://github.com/wagtail/wagtail/.", "Framework :: Wagtail", "Topic :: Internet :: WWW/HTTP :: Site Management", ], - python_requires=">=3.7", + python_requires=">=3.8", install_requires=install_requires, extras_require={"testing": testing_extras, "docs": documentation_extras}, entry_points=""" diff --git a/tox.ini b/tox.ini index 7dc8a61314..622ca6209a 100644 --- a/tox.ini +++ b/tox.ini @@ -2,7 +2,7 @@ skipsdist = True usedevelop = True -envlist = py{37,38,39,310,311}-dj{32,41,42,42stable,main}-{sqlite,postgres,mysql,mssql}-{elasticsearch7,elasticsearch6,elasticsearch5,noelasticsearch}-{customuser,emailuser}-{tz,notz}, +envlist = py{38,39,310,311}-dj{32,41,42,42stable,main}-{sqlite,postgres,mysql,mssql}-{elasticsearch7,elasticsearch6,elasticsearch5,noelasticsearch}-{customuser,emailuser}-{tz,notz}, [testenv] install_command = pip install -e ".[testing]" -U {opts} {packages} @@ -13,7 +13,6 @@ commands = noelasticsearch: coverage run runtests.py {posargs} basepython = - py37: python3.7 py38: python3.8 py39: python3.9 py310: python3.10