Skip to content

Commit dd53424

Browse files
committed
Merge branch 'main' into serialize-panels
2 parents 47bdabe + 982a127 commit dd53424

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+1667
-497
lines changed

.eslintrc.json

Lines changed: 0 additions & 20 deletions
This file was deleted.

.github/dependabot.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Keep GitHub Actions up to date with GitHub's Dependabot...
2+
# https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot
3+
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#package-ecosystem
4+
version: 2
5+
updates:
6+
- package-ecosystem: github-actions
7+
directory: /
8+
groups:
9+
github-actions:
10+
patterns:
11+
- "*" # Group all Actions updates into a single larger pull request
12+
schedule:
13+
interval: weekly

.github/workflows/coverage.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# .github/workflows/coverage.yml
2+
name: Post coverage comment
3+
4+
on:
5+
workflow_run:
6+
workflows: ["Test"]
7+
types:
8+
- completed
9+
10+
jobs:
11+
test:
12+
name: Run tests & display coverage
13+
runs-on: ubuntu-latest
14+
if: github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success'
15+
permissions:
16+
# Gives the action the necessary permissions for publishing new
17+
# comments in pull requests.
18+
pull-requests: write
19+
# Gives the action the necessary permissions for editing existing
20+
# comments (to avoid publishing multiple comments in the same PR)
21+
contents: write
22+
# Gives the action the necessary permissions for looking up the
23+
# workflow that launched this workflow, and download the related
24+
# artifact that contains the comment to be published
25+
actions: read
26+
steps:
27+
# DO NOT run actions/checkout here, for security reasons
28+
# For details, refer to https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
29+
- name: Post comment
30+
uses: py-cov-action/python-coverage-comment-action@v3
31+
with:
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
GITHUB_PR_RUN_ID: ${{ github.event.workflow_run.id }}

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ jobs:
1111
runs-on: ubuntu-latest
1212

1313
steps:
14-
- uses: actions/checkout@v2
14+
- uses: actions/checkout@v4
1515
with:
1616
fetch-depth: 0
1717

1818
- name: Set up Python
19-
uses: actions/setup-python@v2
19+
uses: actions/setup-python@v5
2020
with:
2121
python-version: 3.8
2222

.github/workflows/test.yml

Lines changed: 21 additions & 64 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.8', '3.9', '3.10', '3.11']
17+
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
1818

1919
services:
2020
mariadb:
@@ -30,20 +30,21 @@ jobs:
3030
- 3306:3306
3131

3232
steps:
33-
- uses: actions/checkout@v3
33+
- uses: actions/checkout@v4
3434

3535
- name: Set up Python ${{ matrix.python-version }}
36-
uses: actions/setup-python@v4
36+
uses: actions/setup-python@v5
3737
with:
3838
python-version: ${{ matrix.python-version }}
39+
allow-prereleases: true
3940

4041
- name: Get pip cache dir
4142
id: pip-cache
4243
run: |
4344
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
4445
4546
- name: Cache
46-
uses: actions/cache@v3
47+
uses: actions/cache@v4
4748
with:
4849
path: ${{ steps.pip-cache.outputs.dir }}
4950
key:
@@ -65,26 +66,23 @@ jobs:
6566
DB_HOST: 127.0.0.1
6667
DB_PORT: 3306
6768

68-
- name: Upload coverage data
69-
uses: actions/upload-artifact@v3
70-
with:
71-
name: coverage-data
72-
path: ".coverage.*"
7369

7470
postgres:
7571
runs-on: ubuntu-latest
7672
strategy:
7773
fail-fast: false
7874
max-parallel: 5
7975
matrix:
80-
python-version: ['3.8', '3.9', '3.10', '3.11']
76+
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
8177
database: [postgresql, postgis]
82-
# Add psycopg3 to our matrix for 3.10 and 3.11
78+
# Add psycopg3 to our matrix for modern python versions
8379
include:
8480
- python-version: '3.10'
8581
database: psycopg3
8682
- python-version: '3.11'
8783
database: psycopg3
84+
- python-version: '3.12'
85+
database: psycopg3
8886

