From 9e456f3166f6f4f7da9ec00e2160c1edc88fe5b3 Mon Sep 17 00:00:00 2001 From: Mariusz Felisiak Date: Thu, 7 Jan 2021 08:15:39 +0100 Subject: Refs #30747 -- Removed django.utils.http.is_safe_url() per deprecation timeline. --- django/utils/http.py | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'django/utils') diff --git a/django/utils/http.py b/django/utils/http.py index 62c30d3394..962716eb00 100644 --- a/django/utils/http.py +++ b/django/utils/http.py @@ -3,7 +3,6 @@ import calendar import datetime import re import unicodedata -import warnings from binascii import Error as BinasciiError from email.utils import formatdate from urllib.parse import ( @@ -12,7 +11,6 @@ from urllib.parse import ( ) from django.utils.datastructures import MultiValueDict -from django.utils.deprecation import RemovedInDjango40Warning from django.utils.regex_helper import _lazy_re_compile # based on RFC 7232, Appendix C @@ -267,15 +265,6 @@ def url_has_allowed_host_and_scheme(url, allowed_hosts, require_https=False): ) -def is_safe_url(url, allowed_hosts, require_https=False): - warnings.warn( - 'django.utils.http.is_safe_url() is deprecated in favor of ' - 'url_has_allowed_host_and_scheme().', - RemovedInDjango40Warning, stacklevel=2, - ) - return url_has_allowed_host_and_scheme(url, allowed_hosts, require_https) - - # Copied from urllib.parse.urlparse() but uses fixed urlsplit() function. def _urlparse(url, scheme='', allow_fragments=True): """Parse a URL into 6 components: -- cgit v1.3