From f970a98e464320c09dde8d45009eadfb4d038a57 Mon Sep 17 00:00:00 2001 From: zhengkangyang <1872483761@qq.com> Date: Sat, 6 Jun 2026 16:17:24 +0800 Subject: Fixed #37142 -- Moved django_file_prefixes() to django.utils.warnings. --- django/db/models/sql/compiler.py | 3 ++- django/db/models/sql/query.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'django/db/models/sql') diff --git a/django/db/models/sql/compiler.py b/django/db/models/sql/compiler.py index bcf28f9ae1..2ce6edefe5 100644 --- a/django/db/models/sql/compiler.py +++ b/django/db/models/sql/compiler.py @@ -24,10 +24,11 @@ from django.db.models.sql.constants import ( ) from django.db.models.sql.query import Query, get_order_dir from django.db.transaction import TransactionManagementError -from django.utils.deprecation import RemovedInDjango70Warning, django_file_prefixes +from django.utils.deprecation import RemovedInDjango70Warning from django.utils.functional import cached_property from django.utils.hashable import make_hashable from django.utils.regex_helper import _lazy_re_compile +from django.utils.warnings import django_file_prefixes class PositionRef(Ref): diff --git a/django/db/models/sql/query.py b/django/db/models/sql/query.py index 22dd479d67..adf0663beb 100644 --- a/django/db/models/sql/query.py +++ b/django/db/models/sql/query.py @@ -43,10 +43,11 @@ from django.db.models.query_utils import ( from django.db.models.sql.constants import INNER, LOUTER, ORDER_DIR, SINGLE from django.db.models.sql.datastructures import BaseTable, Empty, Join, MultiJoin from django.db.models.sql.where import AND, OR, ExtraWhere, NothingNode, WhereNode -from django.utils.deprecation import RemovedInDjango70Warning, django_file_prefixes +from django.utils.deprecation import RemovedInDjango70Warning from django.utils.functional import cached_property from django.utils.regex_helper import _lazy_re_compile from django.utils.tree import Node +from django.utils.warnings import django_file_prefixes __all__ = ["Query", "RawQuery"] -- cgit v1.3