Skip to content

Drop support for Python 3.7 #1719

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
fail-fast: false
max-parallel: 5
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
python-version: ['3.8', '3.9', '3.10', '3.11']

services:
mariadb:
Expand Down Expand Up @@ -77,7 +77,7 @@ jobs:
fail-fast: false
max-parallel: 5
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
python-version: ['3.8', '3.9', '3.10', '3.11']
database: [postgresql, postgis]

services:
Expand Down Expand Up @@ -146,7 +146,7 @@ jobs:
fail-fast: false
max-parallel: 5
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
python-version: ['3.8', '3.9', '3.10', '3.11']

steps:
- uses: actions/checkout@v3
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ repos:
rev: v3.3.1
hooks:
- id: pyupgrade
args: [--py37-plus]
args: [--py38-plus]
- repo: https://github.com/adamchainz/django-upgrade
rev: 1.12.0
hooks:
Expand Down Expand Up @@ -58,7 +58,7 @@ repos:
hooks:
- id: black
language_version: python3
entry: black --target-version=py37
entry: black --target-version=py38
- repo: https://github.com/tox-dev/pyproject-fmt
rev: 0.4.1
hooks:
Expand Down
2 changes: 1 addition & 1 deletion debug_toolbar/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def show_toolbar(request):
return settings.DEBUG and request.META.get("REMOTE_ADDR") in settings.INTERNAL_IPS


@lru_cache()
@lru_cache
def get_show_toolbar():
# If SHOW_TOOLBAR_CALLBACK is a string, which is the recommended
# setup, resolve it to the corresponding callable.
Expand Down
4 changes: 2 additions & 2 deletions debug_toolbar/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
}


@lru_cache()
@lru_cache
def get_config():
USER_CONFIG = getattr(settings, "DEBUG_TOOLBAR_CONFIG", {})
CONFIG = CONFIG_DEFAULTS.copy()
Expand All @@ -70,7 +70,7 @@ def get_config():
]


@lru_cache()
@lru_cache
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automatically changed by pyupgrade.

def get_panels():
try:
PANELS = list(settings.DEBUG_TOOLBAR_PANELS)
Expand Down
1 change: 1 addition & 0 deletions docs/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Pending
-------

* Added Django 4.2a1 to the CI.
* Dropped support for Python 3.7.
* Fixed PostgreSQL raw query with a tuple parameter during on explain.
* Use ``TOOLBAR_LANGUAGE`` setting when rendering individual panels
that are loaded via AJAX.
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ license = {text = "BSD-3-Clause"}
authors = [
{ name = "Rob Hudson" },
]
requires-python = ">=3.7"
requires-python = ">=3.8"
dependencies = [
"Django>=3.2.4",
"sqlparse>=0.2",
Expand All @@ -27,13 +27,13 @@ classifiers = [
"Framework :: Django :: 3.2",
"Framework :: Django :: 4.0",
"Framework :: Django :: 4.1",
# "Framework :: Django :: 4.2",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The identifier doesn't seem to be available yet.

"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
Expand Down
15 changes: 7 additions & 8 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ isolated_build = true
envlist =
docs
packaging
py{37}-dj{32}-{sqlite,postgresql,postgis,mysql}
py{38,39,310}-dj{32,40,41,42}-{sqlite,postgresql,postgis,mysql}
py{38,39,310}-dj{32,41,42}-{sqlite,postgresql,postgis,mysql}
py{310}-dj{40}-{sqlite}
py{310,311}-dj{41,42,main}-{sqlite,postgresql,postgis,mysql}

[testenv]
Expand Down Expand Up @@ -37,7 +37,7 @@ setenv =
PYTHONPATH = {toxinidir}
PYTHONWARNINGS = d
py39-dj32-postgresql: DJANGO_SELENIUM_TESTS = true
py310-dj40-postgresql: DJANGO_SELENIUM_TESTS = true
py310-dj41-postgresql: DJANGO_SELENIUM_TESTS = true
DB_NAME = {env:DB_NAME:debug_toolbar}
DB_USER = {env:DB_USER:debug_toolbar}
DB_HOST = {env:DB_HOST:localhost}
Expand All @@ -47,25 +47,25 @@ allowlist_externals = make
pip_pre = True
commands = python -b -W always -m coverage run -m django test -v2 {posargs:tests}

[testenv:py{37,38,39,310,311}-dj{32,40,41,main}-postgresql]
[testenv:py{38,39,310,311}-dj{32,40,41,42,main}-postgresql]
setenv =
{[testenv]setenv}
DB_BACKEND = postgresql
DB_PORT = {env:DB_PORT:5432}

[testenv:py{37,38,39,310,311}-dj{32,40,41,main}-postgis]
[testenv:py{38,39,310,311}-dj{32,40,41,42,main}-postgis]
setenv =
{[testenv]setenv}
DB_BACKEND = postgis
DB_PORT = {env:DB_PORT:5432}

[testenv:py{37,38,39,310,311}-dj{32,40,41,main}-mysql]
[testenv:py{38,39,310,311}-dj{32,40,41,42,main}-mysql]
setenv =
{[testenv]setenv}
DB_BACKEND = mysql
DB_PORT = {env:DB_PORT:3306}

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

[gh-actions]
python =
3.7: py37
3.8: py38
3.9: py39
3.10: py310
Expand Down