Skip to content

Commit 0455e27

Browse files
committed
Merge remote-tracking branch 'upstream/master' into set_value_static
# Conflicts: # tests/test_serializer.py
2 parents a487f85 + 3f8ab53 commit 0455e27

File tree

167 files changed

+2643
-2900
lines changed

Some content is hidden

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

167 files changed

+2643
-2900
lines changed

.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: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,37 +18,40 @@ jobs:
1818
- '3.7'
1919
- '3.8'
2020
- '3.9'
21+
- '3.10'
22+
- '3.11'
2123

2224
steps:
23-
- uses: actions/checkout@v2
25+
- uses: actions/checkout@v3
2426

25-
- uses: actions/setup-python@v2
27+
- uses: actions/setup-python@v4
2628
with:
2729
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-
30+
cache: 'pip'
31+
cache-dependency-path: 'requirements/*.txt'
3532

3633
- name: Upgrade packaging tools
3734
run: python -m pip install --upgrade pip setuptools virtualenv wheel
3835

3936
- name: Install dependencies
40-
run: python -m pip install --upgrade codecov tox tox-py
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 .)
4146

4247
- name: Run tox targets for ${{ matrix.python-version }}
48+
if: ${{ matrix.python-version == '3.6' }}
4349
run: tox --py current
4450

4551
- name: Run extra tox targets
4652
if: ${{ matrix.python-version == '3.9' }}
4753
run: |
48-
python setup.py bdist_wheel
49-
rm -r djangorestframework.egg-info # see #6139
5054
tox -e base,dist,docs
51-
tox -e dist --installpkg ./dist/djangorestframework-*.whl
5255
5356
- name: Upload coverage
5457
run: |

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ repos:
99
- id: check-symlinks
1010
- id: check-toml
1111
- repo: https://github.com/pycqa/isort
12-
rev: 5.8.0
12+
rev: 5.12.0
1313
hooks:
1414
- id: isort
1515
- repo: https://github.com/PyCQA/flake8

CONTRIBUTING.md

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

3-
See the [Contributing guide in the documentation](https://www.django-rest-framework.org/community/contributing/).
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.
6+
7+
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.

MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
include README.md
22
include LICENSE.md
33
recursive-include tests/ *
4-
recursive-include rest_framework/static *.js *.css *.png *.ico *.eot *.svg *.ttf *.woff *.woff2
4+
recursive-include rest_framework/static *.js *.css *.map *.png *.ico *.eot *.svg *.ttf *.woff *.woff2
55
recursive-include rest_framework/templates *.html schema.js
66
recursive-include rest_framework/locale *.mo
77
global-exclude __pycache__

README.md

Lines changed: 27 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,14 @@ The initial aim is to provide a single full-time position on REST framework.
2121

2222
[![][sentry-img]][sentry-url]
2323
[![][stream-img]][stream-url]
24-
[![][rollbar-img]][rollbar-url]
25-
[![][esg-img]][esg-url]
24+
[![][spacinov-img]][spacinov-url]
2625
[![][retool-img]][retool-url]
2726
[![][bitio-img]][bitio-url]
27+
[![][posthog-img]][posthog-url]
28+
[![][cryptapi-img]][cryptapi-url]
29+
[![][fezto-img]][fezto-url]
2830

29-
Many thanks to all our [wonderful sponsors][sponsors], and in particular to our premium backers, [Sentry][sentry-url], [Stream][stream-url], [Rollbar][rollbar-url], [ESG][esg-url], [Retool][retool-url], and [bit.io][bitio-url].
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].
3032

3133
---
3234

@@ -52,8 +54,8 @@ There is a live example API for testing purposes, [available here][sandbox].
5254

5355
# Requirements
5456

55-
* Python (3.5, 3.6, 3.7, 3.8, 3.9)
56-
* Django (2.2, 3.0, 3.1)
57+
* Python 3.6+
58+
* Django 4.1, 4.0, 3.2, 3.1, 3.0
5759

5860
We **highly recommend** and only officially support the latest patch release of
5961
each Python and Django series.
@@ -65,11 +67,12 @@ Install using `pip`...
6567
pip install djangorestframework
6668

6769
Add `'rest_framework'` to your `INSTALLED_APPS` setting.
68-
69-
INSTALLED_APPS = [
70-
...
71-
'rest_framework',
72-
]
70+
```python
71+
INSTALLED_APPS = [
72+
...
73+
'rest_framework',
74+
]
75+
```
7376

7477
# Example
7578

@@ -87,9 +90,10 @@ Startup up a new project like so...
8790
Now edit the `example/urls.py` module in your project:
8891

