Skip to content

Commit 346b461

Browse files
committed
Remove Python 3.7 and only run Django 4.0 tests once
1 parent 351956f commit 346b461

File tree

7 files changed

+18
-18
lines changed

7 files changed

+18
-18
lines changed

.github/workflows/test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
fail-fast: false
1515
max-parallel: 5
1616
matrix:
17-
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
17+
python-version: ['3.8', '3.9', '3.10', '3.11']
1818

1919
services:
2020
mariadb:
@@ -77,7 +77,7 @@ jobs:
7777
fail-fast: false
7878
max-parallel: 5
7979
matrix:
80-
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
80+
python-version: ['3.8', '3.9', '3.10', '3.11']
8181
database: [postgresql, postgis]
8282

8383
services:
@@ -146,7 +146,7 @@ jobs:
146146
fail-fast: false
147147
max-parallel: 5
148148
matrix:
149-
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
149+
python-version: ['3.8', '3.9', '3.10', '3.11']
150150

151151
steps:
152152
- uses: actions/checkout@v3

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ repos:
1919
rev: v3.3.1
2020
hooks:
2121
- id: pyupgrade
22-
args: [--py37-plus]
22+
args: [--py38-plus]
2323
- repo: https://github.com/adamchainz/django-upgrade
2424
rev: 1.12.0
2525
hooks:
@@ -58,7 +58,7 @@ repos:
5858
hooks:
5959
- id: black
6060
language_version: python3
61-
entry: black --target-version=py37
61+
entry: black --target-version=py38
6262
- repo: https://github.com/tox-dev/pyproject-fmt
6363
rev: 0.4.1
6464
hooks:

debug_toolbar/middleware.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def show_toolbar(request):
2222
return settings.DEBUG and request.META.get("REMOTE_ADDR") in settings.INTERNAL_IPS
2323

2424

25-
@lru_cache()
25+
@lru_cache
2626
def get_show_toolbar():
2727
# If SHOW_TOOLBAR_CALLBACK is a string, which is the recommended
2828
# setup, resolve it to the corresponding callable.

debug_toolbar/settings.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
}
4646

4747

48-
@lru_cache()
48+
@lru_cache
4949
def get_config():
5050
USER_CONFIG = getattr(settings, "DEBUG_TOOLBAR_CONFIG", {})
5151
CONFIG = CONFIG_DEFAULTS.copy()
@@ -70,7 +70,7 @@ def get_config():
7070
]
7171

7272

73-
@lru_cache()
73+
@lru_cache
7474
def get_panels():
7575
try:
7676
PANELS = list(settings.DEBUG_TOOLBAR_PANELS)

docs/changes.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Pending
55
-------
66

77
* Added Django 4.2a1 to the CI.
8+
* Dropped support for Python 3.7.
89
* Fixed PostgreSQL raw query with a tuple parameter during on explain.
910
* Use ``TOOLBAR_LANGUAGE`` setting when rendering individual panels
1011
that are loaded via AJAX.

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ license = {text = "BSD-3-Clause"}
1212
authors = [
1313
{ name = "Rob Hudson" },
1414
]
15-
requires-python = ">=3.7"
15+
requires-python = ">=3.8"
1616
dependencies = [
1717
"Django>=3.2.4",
1818
"sqlparse>=0.2",
@@ -27,13 +27,13 @@ classifiers = [
2727
"Framework :: Django :: 3.2",
2828
"Framework :: Django :: 4.0",
2929
"Framework :: Django :: 4.1",
30+
# "Framework :: Django :: 4.2",
3031
"Intended Audience :: Developers",
3132
"License :: OSI Approved :: BSD License",
3233
"Operating System :: OS Independent",
3334
"Programming Language :: Python",
3435
"Programming Language :: Python :: 3",
3536
"Programming Language :: Python :: 3 :: Only",
36-
"Programming Language :: Python :: 3.7",
3737
"Programming Language :: Python :: 3.8",
3838
"Programming Language :: Python :: 3.9",
3939
"Programming Language :: Python :: 3.10",

tox.ini

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ isolated_build = true
33
envlist =
44
docs
55
packaging
6-
py{37}-dj{32}-{sqlite,postgresql,postgis,mysql}
7-
py{38,39,310}-dj{32,40,41,42}-{sqlite,postgresql,postgis,mysql}
6+
py{38,39,310}-dj{32,41,42}-{sqlite,postgresql,postgis,mysql}
7+
py{310}-dj{40}-{sqlite}
88
py{310,311}-dj{41,42,main}-{sqlite,postgresql,postgis,mysql}
99

1010
[testenv]
@@ -37,7 +37,7 @@ setenv =
3737
PYTHONPATH = {toxinidir}
3838
PYTHONWARNINGS = d
3939
py39-dj32-postgresql: DJANGO_SELENIUM_TESTS = true
40-
py310-dj40-postgresql: DJANGO_SELENIUM_TESTS = true
40+
py310-dj41-postgresql: DJANGO_SELENIUM_TESTS = true
4141
DB_NAME = {env:DB_NAME:debug_toolbar}
4242
DB_USER = {env:DB_USER:debug_toolbar}
4343
DB_HOST = {env:DB_HOST:localhost}
@@ -47,25 +47,25 @@ allowlist_externals = make
4747
pip_pre = True
4848
commands = python -b -W always -m coverage run -m django test -v2 {posargs:tests}
4949

50-
[testenv:py{37,38,39,310,311}-dj{32,40,41,main}-postgresql]
50+
[testenv:py{38,39,310,311}-dj{32,40,41,42,main}-postgresql]
5151
setenv =
5252
{[testenv]setenv}
5353
DB_BACKEND = postgresql
5454
DB_PORT = {env:DB_PORT:5432}
5555

56-
[testenv:py{37,38,39,310,311}-dj{32,40,41,main}-postgis]
56+
[testenv:py{38,39,310,311}-dj{32,40,41,42,main}-postgis]
5757
setenv =
5858
{[testenv]setenv}
5959
DB_BACKEND = postgis
6060
DB_PORT = {env:DB_PORT:5432}
6161

62-
[testenv:py{37,38,39,310,311}-dj{32,40,41,main}-mysql]
62+
[testenv:py{38,39,310,311}-dj{32,40,41,42,main}-mysql]
6363
setenv =
6464
{[testenv]setenv}
6565
DB_BACKEND = mysql
6666
DB_PORT = {env:DB_PORT:3306}
6767

68-
[testenv:py{37,38,39,310,311}-dj{32,40,41,main}-sqlite]
68+
[testenv:py{38,39,310,311}-dj{32,40,41,42,main}-sqlite]
6969
setenv =
7070
{[testenv]setenv}
7171
DB_BACKEND = sqlite3
@@ -88,7 +88,6 @@ skip_install = true
8888

8989
[gh-actions]
9090
python =
91-
3.7: py37
9291
3.8: py38
9392
3.9: py39
9493
3.10: py310

0 commit comments

Comments
 (0)