From 9da0ce25b78bdbf8041b7c23417b5678615ea97d Mon Sep 17 00:00:00 2001 From: Pravin <91125540+p-r-a-v-i-n@users.noreply.github.com> Date: Sat, 24 Jan 2026 19:38:06 +0530 Subject: [PATCH 1/3] Update pre-commit hooks versions (#9872) --- .pre-commit-config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 90fa5710c..8895ed954 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -24,7 +24,7 @@ repos: hooks: - id: blacken-docs additional_dependencies: - - black==25.9.0 + - black==26.1.0 - repo: https://github.com/codespell-project/codespell # Configuration for codespell is in pyproject.toml rev: v2.4.1 @@ -34,11 +34,11 @@ repos: # python doesn't come with a toml parser prior to 3.11 - "tomli; python_version < '3.11'" - repo: https://github.com/asottile/pyupgrade - rev: v3.21.0 + rev: v3.21.2 hooks: - id: pyupgrade args: ["--py310-plus", "--keep-percent-format"] - repo: https://github.com/tox-dev/pyproject-fmt - rev: v2.11.0 + rev: v2.11.1 hooks: - id: pyproject-fmt From c8af56d2600ef25216175d08c2bea053e00cbcff Mon Sep 17 00:00:00 2001 From: Rispa Joseph <88330312+RispaJoseph@users.noreply.github.com> Date: Sat, 24 Jan 2026 19:42:00 +0530 Subject: [PATCH 2/3] Clarify deprecation of built-in OpenAPI documentation (#9874) --- docs/topics/documenting-your-api.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/docs/topics/documenting-your-api.md b/docs/topics/documenting-your-api.md index edb989290..f4fee104b 100644 --- a/docs/topics/documenting-your-api.md +++ b/docs/topics/documenting-your-api.md @@ -4,10 +4,11 @@ > > — Roy Fielding, [REST APIs must be hypertext driven][cite] -REST framework provides a range of different choices for documenting your API. The following -is a non-exhaustive list of the most popular ones. +REST framework provides a range of different choices for documenting your API. The following is a non-exhaustive list of some of the most popular options. -## Third party packages for OpenAPI support +## Third-party packages for OpenAPI support + +REST framework recommends using third-party packages for generating and presenting OpenAPI schemas, as they provide more features and flexibility than the built-in (deprecated) implementation. ### drf-spectacular @@ -37,9 +38,9 @@ This also translates into a very useful interactive documentation viewer in the ## Built-in OpenAPI schema generation (deprecated) -**Deprecation notice: REST framework's built-in support for generating OpenAPI schemas is -deprecated in favor of 3rd party packages that can provide this functionality instead. -As replacement, we recommend using the [drf-spectacular](#drf-spectacular) package.** +!!! warning + **Deprecation notice:** REST framework's built-in support for generating OpenAPI schemas is deprecated in favor of third-party packages that provide this functionality instead. As a replacement, we recommend using **drf-spectacular**. + There are a number of packages available that allow you to generate HTML documentation pages from OpenAPI schemas. From 249fb478427ac9d4ffcfa3f1b0e7502df23f9724 Mon Sep 17 00:00:00 2001 From: Lorenzo Guideri <78531018+LorenzoGuideri@users.noreply.github.com> Date: Sat, 24 Jan 2026 15:33:10 +0100 Subject: [PATCH 3/3] Clarify operators precendence in permissions documentation (#9875) --- docs/api-guide/permissions.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/api-guide/permissions.md b/docs/api-guide/permissions.md index b8179490e..8acbdf77d 100644 --- a/docs/api-guide/permissions.md +++ b/docs/api-guide/permissions.md @@ -138,7 +138,10 @@ Provided they inherit from `rest_framework.permissions.BasePermission`, permissi return Response(content) !!! note - Composition of permissions supports `&` (and), `|` (or) and `~` (not) operators. + Composition of permissions supports the `&` (and), `|` (or) and `~` (not) operators, and also allows the use of brackets `(` `)` to group expressions. + + Operators follow the same precedence and associativity rules as standard logical operators (`~` highest, then `&`, then `|`). + # API Reference