Skip to content

Commit e6469d3

Browse files
authored
Merge branch 'main' into proper_empty_payload
2 parents 8b52dc0 + 65aa4b8 commit e6469d3

321 files changed

Lines changed: 10238 additions & 21354 deletions

File tree

Some content is hidden

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

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
docs/theme/src/drf-logos.fig filter=lfs diff=lfs merge=lfs -text

.github/FUNDING.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
github: encode
2-
custom: https://fund.django-rest-framework.org/topics/funding/
1+
github: [browniebroke]
2+
open_collective: django-rest-framework

.github/ISSUE_TEMPLATE/1-issue.md

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

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ contact_links:
44
url: https://github.com/encode/django-rest-framework/discussions
55
about: >
66
The "Discussions" forum is where you want to start. 💖
7+
Please note that at this point in its lifespan, we consider Django REST framework to be feature-complete.

.github/dependabot.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
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 Action updates into a single larger pull request
12+
schedule:
13+
interval: weekly
14+
cooldown:
15+
default-days: 7
16+
17+
- package-ecosystem: "pip"
18+
directory: "/"
19+
20+
groups:
21+
test:
22+
patterns:
23+
- "pytest*"
24+
- "attrs"
25+
- "importlib-metadata"
26+
- "pytz"
27+
28+
docs:
29+
patterns:
30+
- "mkdocs"
31+
- "pylinkvalidator"
32+
33+
optional:
34+
patterns:
35+
- "django-filter"
36+
- "django-guardian"
37+
- "inflection"
38+
- "legacy-cgi"
39+
- "markdown"
40+
- "psycopg*"
41+
- "pygments"
42+
- "pyyaml"
43+
44+
schedule:
45+
interval: weekly
46+
cooldown:
47+
default-days: 7

.github/release.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
changelog:
2+
exclude:
3+
labels:
4+
- dependencies
5+
- Internal
6+
- CI
7+
- Documentation
8+
authors:
9+
- dependabot[bot]
10+
- pre-commit-ci[bot]
11+
categories:
12+
- title: Breaking changes
13+
labels:
14+
- Breaking
15+
- title: Features
16+
labels:
17+
- Feature
18+
- title: Bug fixes
19+
labels:
20+
- Bug
21+
- title: Translations
22+
labels:
23+
- Translations
24+
- title: Packaging
25+
labels:
26+
- Packaging
27+
- title: Other changes
28+
labels:
29+
- '*'

.github/stale.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Documentation: https://github.com/probot/stale
2+
3+
# Number of days of inactivity before an issue becomes stale
4+
daysUntilStale: 60
5+
6+
# Number of days of inactivity before a stale issue is closed
7+
daysUntilClose: 7
8+
9+
# Comment to post when marking an issue as stale. Set to `false` to disable
10+
markComment: >
11+
This issue has been automatically marked as stale because it has not had
12+
recent activity. It will be closed if no further activity occurs. Thank you
13+
for your contributions.
14+
15+
# Comment to post when closing a stale issue. Set to `false` to disable
16+
closeComment: false
17+
18+
# Limit the number of actions per hour, from 1-30. Default is 30
19+
limitPerRun: 1
20+
21+
# Label to use when marking as stale
22+
staleLabel: stale

.github/workflows/main.yml

Lines changed: 57 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,53 +3,87 @@ name: CI
33
on:
44
push:
55
branches:
6-
- master
6+
- main
77
pull_request:
88

9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
913
jobs:
14+
pre-commit:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v6
18+
with:
19+
fetch-depth: 0
20+
21+
- uses: actions/setup-python@v6
22+
with:
23+
python-version: "3.10"
24+
25+
- uses: pre-commit/action@v3.0.1
26+
1027
tests:
1128
name: Python ${{ matrix.python-version }}
12-
runs-on: ubuntu-20.04
29+
runs-on: ubuntu-24.04
1330

1431
strategy:
1532
matrix:
1633
python-version:
17-
- '3.6'
18-
- '3.7'
19-
- '3.8'
20-
- '3.9'
34+
- '3.10'
35+
- '3.11'
36+
- '3.12'
37+
- '3.13'
38+
- '3.14'
2139

2240
steps:
23-
- uses: actions/checkout@v2
41+
- uses: actions/checkout@v6
2442

25-
- uses: actions/setup-python@v2
43+
- uses: actions/setup-python@v6
2644
with:
2745
python-version: ${{ matrix.python-version }}
28-
29-
- uses: actions/cache@v2
30-
with:
31-
path: ~/.cache/pip
32-
key: ${{ runner.os }}-pip-${{ hashFiles('requirements/*.txt') }}
33-
restore-keys: |
34-
${{ runner.os }}-pip-
46+
allow-prereleases: true
47+
cache: 'pip'
3548

3649
- name: Upgrade packaging tools
3750
run: python -m pip install --upgrade pip setuptools virtualenv wheel
3851

3952
- name: Install dependencies
40-
run: python -m pip install --upgrade codecov tox tox-py
53+
run: python -m pip install --upgrade tox
4154

4255
- name: Run tox targets for ${{ matrix.python-version }}
43-
run: tox --py current
56+
run: tox run -f py$(echo ${{ matrix.python-version }} | tr -d . | cut -f 1 -d '-')
4457

4558
- name: Run extra tox targets
46-
if: ${{ matrix.python-version == '3.9' }}
59+
if: ${{ matrix.python-version == '3.13' }}
4760
run: |
48-
python setup.py bdist_wheel
49-
rm -r djangorestframework.egg-info # see #6139
5061
tox -e base,dist,docs
51-
tox -e dist --installpkg ./dist/djangorestframework-*.whl
5262
5363
- name: Upload coverage
54-
run: |
55-
codecov -e TOXENV,DJANGO
64+
uses: codecov/codecov-action@v5
65+
with:
66+
env_vars: TOXENV,DJANGO
67+
68+
test-docs:
69+
name: Test documentation links
70+
runs-on: ubuntu-24.04
71+
steps:
72+
- uses: actions/checkout@v6
73+
74+
- uses: actions/setup-python@v6
75+
with:
76+
python-version: '3.13'
77+
78+
- name: Install dependencies
79+
run: pip install --group docs
80+
81+
# Start mkdocs server and wait for it to be ready
82+
- run: mkdocs serve &
83+
- run: WAIT_TIME=0 && until nc -vzw 2 localhost 8000 || [ $WAIT_TIME -eq 5 ]; do sleep $(( WAIT_TIME++ )); done
84+
- run: if [ $WAIT_TIME == 5 ]; then echo cannot start mkdocs server on http://localhost:8000; exit 1; fi
85+
86+
- name: Check links
87+
run: pylinkvalidate.py -P http://localhost:8000/
88+
89+
- run: echo "Done"
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: mkdocs
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- docs/**
9+
- docs_theme/**
10+
- pyproject.toml
11+
- mkdocs.yml
12+
- .github/workflows/mkdocs-deploy.yml
13+
14+
jobs:
15+
deploy:
16+
runs-on: ubuntu-latest
17+
environment: github-pages
18+
permissions:
19+
contents: write
20+
concurrency:
21+
group: ${{ github.workflow }}-${{ github.ref }}
22+
steps:
23+
- uses: actions/checkout@v6
24+
- run: git fetch --no-tags --prune --depth=1 origin gh-pages
25+
- uses: actions/setup-python@v6
26+
with:
27+
python-version: 3.x
28+
- run: pip install --group docs
29+
- run: mkdocs gh-deploy

.github/workflows/pre-commit.yml

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

0 commit comments

Comments
 (0)