aboutsummaryrefslogtreecommitdiff
path: root/examples/python2.7/patches/issue9374-followup.diff
diff options
context:
space:
mode:
Diffstat (limited to 'examples/python2.7/patches/issue9374-followup.diff')
-rw-r--r--examples/python2.7/patches/issue9374-followup.diff30
1 files changed, 30 insertions, 0 deletions
diff --git a/examples/python2.7/patches/issue9374-followup.diff b/examples/python2.7/patches/issue9374-followup.diff
new file mode 100644
index 0000000..7ef601c
--- /dev/null
+++ b/examples/python2.7/patches/issue9374-followup.diff
@@ -0,0 +1,30 @@
+# DP: Follwup for issue #9374. Restore the removed lists of the urlparse module.
+
+# HG changeset patch
+# User Georg Brandl <georg@python.org>
+# Date 1345825048 -7200
+# Node ID a434812109641df2c2af33afa030d8d06eef693c
+# Parent 787ed9b03ef9b8e26638b28ec55330a871e76495
+Closes #9374: add back now-unused module attributes; removing them is a backward compatibility issue, since they have a public-seeming name.
+
+diff --git a/Lib/urlparse.py b/Lib/urlparse.py
+--- a/Lib/urlparse.py
++++ b/Lib/urlparse.py
+@@ -44,6 +44,16 @@ uses_params = ['ftp', 'hdl', 'prospero',
+ 'https', 'shttp', 'rtsp', 'rtspu', 'sip', 'sips',
+ 'mms', '', 'sftp']
+
++# These are not actually used anymore, but should stay for backwards
++# compatibility. (They are undocumented, but have a public-looking name.)
++non_hierarchical = ['gopher', 'hdl', 'mailto', 'news',
++ 'telnet', 'wais', 'imap', 'snews', 'sip', 'sips']
++uses_query = ['http', 'wais', 'imap', 'https', 'shttp', 'mms',
++ 'gopher', 'rtsp', 'rtspu', 'sip', 'sips', '']
++uses_fragment = ['ftp', 'hdl', 'http', 'gopher', 'news',
++ 'nntp', 'wais', 'https', 'shttp', 'snews',
++ 'file', 'prospero', '']
++
+ # Characters valid in scheme names
+ scheme_chars = ('abcdefghijklmnopqrstuvwxyz'
+ 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+