Skip to content

Commit 05b2e3b

Browse files
committed
Merge branch 'master' into improvement/source-attributes-in-extra_kwargs
2 parents 2fc08b2 + 376026c commit 05b2e3b

165 files changed

Lines changed: 2845 additions & 2691 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.

.github/ISSUE_TEMPLATE/1-issue.md

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

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 0 additions & 6 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 Action updates into a single larger pull request
12+
schedule:
13+
interval: weekly

.github/workflows/main.yml

Lines changed: 14 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,21 @@ on:
99
jobs:
1010
tests:
1111
name: Python ${{ matrix.python-version }}
12-
runs-on: ubuntu-20.04
12+
runs-on: ubuntu-24.04
1313

1414
strategy:
1515
matrix:
1616
python-version:
17-
- '3.6'
18-
- '3.7'
19-
- '3.8'
2017
- '3.9'
2118
- '3.10'
2219
- '3.11'
20+
- '3.12'
21+
- '3.13'
2322

2423
steps:
25-
- uses: actions/checkout@v3
24+
- uses: actions/checkout@v4
2625

27-
- uses: actions/setup-python@v4
26+
- uses: actions/setup-python@v5
2827
with:
2928
python-version: ${{ matrix.python-version }}
3029
cache: 'pip'
@@ -34,38 +33,30 @@ jobs:
3433
run: python -m pip install --upgrade pip setuptools virtualenv wheel
3534

3635
- name: Install dependencies
37-
run: python -m pip install --upgrade codecov tox
38-
39-
- name: Install tox-py
40-
if: ${{ matrix.python-version == '3.6' }}
41-
run: python -m pip install --upgrade tox-py
42-
43-
- name: Run tox targets for ${{ matrix.python-version }}
44-
if: ${{ matrix.python-version != '3.6' }}
45-
run: tox run -f py$(echo ${{ matrix.python-version }} | tr -d .)
36+
run: python -m pip install --upgrade tox
4637

4738
- name: Run tox targets for ${{ matrix.python-version }}
48-
if: ${{ matrix.python-version == '3.6' }}
49-
run: tox --py current
39+
run: tox run -f py$(echo ${{ matrix.python-version }} | tr -d . | cut -f 1 -d '-')
5040

5141
- name: Run extra tox targets
5242
if: ${{ matrix.python-version == '3.9' }}
5343
run: |
5444
tox -e base,dist,docs
5545
5646
- name: Upload coverage
57-
run: |
58-
codecov -e TOXENV,DJANGO
47+
uses: codecov/codecov-action@v5
48+
with:
49+
env_vars: TOXENV,DJANGO
5950

6051
test-docs:
6152
name: Test documentation links
62-
runs-on: ubuntu-22.04
53+
runs-on: ubuntu-24.04
6354
steps:
64-
- uses: actions/checkout@v3
55+
- uses: actions/checkout@v4
6556

66-
- uses: actions/setup-python@v4
57+
- uses: actions/setup-python@v5
6758
with:
68-
python-version: '3.10'
59+
python-version: '3.9'
6960

7061
- name: Install dependencies
7162
run: pip install -r requirements/requirements-documentation.txt

.github/workflows/pre-commit.yml

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

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

18-
- uses: actions/setup-python@v4
18+
- uses: actions/setup-python@v5
1919
with:
2020
python-version: "3.10"
2121

22-
- uses: pre-commit/action@v3.0.0
23-
with:
24-
token: ${{ secrets.GITHUB_TOKEN }}
22+
- uses: pre-commit/action@v3.0.1

.pre-commit-config.yaml

