[Python-checkins] cpython (3.2): Closes #9374: add back now-unused module attributes; removing them is a

georg.brandl python-checkins at python.org
Fri Aug 24 18:17:37 CEST 2012


http://hg.python.org/cpython/rev/a0b3cb52816e
changeset:   78734:a0b3cb52816e
branch:      3.2
parent:      78731:119c645f310e
user:        Georg Brandl <georg at python.org>
date:        Fri Aug 24 18:15:29 2012 +0200
summary:
  Closes #9374: add back now-unused module attributes; removing them is a backward compatibility issue, since they have a public-seeming name.

files:
  Lib/urllib/parse.py |  10 ++++++++++
  1 files changed, 10 insertions(+), 0 deletions(-)


diff --git a/Lib/urllib/parse.py b/Lib/urllib/parse.py
--- a/Lib/urllib/parse.py
+++ b/Lib/urllib/parse.py
@@ -48,6 +48,16 @@
                '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'

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list