1
0
mirror of https://github.com/django/django.git synced 2025-07-12 13:49:11 +00:00

Refs #35844, #35945 -- Used asgiref.sync.iscoroutinefunction() instead of deprecated asyncio.iscoroutinefunction().

Follow up to bd3b1dfa2422e02ced3a894adb7544e42540c97d.
Introduced in 2ae3044d9d4dfb8371055513e440e0384f211963.

Fixes DeprecationWarning:

'asyncio.iscoroutinefunction' is deprecated and slated for removal
in Python 3.16; use inspect.iscoroutinefunction() instead.
This commit is contained in:
Mariusz Felisiak 2025-07-09 18:01:44 +02:00 committed by GitHub
parent 6df19412aa
commit 426be74022
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,10 +1,9 @@
import collections.abc import collections.abc
import inspect import inspect
import warnings import warnings
from asyncio import iscoroutinefunction
from math import ceil from math import ceil
from asgiref.sync import sync_to_async from asgiref.sync import iscoroutinefunction, sync_to_async
from django.utils.deprecation import RemovedInDjango70Warning from django.utils.deprecation import RemovedInDjango70Warning
from django.utils.functional import cached_property from django.utils.functional import cached_property