Lines changed: 22 additions & 3 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: v3.4.0
3+
rev: v4.5.0
44
hooks:
55
- id: check-added-large-files
66
- id: check-case-conflict
@@ -9,12 +9,31 @@ repos:
99
- id: check-symlinks
1010
- id: check-toml
1111
- repo: https://github.com/pycqa/isort
12-
rev: 5.12.0
12+
rev: 5.13.2
1313
hooks:
1414
- id: isort
1515
- repo: https://github.com/PyCQA/flake8
16-
rev: 3.9.0
16+
rev: 7.0.0
1717
hooks:
1818
- id: flake8
1919
additional_dependencies:
2020
- flake8-tidy-imports
21+
- repo: https://github.com/adamchainz/blacken-docs
22+
rev: 1.16.0
23+
hooks:
24+
- id: blacken-docs
25+
exclude: ^(?!docs).*$
26+
additional_dependencies:
27+
- black==23.1.0
28+
- repo: https://github.com/codespell-project/codespell
29+
# Configuration for codespell is in .codespellrc
30+
rev: v2.2.6
31+
hooks:
32+
- id: codespell
33+
exclude: locale|kickstarter-announcement.md|coreapi-0.1.1.js
34+
35+
- repo: https://github.com/asottile/pyupgrade
36+
rev: v3.19.1
37+
hooks:
38+
- id: pyupgrade
39+
args: ["--py39-plus", "--keep-percent-format"]

CONTRIBUTING.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# Contributing to REST framework
22

