diff options
| author | Jacob Walls <jacobtylerwalls@gmail.com> | 2026-01-30 15:53:27 -0500 |
|---|---|---|
| committer | Jacob Walls <jacobtylerwalls@gmail.com> | 2026-01-31 08:59:54 -0500 |
| commit | 4a52533329a03207c1c4592a13fbb12b9ec5ef9e (patch) | |
| tree | d45724230dc3a299b1563418e2713cfc81450604 /django/test | |
| parent | 93dfb16e96797583a6f45eeb918e78c7f2817318 (diff) | |
Refs #34118 -- Removed asgiref coroutine detection shims.
As Python 3.12 is now the floor, we can drop the shims and
use the `inspect` module.
Diffstat (limited to 'django/test')
| -rw-r--r-- | django/test/testcases.py | 3 | ||||
| -rw-r--r-- | django/test/utils.py | 3 |
2 files changed, 3 insertions, 3 deletions
diff --git a/django/test/testcases.py b/django/test/testcases.py index c56fa52806..5f83612fe5 100644 --- a/django/test/testcases.py +++ b/django/test/testcases.py @@ -11,6 +11,7 @@ from contextlib import contextmanager from copy import copy, deepcopy from difflib import get_close_matches from functools import wraps +from inspect import iscoroutinefunction from unittest import mock from unittest.suite import _DebugResult from unittest.util import safe_repr @@ -25,7 +26,7 @@ from urllib.parse import ( ) from urllib.request import url2pathname -from asgiref.sync import async_to_sync, iscoroutinefunction +from asgiref.sync import async_to_sync from django.apps import apps from django.conf import settings diff --git a/django/test/utils.py b/django/test/utils.py index 3661010463..ec888b3588 100644 --- a/django/test/utils.py +++ b/django/test/utils.py @@ -8,14 +8,13 @@ import time import warnings from contextlib import contextmanager from functools import wraps +from inspect import iscoroutinefunction from io import StringIO from itertools import chain from types import SimpleNamespace from unittest import TestCase, skipIf, skipUnless from xml.dom.minidom import Node, parseString -from asgiref.sync import iscoroutinefunction - from django.apps import apps from django.apps.registry import Apps from django.conf import UserSettingsHolder, settings |
