mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-16 16:18:07 -07:00
26 lines
948 B
Diff
26 lines
948 B
Diff
This is a hack to get the tests to pass prior to:
|
|
|
|
[e83a88566a71a2353cebc35992c110be0f8628af] Fixed #32172 -- Adapted signals to allow async handlers.
|
|
|
|
diff --git a/django/test/signals.py b/django/test/signals.py
|
|
index 94a5161e82..1358101b98 100644
|
|
--- a/django/test/signals.py
|
|
+++ b/django/test/signals.py
|
|
@@ -14,6 +14,7 @@ from django.utils import timezone
|
|
from django.utils.formats import FORMAT_SETTINGS, reset_format_cache
|
|
from django.utils.functional import empty
|
|
from django.utils.module_loading import import_string
|
|
+from django.utils.version import PY312
|
|
|
|
template_rendered = Signal()
|
|
|
|
@@ -183,7 +184,7 @@ def complex_setting_changed(*, enter, setting, **kwargs):
|
|
# this stacklevel shows the line containing the override_settings call.
|
|
warnings.warn(
|
|
f"Overriding setting {setting} can lead to unexpected behavior.",
|
|
- stacklevel=6,
|
|
+ stacklevel=5 if PY312 else 6,
|
|
)
|
|
|
|
|