From 4fe3774c729f3fd5105b3001fe69a70bdca95ac3 Mon Sep 17 00:00:00 2001 From: Chris Jerdonek Date: Wed, 4 Aug 2021 23:20:04 -0400 Subject: [PATCH] Refs #32986 -- Moved TRANSLATOR_COMMENT_MARK to django.utils.translation.template. --- django/template/base.py | 1 - django/utils/translation/template.py | 4 +++- docs/releases/4.0.txt | 3 +++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/django/template/base.py b/django/template/base.py index ffd851ac39..a8c2e5774e 100644 --- a/django/template/base.py +++ b/django/template/base.py @@ -78,7 +78,6 @@ VARIABLE_TAG_START = '{{' VARIABLE_TAG_END = '}}' COMMENT_TAG_START = '{#' COMMENT_TAG_END = '#}' -TRANSLATOR_COMMENT_MARK = 'Translators' SINGLE_BRACE_START = '{' SINGLE_BRACE_END = '}' diff --git a/django/utils/translation/template.py b/django/utils/translation/template.py index 778faa770e..588f538cb2 100644 --- a/django/utils/translation/template.py +++ b/django/utils/translation/template.py @@ -1,11 +1,13 @@ import warnings from io import StringIO -from django.template.base import TRANSLATOR_COMMENT_MARK, Lexer, TokenType +from django.template.base import Lexer, TokenType from django.utils.regex_helper import _lazy_re_compile from . import TranslatorCommentWarning, trim_whitespace +TRANSLATOR_COMMENT_MARK = 'Translators' + dot_re = _lazy_re_compile(r'\S') diff --git a/docs/releases/4.0.txt b/docs/releases/4.0.txt index 6821378e3b..390c561638 100644 --- a/docs/releases/4.0.txt +++ b/docs/releases/4.0.txt @@ -536,6 +536,9 @@ Miscellaneous and ``response.csrf_cookie_set`` to track whether the CSRF cookie should be sent. This is an undocumented, private API. +* The undocumented ``TRANSLATOR_COMMENT_MARK`` constant is moved from + ``django.template.base`` to ``django.utils.translation.template``. + .. _deprecated-features-4.0: Features deprecated in 4.0