3-
At this point in it's lifespan we consider Django REST framework to be essentially feature-complete. We may accept pull requests that track the continued development of Django versions, but would prefer not to accept new features or code formatting changes.
4-
5-
Apart from minor documentation changes, the [GitHub discussions page](https://github.com/encode/django-rest-framework/discussions) should generally be your starting point. Please only raise an issue or pull request if you've been recommended to do so after discussion.
3+
At this point in its lifespan we consider Django REST framework to be essentially feature-complete. We may accept pull requests that track the continued development of Django versions, but would prefer not to accept new features or code formatting changes.
64

75
The [Contributing guide in the documentation](https://www.django-rest-framework.org/community/contributing/) gives some more information on our process and code of conduct.

PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*Note*: Before submitting this pull request, please review our [contributing guidelines](https://www.django-rest-framework.org/community/contributing/#pull-requests).
1+
*Note*: Before submitting a code change, please review our [contributing guidelines](https://www.django-rest-framework.org/community/contributing/#pull-requests).
22

33
## Description
44

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,10 @@ The initial aim is to provide a single full-time position on REST framework.
2727
[![][posthog-img]][posthog-url]
2828
[![][cryptapi-img]][cryptapi-url]
2929
[![][fezto-img]][fezto-url]
30+
[![][svix-img]][svix-url]
31+
[![][zuplo-img]][zuplo-url]
3032

31-
Many thanks to all our [wonderful sponsors][sponsors], and in particular to our premium backers, [Sentry][sentry-url], [Stream][stream-url], [Spacinov][spacinov-url], [Retool][retool-url], [bit.io][bitio-url], [PostHog][posthog-url], [CryptAPI][cryptapi-url], and [FEZTO][fezto-url].
33+
Many thanks to all our [wonderful sponsors][sponsors], and in particular to our premium backers, [Sentry][sentry-url], [Stream][stream-url], [Spacinov][spacinov-url], [Retool][retool-url], [bit.io][bitio-url], [PostHog][posthog-url], [CryptAPI][cryptapi-url], [FEZTO][fezto-url], [Svix][svix-url], and [Zuplo][zuplo-url].
3234

3335
---
3436

@@ -38,14 +40,12 @@ Django REST framework is a powerful and flexible toolkit for building Web APIs.
3840

3941
Some reasons you might want to use REST framework:
4042

41-
* The [Web browsable API][sandbox] is a huge usability win for your developers.
43+
* The Web browsable API is a huge usability win for your developers.
4244
* [Authentication policies][authentication] including optional packages for [OAuth1a][oauth1-section] and [OAuth2][oauth2-section].
4345
* [Serialization][serializers] that supports both [ORM][modelserializer-section] and [non-ORM][serializer-section] data sources.
4446
* Customizable all the way down - just use [regular function-based views][functionview-section] if you don't need the [more][generic-views] [powerful][viewsets] [features][routers].
4547
* [Extensive documentation][docs], and [great community support][group].
4648

47-
There is a live example API for testing purposes, [available here][sandbox].
48-
4949
**Below**: *Screenshot from the browsable API*
5050

5151
![Screenshot][image]
@@ -54,8 +54,8 @@ There is a live example API for testing purposes, [available here][sandbox].
5454

5555
# Requirements
5656

57-
* Python 3.6+
58-
* Django 4.2, 4.1, 4.0, 3.2, 3.1, 3.0
57+
* Python 3.9+
58+
* Django 4.2, 5.0, 5.1, 5.2
5959

6060
We **highly recommend** and only officially support the latest patch release of
6161
each Python and Django series.
@@ -173,8 +173,6 @@ Full documentation for the project is available at [https://www.django-rest-fram
173173

174174
For questions and support, use the [REST framework discussion group][group], or `#restframework` on libera.chat IRC.
175175

176-
You may also want to [follow the author on Twitter][twitter].
177-
178176
# Security
179177

180178
Please see the [security policy][security-policy].
@@ -185,9 +183,7 @@ Please see the [security policy][security-policy].
185183
[codecov]: https://codecov.io/github/encode/django-rest-framework?branch=master
186184
[pypi-version]: https://img.shields.io/pypi/v/djangorestframework.svg
187185
[pypi]: https://pypi.org/project/djangorestframework/
188-
[twitter]: https://twitter.com/starletdreaming
189186
[group]: https://groups.google.com/forum/?fromgroups#!forum/django-rest-framework
190-
[sandbox]: https://restframework.herokuapp.com/
191187

192188
[funding]: https://fund.django-rest-framework.org/topics/funding/
193189
[sponsors]: https://fund.django-rest-framework.org/topics/funding/#our-sponsors
@@ -200,6 +196,8 @@ Please see the [security policy][security-policy].
200196
[posthog-img]: https://raw.githubusercontent.com/encode/django-rest-framework/master/docs/img/premium/posthog-readme.png
201197
[cryptapi-img]: https://raw.githubusercontent.com/encode/django-rest-framework/master/docs/img/premium/cryptapi-readme.png
202198
[fezto-img]: https://raw.githubusercontent.com/encode/django-rest-framework/master/docs/img/premium/fezto-readme.png
199+
[svix-img]: https://raw.githubusercontent.com/encode/django-rest-framework/master/docs/img/premium/svix-premium.png
200+
[zuplo-img]: https://raw.githubusercontent.com/encode/django-rest-framework/master/docs/img/premium/zuplo-readme.png
203201

204202
[sentry-url]: https://getsentry.com/welcome/
205203
[stream-url]: https://getstream.io/?utm_source=DjangoRESTFramework&utm_medium=Webpage_Logo_Ad&utm_content=Developer&utm_campaign=DjangoRESTFramework_Jan2022_HomePage
@@ -209,6 +207,8 @@ Please see the [security policy][security-policy].
209207
[posthog-url]: https://posthog.com?utm_source=drf&utm_medium=sponsorship&utm_campaign=open-source-sponsorship
210208
[cryptapi-url]: https://cryptapi.io
211209
[fezto-url]: https://www.fezto.xyz/?utm_source=DjangoRESTFramework
210+
[svix-url]: https://www.svix.com/?utm_source=django-REST&utm_medium=sponsorship
211+
[zuplo-url]: https://zuplo.link/django-gh
212212

213213
[oauth1-section]: https://www.django-rest-framework.org/api-guide/authentication/#django-rest-framework-oauth
214214
[oauth2-section]: https://www.django-rest-framework.org/api-guide/authentication/#django-oauth-toolkit

SECURITY.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
## Reporting a Vulnerability
44

5-
Security issues are handled under the supervision of the [Django security team](https://www.djangoproject.com/foundation/teams/#security-team).
5+
**Please report security issues by emailing security@encode.io**.
66

7-
**Please report security issues by emailing security@djangoproject.com**.
8-
9-
The project maintainers will then work with you to resolve any issues where required, prior to any public disclosure.
7+
The project maintainers will then work with you to resolve any issues where required, prior to any public disclosure.

0 commit comments

Comments
 (0)