mirror of https://github.com/zulip/zulip.git
python: Replace deprecated jinja2.utils.Markup with markupsafe.Markup.
Fixes “DeprecationWarning: 'jinja2.Markup' is deprecated and will be removed in Jinja 3.1. Import 'markupsafe.Markup' instead.” Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
cf9483e6a9
commit
78e54a0d7a
|
@ -9,7 +9,7 @@ from django.db.backends.utils import CursorWrapper
|
||||||
from django.db.models.query import QuerySet
|
from django.db.models.query import QuerySet
|
||||||
from django.template import loader
|
from django.template import loader
|
||||||
from django.urls import reverse
|
from django.urls import reverse
|
||||||
from jinja2.utils import Markup as mark_safe
|
from markupsafe import Markup as mark_safe
|
||||||
|
|
||||||
eastern_tz = pytz.timezone("US/Eastern")
|
eastern_tz = pytz.timezone("US/Eastern")
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ from django.http import HttpRequest, HttpResponse
|
||||||
from django.shortcuts import render
|
from django.shortcuts import render
|
||||||
from django.template import loader
|
from django.template import loader
|
||||||
from django.utils.timezone import now as timezone_now
|
from django.utils.timezone import now as timezone_now
|
||||||
from jinja2.utils import Markup as mark_safe
|
from markupsafe import Markup as mark_safe
|
||||||
from psycopg2.sql import SQL, Composable, Literal
|
from psycopg2.sql import SQL, Composable, Literal
|
||||||
|
|
||||||
from analytics.lib.counts import COUNT_STATS
|
from analytics.lib.counts import COUNT_STATS
|
||||||
|
|
|
@ -14,7 +14,7 @@ from django.http import HttpRequest
|
||||||
from django.urls import reverse
|
from django.urls import reverse
|
||||||
from django.utils.http import urlsafe_base64_encode
|
from django.utils.http import urlsafe_base64_encode
|
||||||
from django.utils.translation import gettext as _
|
from django.utils.translation import gettext as _
|
||||||
from jinja2.utils import Markup as mark_safe
|
from markupsafe import Markup as mark_safe
|
||||||
from two_factor.forms import AuthenticationTokenForm as TwoFactorAuthenticationTokenForm
|
from two_factor.forms import AuthenticationTokenForm as TwoFactorAuthenticationTokenForm
|
||||||
from two_factor.utils import totp_digits
|
from two_factor.utils import totp_digits
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ from django.core.signing import BadSignature, TimestampSigner
|
||||||
from django.http import HttpRequest
|
from django.http import HttpRequest
|
||||||
from django.urls import reverse
|
from django.urls import reverse
|
||||||
from django.utils.translation import gettext as _
|
from django.utils.translation import gettext as _
|
||||||
from jinja2.utils import Markup as mark_safe
|
from markupsafe import Markup as mark_safe
|
||||||
from mypy_boto3_s3.client import S3Client
|
from mypy_boto3_s3.client import S3Client
|
||||||
from mypy_boto3_s3.service_resource import Bucket, Object
|
from mypy_boto3_s3.service_resource import Bucket, Object
|
||||||
from PIL import Image, ImageOps
|
from PIL import Image, ImageOps
|
||||||
|
|
|
@ -24,7 +24,7 @@ from django.utils.http import url_has_allowed_host_and_scheme
|
||||||
from django.utils.translation import gettext as _
|
from django.utils.translation import gettext as _
|
||||||
from django.views.decorators.csrf import csrf_exempt
|
from django.views.decorators.csrf import csrf_exempt
|
||||||
from django.views.decorators.http import require_safe
|
from django.views.decorators.http import require_safe
|
||||||
from jinja2.utils import Markup as mark_safe
|
from markupsafe import Markup as mark_safe
|
||||||
from social_django.utils import load_backend, load_strategy
|
from social_django.utils import load_backend, load_strategy
|
||||||
from two_factor.forms import BackupTokenForm
|
from two_factor.forms import BackupTokenForm
|
||||||
from two_factor.views import LoginView as BaseTwoFactorLoginView
|
from two_factor.views import LoginView as BaseTwoFactorLoginView
|
||||||
|
|
Loading…
Reference in New Issue