From fdf37feb54acce5db85b36f74d1ff0f871ab25a7 Mon Sep 17 00:00:00 2001 From: Hasan Ramezani Date: Wed, 13 Apr 2022 15:07:29 +0200 Subject: [PATCH] Drop Django 2.2 support --- CHANGES.rst | 1 + README.rst | 2 +- defender/ci_settings.py | 3 +-- defender/test_settings.py | 3 +-- setup.py | 1 - tox.ini | 3 +-- 6 files changed, 5 insertions(+), 8 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 38f77ea..15deb58 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -5,6 +5,7 @@ Changes - Drop Django 3.1 support. - Confirm support for Django 4.0 - Confirm support for Python 3.10 +- Drop Django 2.2 support. 0.9.1 ----- diff --git a/README.rst b/README.rst index 064699c..1d84898 100644 --- a/README.rst +++ b/README.rst @@ -109,7 +109,7 @@ Requirements ------------ * Python: 3.6, 3.7, 3.8, 3.9, 3.10, PyPy -* Django: 2.2, 3.x, 4.x +* Django: 3.x, 4.x * Redis diff --git a/defender/ci_settings.py b/defender/ci_settings.py index b1167b8..af001db 100644 --- a/defender/ci_settings.py +++ b/defender/ci_settings.py @@ -45,12 +45,11 @@ TEMPLATES = [ "django.template.context_processors.static", "django.template.context_processors.tz", "django.contrib.messages.context_processors.messages", + "django.template.context_processors.request", ], }, }, ] -if django.VERSION >= (3, 2): - TEMPLATES[0]["OPTIONS"]["context_processors"].append("django.template.context_processors.request") SECRET_KEY = os.environ.get("SECRET_KEY", "too-secret-for-test") diff --git a/defender/test_settings.py b/defender/test_settings.py index 082c2eb..6045482 100644 --- a/defender/test_settings.py +++ b/defender/test_settings.py @@ -41,12 +41,11 @@ TEMPLATES = [ "django.template.context_processors.static", "django.template.context_processors.tz", "django.contrib.messages.context_processors.messages", + "django.template.context_processors.request", ], }, }, ] -if django.VERSION >= (3, 2): - TEMPLATES[0]["OPTIONS"]["context_processors"].append("django.template.context_processors.request") SECRET_KEY = os.environ.get("SECRET_KEY", "too-secret-for-test") diff --git a/setup.py b/setup.py index d657a1a..313540d 100644 --- a/setup.py +++ b/setup.py @@ -31,7 +31,6 @@ setup( classifiers=[ "Development Status :: 5 - Production/Stable", "Framework :: Django", - "Framework :: Django :: 2.2", "Framework :: Django :: 3.2", "Framework :: Django :: 4.0", "Intended Audience :: Developers", diff --git a/tox.ini b/tox.ini index 9f9e88f..bed262a 100644 --- a/tox.ini +++ b/tox.ini @@ -1,7 +1,7 @@ [tox] envlist = # list of supported Django/Python versions: - py{36,37,38,39,py3}-dj{22,32} + py{36,37,38,39,py3}-dj{32} py{38,39,310}-dj{40,main} py38-{lint,docs} @@ -17,7 +17,6 @@ python = [testenv] deps = -rrequirements.txt - dj22: django>=2.2,<2.3 dj32: django>=3.2,<4.0 dj40: django>=4.0,<4.1 djmain: https://github.com/django/django/archive/main.tar.gz