8987
services:
9088
postgres:
@@ -102,20 +100,21 @@ jobs:
102100
--health-retries 5
103101
104102
steps:
105-
- uses: actions/checkout@v3
103+
- uses: actions/checkout@v4
106104

107105
- name: Set up Python ${{ matrix.python-version }}
108-
uses: actions/setup-python@v4
106+
uses: actions/setup-python@v5
109107
with:
110108
python-version: ${{ matrix.python-version }}
109+
allow-prereleases: true
111110

112111
- name: Get pip cache dir
113112
id: pip-cache
114113
run: |
115114
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
116115
117116
- name: Cache
118-
uses: actions/cache@v3
117+
uses: actions/cache@v4
119118
with:
120119
path: ${{ steps.pip-cache.outputs.dir }}
121120
key:
@@ -140,35 +139,30 @@ jobs:
140139
DB_HOST: localhost
141140
DB_PORT: 5432
142141

143-
- name: Upload coverage data
144-
uses: actions/upload-artifact@v3
145-
with:
146-
name: coverage-data
147-
path: ".coverage.*"
148-
149142
sqlite:
150143
runs-on: ubuntu-latest
151144
strategy:
152145
fail-fast: false
153146
max-parallel: 5
154147
matrix:
155-
python-version: ['3.8', '3.9', '3.10', '3.11']
148+
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
156149

157150
steps:
158-
- uses: actions/checkout@v3
151+
- uses: actions/checkout@v4
159152

160153
- name: Set up Python ${{ matrix.python-version }}
161-
uses: actions/setup-python@v4
154+
uses: actions/setup-python@v5
162155
with:
163156
python-version: ${{ matrix.python-version }}
157+
allow-prereleases: true
164158

165159
- name: Get pip cache dir
166160
id: pip-cache
167161
run: |
168162
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
169163
170164
- name: Cache
171-
uses: actions/cache@v3
165+
uses: actions/cache@v4
172166
with:
173167
path: ${{ steps.pip-cache.outputs.dir }}
174168
key:
@@ -187,53 +181,16 @@ jobs:
187181
DB_BACKEND: sqlite3
188182
DB_NAME: ":memory:"
189183

190-
- name: Upload coverage data
191-
uses: actions/upload-artifact@v3
192-
with:
193-
name: coverage-data
194-
path: ".coverage.*"
195-
196-
coverage:
197-
name: Check coverage.
198-
runs-on: "ubuntu-latest"
199-
needs: [sqlite, mysql, postgres]
200-
steps:
201-
- uses: actions/checkout@v3
202-
- uses: actions/setup-python@v4
203-
with:
204-
# Use latest, so it understands all syntax.
205-
python-version: "3.11"
206-
207-
- run: python -m pip install --upgrade coverage[toml]
208-
209-
- name: Download coverage data.
210-
uses: actions/download-artifact@v3
211-
with:
212-
name: coverage-data
213-
214-
- name: Combine coverage & check percentage
215-
run: |
216-
python -m coverage combine
217-
python -m coverage html
218-
python -m coverage report
219-
220-
- name: Upload HTML report if check failed.
221-
uses: actions/upload-artifact@v3
222-
with:
223-
name: html-report
224-
path: htmlcov
225-
if: ${{ failure() }}
226-
227184
lint:
228185
runs-on: ubuntu-latest
229186
strategy:
230187
fail-fast: false
231188

232189
steps:
233-
- uses: actions/checkout@v3
190+
- uses: actions/checkout@v4
234191

235192
- name: Set up Python ${{ matrix.python-version }}
236-
uses: actions/setup-python@v4
193+
uses: actions/setup-python@v5
237194
with:
238195
python-version: 3.8
239196

