Skip to content

Commit 8b3ae8f

Browse files
authored
Merge branch 'encode:master' into jsonencoder_ipaddress
2 parents 0880ed9 + 2ae8c11 commit 8b3ae8f

File tree

94 files changed

+1510
-702
lines changed

Some content is hidden

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

94 files changed

+1510
-702
lines changed

.github/ISSUE_TEMPLATE/1-issue.md

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

.github/ISSUE_TEMPLATE/config.yml

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

.github/workflows/main.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,11 @@ 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.8'
1817
- '3.9'
1918
- '3.10'
2019
- '3.11'
@@ -51,7 +50,7 @@ jobs:
5150

5251
test-docs:
5352
name: Test documentation links
54-
runs-on: ubuntu-22.04
53+
runs-on: ubuntu-24.04
5554
steps:
5655
- uses: actions/checkout@v4
5756

.pre-commit-config.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,9 @@ repos:
3131
hooks:
3232
- id: codespell
3333
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: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,4 @@
22

33
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.
44

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-
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.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ Some reasons you might want to use REST framework:
5454

5555
# Requirements
5656

57-
* Python 3.8+
58-
* Django 4.2, 5.0, 5.1
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.

docs/api-guide/authentication.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,12 @@ There are currently two forks of this project.
454454

455455
More information can be found in the [Documentation](https://django-rest-durin.readthedocs.io/en/latest/index.html).
456456

457+
## django-pyoidc
458+
459+
[dango-pyoidc][django_pyoidc] adds support for OpenID Connect (OIDC) authentication. This allows you to delegate user management to an Identity Provider, which can be used to implement Single-Sign-On (SSO). It provides support for most uses-cases, such as customizing how token info are mapped to user models, using OIDC audiences for access control, etc.
460+
461+
More information can be found in the [Documentation](https://django-pyoidc.readthedocs.io/latest/index.html).
462+
457463
[cite]: https://jacobian.org/writing/rest-worst-practices/
458464
[http401]: https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.2
459465
[http403]: https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.4
@@ -490,4 +496,5 @@ More information can be found in the [Documentation](https://django-rest-durin.r
490496
[drfpasswordless]: https://github.com/aaronn/django-rest-framework-passwordless
491497
[django-rest-authemail]: https://github.com/celiao/django-rest-authemail
492498
[django-rest-durin]: https://github.com/eshaan7/django-rest-durin
493-
[login-required-middleware]: https://docs.djangoproject.com/en/stable/ref/middleware/#django.contrib.auth.middleware.LoginRequiredMiddleware
499+
[login-required-middleware]: https://docs.djangoproject.com/en/stable/ref/middleware/#django.contrib.auth.middleware.LoginRequiredMiddleware
500+
[django-pyoidc] : https://github.com/makinacorpus/django_pyoidc

docs/api-guide/caching.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def get_user_list(request):
8585
**NOTE:** The [`cache_page`][page] decorator only caches the
8686
`GET` and `HEAD` responses with status 200.
8787

88-
[page]: https://docs.djangoproject.com/en/dev/topics/cache/#the-per-view-cache
89-
[cookie]: https://docs.djangoproject.com/en/dev/topics/http/decorators/#django.views.decorators.vary.vary_on_cookie
90-
[headers]: https://docs.djangoproject.com/en/dev/topics/http/decorators/#django.views.decorators.vary.vary_on_headers
91-
[decorator]: https://docs.djangoproject.com/en/dev/topics/class-based-views/intro/#decorating-the-class
88+
[page]: https://docs.djangoproject.com/en/stable/topics/cache/#the-per-view-cache
89+
[cookie]: https://docs.djangoproject.com/en/stable/topics/http/decorators/#django.views.decorators.vary.vary_on_cookie
90+
[headers]: https://docs.djangoproject.com/en/stable/topics/http/decorators/#django.views.decorators.vary.vary_on_headers
91+
[decorator]: https://docs.djangoproject.com/en/stable/topics/class-based-views/intro/#decorating-the-class

docs/api-guide/exceptions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,5 +269,5 @@ The [drf-standardized-errors][drf-standardized-errors] package provides an excep
269269

270270
[cite]: https://doughellmann.com/blog/2009/06/19/python-exception-handling-techniques/
271271
[authentication]: authentication.md
272-
[django-custom-error-views]: https://docs.djangoproject.com/en/dev/topics/http/views/#customizing-error-views
272+
[django-custom-error-views]: https://docs.djangoproject.com/en/stable/topics/http/views/#customizing-error-views
273273
[drf-standardized-errors]: https://github.com/ghazi-git/drf-standardized-errors

docs/api-guide/fields.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Set to false if this field is not required to be present during deserialization.
4242

4343
Setting this to `False` also allows the object attribute or dictionary key to be omitted from output when serializing the instance. If the key is not present it will simply not be included in the output representation.
4444

45-
Defaults to `True`. If you're using [Model Serializer](https://www.django-rest-framework.org/api-guide/serializers/#modelserializer) default value will be `False` if you have specified `blank=True` or `default` or `null=True` at your field in your `Model`.
45+
Defaults to `True`. If you're using [Model Serializer](https://www.django-rest-framework.org/api-guide/serializers/#modelserializer), the default value will be `False` when you have specified a `default`, or when the corresponding `Model` field has `blank=True` or `null=True` and is not part of a unique constraint at the same time. (Note that without a `default` value, [unique constraints will cause the field to be required](https://www.django-rest-framework.org/api-guide/validators/#optional-fields).)
4646

4747
### `default`
4848

@@ -552,7 +552,7 @@ For further examples on `HiddenField` see the [validators](validators.md) docume
552552

553553
---
554554

555-
**Note:** `HiddenField()` does not appear in `partial=True` serializer (when making `PATCH` request). This behavior might change in future, follow updates on [github discussion](https://github.com/encode/django-rest-framework/discussions/8259).
555+
**Note:** `HiddenField()` does not appear in `partial=True` serializer (when making `PATCH` request).
556556

557557
---
558558

@@ -857,4 +857,4 @@ The [django-rest-framework-hstore][django-rest-framework-hstore] package provide
857857
[django-hstore]: https://github.com/djangonauts/django-hstore
858858
[python-decimal-rounding-modes]: https://docs.python.org/3/library/decimal.html#rounding-modes
859859
[django-current-timezone]: https://docs.djangoproject.com/en/stable/topics/i18n/timezones/#default-time-zone-and-current-time-zone
860-
[django-docs-select-related]: https://docs.djangoproject.com/en/3.1/ref/models/querysets/#django.db.models.query.QuerySet.select_related
860+
[django-docs-select-related]: https://docs.djangoproject.com/en/stable/ref/models/querysets/#django.db.models.query.QuerySet.select_related

0 commit comments

Comments
 (0)