summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVille Skyttä <ville.skytta@iki.fi>2017-10-31 18:05:54 +0200
committerTim Graham <timograham@gmail.com>2017-10-31 12:05:54 -0400
commit23e551ce6c7956e4c143357643dab2e89d30bfe0 (patch)
tree74a50c120f83da60ac2956fda6467184cbaf4317
parent5e1a356060b6d9b3efa583b5a2c419d1fd630054 (diff)
Refs #23919 -- Updated references to urllib.quote() to Python 3 location.
-rw-r--r--django/contrib/admin/utils.py8
-rw-r--r--django/utils/encoding.py4
2 files changed, 5 insertions, 7 deletions
diff --git a/django/contrib/admin/utils.py b/django/contrib/admin/utils.py
index 9bd4aa7857..c55336ad00 100644
--- a/django/contrib/admin/utils.py
+++ b/django/contrib/admin/utils.py
@@ -64,8 +64,8 @@ def quote(s):
"""
Ensure that primary key values do not confuse the admin URLs by escaping
any '/', '_' and ':' and similarly problematic characters.
- Similar to urllib.quote, except that the quoting is slightly different so
- that it doesn't get automatically unquoted by the Web browser.
+ Similar to urllib.parse.quote(), except that the quoting is slightly
+ different so that it doesn't get automatically unquoted by the Web browser.
"""
if not isinstance(s, str):
return s
@@ -78,9 +78,7 @@ def quote(s):
def unquote(s):
- """
- Undo the effects of quote(). Based heavily on urllib.unquote().
- """
+ """Undo the effects of quote(). Based heavily on urllib.parse.unquote()."""
mychr = chr
myatoi = int
list = s.split('_')
diff --git a/django/utils/encoding.py b/django/utils/encoding.py
index 1ac14a66d7..4ff530c406 100644
--- a/django/utils/encoding.py
+++ b/django/utils/encoding.py
@@ -139,8 +139,8 @@ def iri_to_uri(iri):
# sub-delims = "!" / "$" / "&" / "'" / "(" / ")"
# / "*" / "+" / "," / ";" / "="
# unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
- # Of the unreserved characters, urllib.quote already considers all but
- # the ~ safe.
+ # Of the unreserved characters, urllib.parse.quote() already considers all
+ # but the ~ safe.
# The % character is also added to the list of safe characters here, as the
# end of section 3.1 of RFC 3987 specifically mentions that % must not be
# converted.