Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a61b09f

Browse files
committed
Closes #9374: add back now-unused module attributes; removing them is a backward compatibility issue, since they have a public-seeming name.
1 parent 638d40b commit a61b09f

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

Lib/urllib/parse.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,16 @@
4848
'https', 'shttp', 'rtsp', 'rtspu', 'sip', 'sips',
4949
'mms', '', 'sftp']
5050

51+
# These are not actually used anymore, but should stay for backwards
52+
# compatibility. (They are undocumented, but have a public-looking name.)
53+
non_hierarchical = ['gopher', 'hdl', 'mailto', 'news',
54+
'telnet', 'wais', 'imap', 'snews', 'sip', 'sips']
55+
uses_query = ['http', 'wais', 'imap', 'https', 'shttp', 'mms',
56+
'gopher', 'rtsp', 'rtspu', 'sip', 'sips', '']
57+
uses_fragment = ['ftp', 'hdl', 'http', 'gopher', 'news',
58+
'nntp', 'wais', 'https', 'shttp', 'snews',
59+
'file', 'prospero', '']
60+
5161
# Characters valid in scheme names
5262
scheme_chars = ('abcdefghijklmnopqrstuvwxyz'
5363
'ABCDEFGHIJKLMNOPQRSTUVWXYZ'

0 commit comments

Comments
 (0)