Skip to content

Commit 5a21920

Browse files
committed
Merge branch 'main' into serializable
- Add async union view for tests. - Add async json explain for tests.
2 parents e1c0755 + fdd636c commit 5a21920

File tree

122 files changed

+5522
-1914
lines changed

Some content is hidden

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

122 files changed

+5522
-1914
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# Description
1+
#### Description
22

33
Please include a summary of the change and which issue is fixed. Please also
44
include relevant motivation and context. Your commit message should include
55
this information as well.
66

77
Fixes # (issue)
88

9-
# Checklist:
9+
#### Checklist:
1010

1111
- [ ] I have added the relevant tests for this change.
1212
- [ ] I have added an item to the Pending section of ``docs/changes.rst``.

.github/workflows/release.yml

Lines changed: 113 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,120 @@
1-
name: Release
1+
name: Publish Python 🐍 distribution 📦 to PyPI and TestPyPI
22

3-
on:
4-
push:
5-
tags:
6-
- '*'
3+
on: push
4+
5+
env:
6+
PYPI_URL: https://pypi.org/p/django-debug-toolbar
7+
PYPI_TEST_URL: https://test.pypi.org/p/django-debug-toolbar
78

89
jobs:
10+
911
build:
10-
if: github.repository == 'jazzband/django-debug-toolbar'
12+
name: Build distribution 📦
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: Set up Python
18+
uses: actions/setup-python@v5
19+
with:
20+
python-version: "3.x"
21+
- name: Install pypa/build
22+
run:
23+
python3 -m pip install build --user
24+
- name: Build a binary wheel and a source tarball
25+
run: python3 -m build
26+
- name: Store the distribution packages
27+
uses: actions/upload-artifact@v4
28+
with:
29+
name: python-package-distributions
30+
path: dist/
31+
32+
publish-to-pypi:
33+
name: >-
34+
Publish Python 🐍 distribution 📦 to PyPI
35+
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
36+
needs:
37+
- build
38+
runs-on: ubuntu-latest
39+
environment:
40+
name: pypi
41+
url: ${{ env.PYPI_URL }}
42+
permissions:
43+
id-token: write # IMPORTANT: mandatory for trusted publishing
44+
steps:
45+
- name: Download all the dists
46+
uses: actions/download-artifact@v4
47+
with:
48+
name: python-package-distributions
49+
path: dist/
50+
- name: Publish distribution 📦 to PyPI
51+
uses: pypa/gh-action-pypi-publish@release/v1.12
52+
53+
github-release:
54+
name: >-
55+
Sign the Python 🐍 distribution 📦 with Sigstore
56+
and upload them to GitHub Release
57+
needs:
58+
- publish-to-pypi
59+
runs-on: ubuntu-latest
60+
61+
permissions:
62+
contents: write # IMPORTANT: mandatory for making GitHub Releases
63+
id-token: write # IMPORTANT: mandatory for sigstore
64+
65+
steps:
66+
- name: Download all the dists
67+
uses: actions/download-artifact@v4
68+
with:
69+
name: python-package-distributions
70+
path: dist/
71+
- name: Sign the dists with Sigstore
72+
uses: sigstore/gh-action-sigstore-python@v3.0.0
73+
with:
74+
inputs: >-
75+
./dist/*.tar.gz
76+
./dist/*.whl
77+
- name: Create GitHub Release
78+
env:
79+
GITHUB_TOKEN: ${{ github.token }}
80+
run: >-
81+
gh release create
82+
'${{ github.ref_name }}'
83+
--repo '${{ github.repository }}'
84+
--notes ""
85+
- name: Upload artifact signatures to GitHub Release
86+
env:
87+
GITHUB_TOKEN: ${{ github.token }}
88+
# Upload to GitHub Release using the `gh` CLI.
89+
# `dist/` contains the built packages, and the
90+
# sigstore-produced signatures and certificates.
91+
run: >-
92+
gh release upload
93+
'${{ github.ref_name }}' dist/**
94+
--repo '${{ github.repository }}'
95+
96+
publish-to-testpypi:
97+
name: Publish Python 🐍 distribution 📦 to TestPyPI
98+
if: startsWith(github.ref, 'refs/tags/') # only publish to Test PyPI on tag pushes
99+
needs:
100+
- build
11101
runs-on: ubuntu-latest
12102

103+
environment:
104+
name: testpypi
105+
url: ${{ env.PYPI_TEST_URL }}
106+
107+
permissions:
108+
id-token: write # IMPORTANT: mandatory for trusted publishing
109+
13110
steps:
14-
- uses: actions/checkout@v4
15-
with:
16-
fetch-depth: 0
17-
18-
- name: Set up Python
19-
uses: actions/setup-python@v5
20-
with:
21-
python-version: 3.8
22-
23-
- name: Install dependencies
24-
run: |
25-
python -m pip install -U pip
26-
python -m pip install -U build hatchling twine
27-
28-
- name: Build package
29-
run: |
30-
hatchling version
31-
python -m build
32-
twine check dist/*
33-
34-
- name: Upload packages to Jazzband
35-
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
36-
uses: pypa/gh-action-pypi-publish@release/v1
37-
with:
38-
user: jazzband
39-
password: ${{ secrets.JAZZBAND_RELEASE_KEY }}
40-
repository_url: https://jazzband.co/projects/django-debug-toolbar/upload
111+
- name: Download all the dists
112+
uses: actions/download-artifact@v4
113+
with:
114+
name: python-package-distributions
115+
path: dist/
116+
- name: Publish distribution 📦 to TestPyPI
117+
uses: pypa/gh-action-pypi-publish@release/v1.12
118+
with:
119+
repository-url: https://test.pypi.org/legacy/
120+
skip-existing: true

.github/workflows/test.yml

Lines changed: 9 additions & 4 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', '3.12']
17+
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
1818

1919
services:
2020
mariadb:
@@ -73,7 +73,8 @@ jobs:
7373
fail-fast: false
7474
max-parallel: 5
7575
matrix:
76-
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
76+
# Skip 3.13 here, it needs the psycopg3 / postgis3 database
77+
python-version: ['3.9', '3.10', '3.11', '3.12']
7778
database: [postgresql, postgis]
7879
# Add psycopg3 to our matrix for modern python versions
7980
include:
@@ -83,6 +84,10 @@ jobs:
8384
database: psycopg3
8485
- python-version: '3.12'
8586
database: psycopg3
87+
- python-version: '3.13'
88+
database: psycopg3
89+
- python-version: '3.13'
90+
database: postgis3
8691

8792
services:
8893
postgres:
@@ -145,7 +150,7 @@ jobs:
145150
fail-fast: false
146151
max-parallel: 5
147152
matrix:
148-
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
153+
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
149154

150155
steps:
151156
- uses: actions/checkout@v4
@@ -192,7 +197,7 @@ jobs:
192197
- name: Set up Python ${{ matrix.python-version }}
193198
uses: actions/setup-python@v5
194199
with:
195-
python-version: 3.8
200+
python-version: 3.9
196201

197202
- name: Get pip cache dir
198203
id: pip-cache

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ coverage.xml
1515
venv
1616
.direnv/
1717
.envrc
18+
venv

.pre-commit-config.yaml

Lines changed: 9 additions & 9 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.6.0
3+
rev: v5.0.0
44
hooks:
55
- id: check-toml
66
- id: check-yaml
@@ -10,11 +10,11 @@ repos:
1010
- id: file-contents-sorter
1111
files: docs/spelling_wordlist.txt
1212
- repo: https://github.com/pycqa/doc8
13-
rev: v1.1.1
13+
rev: v1.1.2
1414
hooks:
1515
- id: doc8
1616
- repo: https://github.com/adamchainz/django-upgrade
17-
rev: 1.19.0
17+
rev: 1.22.2
1818
hooks:
1919
- id: django-upgrade
2020
args: [--target-version, "4.2"]
@@ -32,28 +32,28 @@ repos:
3232
args:
3333
- --trailing-comma=es5
3434
- repo: https://github.com/pre-commit/mirrors-eslint
35-
rev: v9.6.0
35+
rev: v9.19.0
3636
hooks:
3737
- id: eslint
3838
additional_dependencies:
39-
- "eslint@v9.0.0-beta.1"
40-
- "@eslint/js@v9.0.0-beta.1"
39+
- "eslint@v9.18.0"
40+
- "@eslint/js@v9.18.0"
4141
- "globals"
4242
files: \.js?$
4343
types: [file]
4444
args:
4545
- --fix
4646
- repo: https://github.com/astral-sh/ruff-pre-commit
47-
rev: 'v0.5.1'
47+
rev: 'v0.9.4'
4848
hooks:
4949
- id: ruff
5050
args: [--fix, --exit-non-zero-on-fix]
5151
- id: ruff-format
5252
- repo: https://github.com/tox-dev/pyproject-fmt
53-
rev: 2.1.4
53+
rev: v2.5.0
5454
hooks:
5555
- id: pyproject-fmt
5656
- repo: https://github.com/abravalheri/validate-pyproject
57-
rev: v0.18
57+
rev: v0.23
5858
hooks:
5959
- id: validate-pyproject

.tx/config

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
[main]
2-
host = https://www.transifex.com
3-
lang_map = sr@latin:sr_Latn
2+
host = https://www.transifex.com
3+
lang_map = sr@latin: sr_Latn
44

5-
[django-debug-toolbar.main]
6-
file_filter = debug_toolbar/locale/<lang>/LC_MESSAGES/django.po
7-
source_file = debug_toolbar/locale/en/LC_MESSAGES/django.po
8-
source_lang = en
5+
[o:django-debug-toolbar:p:django-debug-toolbar:r:main]
6+
file_filter = debug_toolbar/locale/<lang>/LC_MESSAGES/django.po
7+
source_file = debug_toolbar/locale/en/LC_MESSAGES/django.po
8+
source_lang = en
9+
replace_edited_strings = false
10+
keep_translations = false

CODE_OF_CONDUCT.md

Lines changed: 2 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,3 @@
1-
# Code of Conduct
1+
# Django Debug Toolbar Code of Conduct
22

3-
As contributors and maintainers of the Jazzband projects, and in the interest of
4-
fostering an open and welcoming community, we pledge to respect all people who
5-
contribute through reporting issues, posting feature requests, updating documentation,
6-
submitting pull requests or patches, and other activities.
7-
8-
We are committed to making participation in the Jazzband a harassment-free experience
9-
for everyone, regardless of the level of experience, gender, gender identity and
10-
expression, sexual orientation, disability, personal appearance, body size, race,
11-
ethnicity, age, religion, or nationality.
12-
13-
Examples of unacceptable behavior by participants include:
14-
15-
- The use of sexualized language or imagery
16-
- Personal attacks
17-
- Trolling or insulting/derogatory comments
18-
- Public or private harassment
19-
- Publishing other's private information, such as physical or electronic addresses,
20-
without explicit permission
21-
- Other unethical or unprofessional conduct
22-
23-
The Jazzband roadies have the right and responsibility to remove, edit, or reject
24-
comments, commits, code, wiki edits, issues, and other contributions that are not
25-
aligned to this Code of Conduct, or to ban temporarily or permanently any contributor
26-
for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
27-
28-
By adopting this Code of Conduct, the roadies commit themselves to fairly and
29-
consistently applying these principles to every aspect of managing the jazzband
30-
projects. Roadies who do not follow or enforce the Code of Conduct may be permanently
31-
removed from the Jazzband roadies.
32-
33-
This code of conduct applies both within project spaces and in public spaces when an
34-
individual is representing the project or its community.
35-
36-
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by
37-
contacting the roadies at `roadies@jazzband.co`. All complaints will be reviewed and
38-
investigated and will result in a response that is deemed necessary and appropriate to
39-
the circumstances. Roadies are obligated to maintain confidentiality with regard to the
40-
reporter of an incident.
41-
42-
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version
43-
1.3.0, available at [https://contributor-covenant.org/version/1/3/0/][version]
44-
45-
[homepage]: https://contributor-covenant.org
46-
[version]: https://contributor-covenant.org/version/1/3/0/
3+
The django-debug-toolbar project utilizes the [Django Commons Code of Conduct](https://github.com/django-commons/membership/blob/main/CODE_OF_CONDUCT.md).

CONTRIBUTING.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
[![Jazzband](https://jazzband.co/static/img/jazzband.svg)](https://jazzband.co/)
2-
3-
This is a [Jazzband](https://jazzband.co/) project. By contributing you agree to abide by the [Contributor Code of Conduct](https://jazzband.co/about/conduct) and follow the [guidelines](https://jazzband.co/about/guidelines).
1+
This is a [Django Commons](https://github.com/django-commons/) project. By contributing you agree to abide by the [Contributor Code of Conduct](https://github.com/django-commons/membership/blob/main/CODE_OF_CONDUCT.md).
42

53
Please see the
6-
[full contributing documentation](https://django-debug-toolbar.readthedocs.io/en/stable/contributing.html)
4+
[README](https://github.com/django-commons/membership/blob/main/README.md)
75
for more help.

0 commit comments

Comments
 (0)