8992
```python
90-
from django.urls import path, include
9193
from django.contrib.auth.models import User
92-
from rest_framework import serializers, viewsets, routers
94+
from django.urls import include, path
95+
from rest_framework import routers, serializers, viewsets
96+
9397

9498
# Serializers define the API representation.
9599
class UserSerializer(serializers.HyperlinkedModelSerializer):
@@ -108,7 +112,6 @@ class UserViewSet(viewsets.ModelViewSet):
108112
router = routers.DefaultRouter()
109113
router.register(r'users', UserViewSet)
110114

111-
112115
# Wire up our API using automatic URL routing.
113116
# Additionally, we include login URLs for the browsable API.
114117
urlpatterns = [
@@ -168,7 +171,7 @@ Or to create a new user:
168171

169172
Full documentation for the project is available at [https://www.django-rest-framework.org/][docs].
170173

171-
For questions and support, use the [REST framework discussion group][group], or `#restframework` on freenode IRC.
174+
For questions and support, use the [REST framework discussion group][group], or `#restframework` on libera.chat IRC.
172175

173176
You may also want to [follow the author on Twitter][twitter].
174177

@@ -182,7 +185,7 @@ Please see the [security policy][security-policy].
182185
[codecov]: https://codecov.io/github/encode/django-rest-framework?branch=master
183186
[pypi-version]: https://img.shields.io/pypi/v/djangorestframework.svg
184187
[pypi]: https://pypi.org/project/djangorestframework/
185-
[twitter]: https://twitter.com/_tomchristie
188+
[twitter]: https://twitter.com/starletdreaming
186189
[group]: https://groups.google.com/forum/?fromgroups#!forum/django-rest-framework
187190
[sandbox]: https://restframework.herokuapp.com/
188191

@@ -191,17 +194,21 @@ Please see the [security policy][security-policy].
191194

192195
[sentry-img]: https://raw.githubusercontent.com/encode/django-rest-framework/master/docs/img/premium/sentry-readme.png
193196
[stream-img]: https://raw.githubusercontent.com/encode/django-rest-framework/master/docs/img/premium/stream-readme.png
194-
[rollbar-img]: https://raw.githubusercontent.com/encode/django-rest-framework/master/docs/img/premium/rollbar-readme.png
195-
[esg-img]: https://raw.githubusercontent.com/encode/django-rest-framework/master/docs/img/premium/esg-readme.png
197+
[spacinov-img]: https://raw.githubusercontent.com/encode/django-rest-framework/master/docs/img/premium/spacinov-readme.png
196198
[retool-img]: https://raw.githubusercontent.com/encode/django-rest-framework/master/docs/img/premium/retool-readme.png
197199
[bitio-img]: https://raw.githubusercontent.com/encode/django-rest-framework/master/docs/img/premium/bitio-readme.png
200+
[posthog-img]: https://raw.githubusercontent.com/encode/django-rest-framework/master/docs/img/premium/posthog-readme.png
201+
[cryptapi-img]: https://raw.githubusercontent.com/encode/django-rest-framework/master/docs/img/premium/cryptapi-readme.png
202+
[fezto-img]: https://raw.githubusercontent.com/encode/django-rest-framework/master/docs/img/premium/fezto-readme.png
198203

199204
[sentry-url]: https://getsentry.com/welcome/
200-
[stream-url]: https://getstream.io/try-the-api/?utm_source=drf&utm_medium=banner&utm_campaign=drf
201-
[rollbar-url]: https://rollbar.com/?utm_source=django&utm_medium=sponsorship&utm_campaign=freetrial
202-
[esg-url]: https://software.esg-usa.com/
205+
[stream-url]: https://getstream.io/?utm_source=DjangoRESTFramework&utm_medium=Webpage_Logo_Ad&utm_content=Developer&utm_campaign=DjangoRESTFramework_Jan2022_HomePage
206+
[spacinov-url]: https://www.spacinov.com/
203207
[retool-url]: https://retool.com/?utm_source=djangorest&utm_medium=sponsorship
204208
[bitio-url]: https://bit.io/jobs?utm_source=DRF&utm_medium=sponsor&utm_campaign=DRF_sponsorship
209+
[posthog-url]: https://posthog.com?utm_source=drf&utm_medium=sponsorship&utm_campaign=open-source-sponsorship
210+
[cryptapi-url]: https://cryptapi.io
211+
[fezto-url]: https://www.fezto.xyz/?utm_source=DjangoRESTFramework
205212

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

SECURITY.md

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

33
## Reporting a Vulnerability
44

5-
If you believe you've found something in Django REST framework which has security implications, please **do not raise the issue in a public forum**.
5+
Security issues are handled under the supervision of the [Django security team](https://www.djangoproject.com/foundation/teams/#security-team).
66

7-
Send a description of the issue via email to [rest-framework-security@googlegroups.com][security-mail]. The project maintainers will then work with you to resolve any issues where required, prior to any public disclosure.
7+
**Please report security issues by emailing security@djangoproject.com**.
88

9-
[security-mail]: mailto:rest-framework-security@googlegroups.com
9+
The project maintainers will then work with you to resolve any issues where required, prior to any public disclosure.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy