1
0
mirror of https://github.com/django/django.git synced 2024-12-22 17:16:24 +00:00

Removed obsolete warnings about asgiref.sync adapters with sensitive variables.

Django 5.0+ required asgiref 3.7+, and this warning is obsolete for
asgiref 3.7+ since
be6635e0e7.
This commit is contained in:
Mariusz Felisiak 2023-11-17 12:09:32 +01:00 committed by GitHub
parent 6daf86058b
commit 594873befb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 25 deletions

View File

@ -194,17 +194,6 @@ filtered out of error reports in a production environment (that is, where
def process_info(user): def process_info(user):
... ...
.. warning::
Due to the machinery needed to cross the sync/async boundary,
:func:`~asgiref.sync.sync_to_async` and
:func:`~asgiref.sync.async_to_sync` are **not** compatible with
``sensitive_variables()``.
If using these adapters with sensitive variables, ensure to audit
exception reporting, and consider implementing a :ref:`custom filter
<custom-error-reports>` if necessary.
.. versionchanged:: 5.0 .. versionchanged:: 5.0
Support for wrapping ``async`` functions was added. Support for wrapping ``async`` functions was added.

View File

@ -401,17 +401,3 @@ trigger the thread safety checks:
Rather, you should encapsulate all database access within a helper function Rather, you should encapsulate all database access within a helper function
that can be called with ``sync_to_async()`` without relying on the connection that can be called with ``sync_to_async()`` without relying on the connection
object in the calling code. object in the calling code.
Use with exception reporting filters
------------------------------------
.. warning::
Due to the machinery needed to cross the sync/async boundary,
``sync_to_async()`` and ``async_to_sync()`` are **not** compatible with
:func:`~django.views.decorators.debug.sensitive_variables`, used to mask
local variables from exception reports.
If using these adapters with sensitive variables, ensure to audit exception
reporting, and consider implementing a :ref:`custom filter
<custom-error-reports>` if necessary.