@@ -243,7 +200,7 @@ jobs:
243200
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
244201
245202
- name: Cache
246-
uses: actions/cache@v3
203+
uses: actions/cache@v4
247204
with:
248205
path: ${{ steps.pip-cache.outputs.dir }}
249206
key:

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,5 @@ htmlcov
1313
geckodriver.log
1414
coverage.xml
1515
venv
16+
.direnv/
17+
.envrc

.pre-commit-config.yaml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v4.4.0
3+
rev: v4.6.0
44
hooks:
55
- id: check-toml
66
- id: check-yaml
@@ -14,46 +14,46 @@ repos:
1414
hooks:
1515
- id: doc8
1616
- repo: https://github.com/adamchainz/django-upgrade
17-
rev: 1.14.0
17+
rev: 1.19.0
1818
hooks:
1919
- id: django-upgrade
20-
args: [--target-version, "3.2"]
20+
args: [--target-version, "4.2"]
2121
- repo: https://github.com/pre-commit/pygrep-hooks
2222
rev: v1.10.0
2323
hooks:
2424
- id: rst-backticks
2525
- id: rst-directive-colons
2626
- repo: https://github.com/pre-commit/mirrors-prettier
27-
rev: v3.0.1
27+
rev: v4.0.0-alpha.8
2828
hooks:
2929
- id: prettier
30+
entry: env PRETTIER_LEGACY_CLI=1 prettier
3031
types_or: [javascript, css]
3132
args:
32-
- --trailing-comma=es5
33+
- --trailing-comma=es5
3334
- repo: https://github.com/pre-commit/mirrors-eslint
34-
rev: v8.47.0
35+
rev: v9.6.0
3536
hooks:
3637
- id: eslint
38+
additional_dependencies:
39+
40+
- "@eslint/[email protected]"
41+
- "globals"
3742
files: \.js?$
3843
types: [file]
3944
args:
4045
- --fix
4146
- repo: https://github.com/astral-sh/ruff-pre-commit
42-
rev: 'v0.0.284'
47+
rev: 'v0.5.1'
4348
hooks:
4449
- id: ruff
4550
args: [--fix, --exit-non-zero-on-fix]
46-
- repo: https://github.com/psf/black
47-
rev: 23.7.0
48-
hooks:
49-
- id: black
50-
language_version: python3
51-
entry: black --target-version=py38
51+
- id: ruff-format
5252
- repo: https://github.com/tox-dev/pyproject-fmt
53-
rev: 0.13.1
53+
rev: 2.1.4
5454
hooks:
5555
- id: pyproject-fmt
5656
- repo: https://github.com/abravalheri/validate-pyproject
57-
rev: v0.13
57+
rev: v0.18
5858
hooks:
5959
- id: validate-pyproject

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ example_async:
1212
--noinput --username="$(USER)" --email="$(USER)@mailinator.com"
1313
daphne example.asgi:application
1414

15+
example_test:
16+
python example/manage.py test example
1517

1618
test:
1719
DJANGO_SETTINGS_MODULE=tests.settings \

README.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,11 @@ Here's a screenshot of the toolbar in action:
4444
In addition to the built-in panels, a number of third-party panels are
4545
contributed by the community.
4646

47-
The current stable version of the Debug Toolbar is 4.1.0. It works on
48-
Django ≥ 3.2.4.
47+
The current stable version of the Debug Toolbar is 4.4.5. It works on
48+
Django ≥ 4.2.0.
49+
50+
The Debug Toolbar does not currently support `Django's asynchronous views
51+
<https://docs.djangoproject.com/en/dev/topics/async/>`_.
4952

5053
Documentation, including installation and configuration instructions, is
5154
available at https://django-debug-toolbar.readthedocs.io/.

debug_toolbar/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
# Do not use pkg_resources to find the version but set it here directly!
66
# see issue #1446
7-
VERSION = "4.2.0"
7+
VERSION = "4.4.5"
88

99
# Code that discovers files or modules in INSTALLED_APPS imports this module.
1010
urls = "debug_toolbar.urls", APP_NAME

0 commit comments

Comments
 (0)