From d1f3c2bcec865e79e25e59ca0564d9eb8715f2f7 Mon Sep 17 00:00:00 2001 From: Mike Edmunds Date: Tue, 16 Jun 2026 07:16:29 -0700 Subject: [PATCH 1/6] Fixed typo in section "Configuring email" in docs/topics/email.txt. --- docs/topics/email.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/topics/email.txt b/docs/topics/email.txt index 3aa52843796e..d52ffd12ed9d 100644 --- a/docs/topics/email.txt +++ b/docs/topics/email.txt @@ -72,8 +72,8 @@ is printed to the console as a development aid (for projects created with :djadmin:`startproject`) or results in a ``MailerDoesNotExist`` error (when the :setting:`MAILERS` setting isn't defined). -Define edit the :setting:`MAILERS` setting to tell Django how to send email. -For example, to send through an SMTP server running on the local machine:: +Use the :setting:`MAILERS` setting to tell Django how to send email. For +example, to send through an SMTP server running on the local machine:: MAILERS = { "default": { From 967643959f0a6f5351e4fdeb48cf935d787e4e6a Mon Sep 17 00:00:00 2001 From: SnippyCodes Date: Sat, 13 Jun 2026 11:29:05 +0530 Subject: [PATCH 2/6] Fixed #37157 -- Doc'd usage of sphinx-autobuild for documentation auto-reloading. --- .../contributing/writing-documentation.txt | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/docs/internals/contributing/writing-documentation.txt b/docs/internals/contributing/writing-documentation.txt index a9fa1a0267f0..cbbe611d7c35 100644 --- a/docs/internals/contributing/writing-documentation.txt +++ b/docs/internals/contributing/writing-documentation.txt @@ -142,6 +142,51 @@ will be themed differently than the documentation at `docs.djangoproject.com `_. This is OK! If your changes look good on your local machine, they'll look good on the website. +Automating documentation rebuilds +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:pypi:`sphinx-autobuild` can be used to automatically rebuild the documentation +and reload the documentation page in the browser whenever a file changes. To +enable auto-reloading: + +1. Install the package: + + .. console:: + + $ python -m pip install sphinx-autobuild + +2. From the ``docs`` directory, run one of the following commands: + + * On Linux and macOS: + + .. code-block:: shell + + $ SPHINXBUILD=sphinx-autobuild SPHINXOPTS="--open-browser --delay 0" make html + + * On Windows (Command Prompt): + + .. code-block:: doscon + + ...\> set SPHINXBUILD=sphinx-autobuild + ...\> set SPHINXOPTS=--open-browser --delay 0 + ...\> make html + + * On Windows (PowerShell): + + .. code-block:: powershell + + PS> $env:SPHINXBUILD="sphinx-autobuild" + PS> $env:SPHINXOPTS="--open-browser --delay 0" + PS> make html + + Alternatively, ``sphinx-autobuild`` can be invoked directly: + + .. console:: + + $ sphinx-autobuild . _build/html --open-browser --delay 0 + +The auto-reloader can be stopped with ``Ctrl+C``. + Making edits to the documentation --------------------------------- From d0378e181e828dce90d865f38b8f10f260d88de3 Mon Sep 17 00:00:00 2001 From: SiHyunLee Date: Wed, 17 Jun 2026 00:12:46 +0900 Subject: [PATCH 3/6] Fixed #37169, Refs #36437 -- Replaced text-based selector in a selenium test. After incorporating a translation for "Run" in Arabic, the RTL case started failing. --- tests/admin_views/tests.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/admin_views/tests.py b/tests/admin_views/tests.py index b6c4e88a43ef..3a7dde7f2dc9 100644 --- a/tests/admin_views/tests.py +++ b/tests/admin_views/tests.py @@ -7489,7 +7489,9 @@ def test_messages(self): Select(self.selenium.find_element(By.NAME, "action")).select_by_value( f"message_{level}" ) - self.selenium.find_element(By.XPATH, '//button[text()="Run"]').click() + self.selenium.find_element( + By.CSS_SELECTOR, 'button[name="index"]' + ).click() message = self.selenium.find_element( By.CSS_SELECTOR, "ul.messagelist li" ) From 125e337a4c91e907d022f02c9aa8a393fd2921ed Mon Sep 17 00:00:00 2001 From: Sarah Boyce <42296566+sarahboyce@users.noreply.github.com> Date: Mon, 15 Jun 2026 13:32:34 +0200 Subject: [PATCH 4/6] Removed selenium<4.44.0 version pin. --- tests/requirements/py3.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/requirements/py3.txt b/tests/requirements/py3.txt index 6603e94a2c63..e8056bd46f26 100644 --- a/tests/requirements/py3.txt +++ b/tests/requirements/py3.txt @@ -14,7 +14,7 @@ pymemcache >= 3.4.0 pywatchman; sys_platform != 'win32' PyYAML >= 6.0.2 redis >= 5.1.0 -selenium >= 4.23.0,<4.44.0 +selenium >= 4.23.0 sqlparse >= 0.5.0 tblib >= 3.0.0 tzdata From f89101088a149d8c9eca4e4796723a3f0de5b129 Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Fri, 12 Jun 2026 00:07:40 +0200 Subject: [PATCH 5/6] Fixed #37163 -- Optimized @user_passes_test async checking. --- django/contrib/auth/decorators.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/django/contrib/auth/decorators.py b/django/contrib/auth/decorators.py index 3407555852e1..d2e6845abede 100644 --- a/django/contrib/auth/decorators.py +++ b/django/contrib/auth/decorators.py @@ -36,25 +36,27 @@ def _redirect_to_login(request): return redirect_to_login(path, resolved_login_url, redirect_field_name) if iscoroutinefunction(view_func): + if iscoroutinefunction(test_func): + _async_test_func = test_func + else: + _async_test_func = sync_to_async(test_func) async def _view_wrapper(request, *args, **kwargs): auser = await request.auser() - if iscoroutinefunction(test_func): - test_pass = await test_func(auser) - else: - test_pass = await sync_to_async(test_func)(auser) + test_pass = await _async_test_func(auser) if test_pass: return await view_func(request, *args, **kwargs) return _redirect_to_login(request) else: + if iscoroutinefunction(test_func): + _sync_test_func = async_to_sync(test_func) + else: + _sync_test_func = test_func def _view_wrapper(request, *args, **kwargs): - if iscoroutinefunction(test_func): - test_pass = async_to_sync(test_func)(request.user) - else: - test_pass = test_func(request.user) + test_pass = _sync_test_func(request.user) if test_pass: return view_func(request, *args, **kwargs) From b3af3404b183597b8554219a6f03cb67cc61b876 Mon Sep 17 00:00:00 2001 From: Natalia <124304+nessita@users.noreply.github.com> Date: Tue, 16 Jun 2026 12:02:46 -0300 Subject: [PATCH 6/6] Refs #37142 -- Removed docs for django.utils.warnings.django_file_prefixes(). This reverts docs changes from commit f970a98e464320c09dde8d45009eadfb4d038a57. --- docs/ref/utils.txt | 28 ---------------------------- docs/releases/6.2.txt | 5 +---- 2 files changed, 1 insertion(+), 32 deletions(-) diff --git a/docs/ref/utils.txt b/docs/ref/utils.txt index 0f38105713c3..1c42784d1394 100644 --- a/docs/ref/utils.txt +++ b/docs/ref/utils.txt @@ -1187,31 +1187,3 @@ For a complete discussion on the usage of the following see the Turns a Django template into something that is understood by ``xgettext``. It does so by translating the Django translation tags into standard ``gettext`` function invocations. - -``django.utils.warnings`` -========================= - -.. module:: django.utils.warnings - :synopsis: Helpers for issuing warnings. - -.. function:: django_file_prefixes() - - .. versionadded:: 6.2 - - Returns a tuple of file path prefixes for the Django package directory. - This is used as the ``skip_file_prefixes`` argument to - :func:`warnings.warn` so that warnings are attributed to the *caller* - (your project or third-party library) rather than to Django internals. - - The result is cached after the first call. - - Usage example:: - - import warnings - from django.utils.warnings import django_file_prefixes - - warnings.warn( - "Your custom warning message.", - category=RuntimeWarning, - skip_file_prefixes=django_file_prefixes(), - ) diff --git a/docs/releases/6.2.txt b/docs/releases/6.2.txt index b949b0aa24ae..f1bde4805ca3 100644 --- a/docs/releases/6.2.txt +++ b/docs/releases/6.2.txt @@ -234,10 +234,7 @@ URLs Utilities ~~~~~~~~~ -* The new ``django.utils.warnings`` module provides - :func:`~django.utils.warnings.django_file_prefixes`, which returns the file - path prefix of the Django package for use as the ``skip_file_prefixes`` - argument of :func:`warnings.warn`. +* ... Validators ~~~~~~~~~~