Skip to content

Commit 245d240

Browse files
committedOct 28, 2022
Fixed documentation by removing obsolete reference.
Python 3.11 has removed support for `@asyncio.coroutine` and with it removed the documentation references for `asyncio.iscoroutinefunction()` such that the intersphinx reference is unavailable. The implementation of `asyncio.iscoroutinefunction()` still exists, however: https://github.com/python/cpython/blob/a1092f62492a3fcd6195bea94eccf8d5a300acb1/Lib/asyncio/coroutines.py#L21-L24 It looks as though it will be removed in the future: python/cpython#94912 As we still need to support Python < 3.11 where `@asyncio.coroutine` may be used we will likely need to vendor this until Python 3.11 is the minimum supported version when `inspect.iscoroutinefunction()` can be used directly instead. That will likely not be required until 3.12 though.
1 parent 37c5b8c commit 245d240

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎docs/topics/http/middleware.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ If your middleware has both ``sync_capable = True`` and
312312
``async_capable = True``, then Django will pass it the request without
313313
converting it. In this case, you can work out if your middleware will receive
314314
async requests by checking if the ``get_response`` object you are passed is a
315-
coroutine function, using :py:func:`asyncio.iscoroutinefunction`.
315+
coroutine function, using ``asyncio.iscoroutinefunction``.
316316

317317
The ``django.utils.decorators`` module contains
318318
:func:`~django.utils.decorators.sync_only_middleware`,

0 commit comments

Comments
 (0)