(original) (raw)

changeset: 103857:9bf370a33938 branch: 3.6 parent: 103853:87de1f12c41c parent: 103856:a5e8fe666c6b user: Berker Peksag berker.peksag@gmail.com date: Fri Sep 16 14:45:15 2016 +0300 files: Doc/library/urllib.parse.rst Lib/test/test_urlparse.py Lib/urllib/parse.py Misc/NEWS description: Issue #25895: Merge from 3.5 diff -r 87de1f12c41c -r 9bf370a33938 Doc/library/urllib.parse.rst --- a/Doc/library/urllib.parse.rst Fri Sep 16 00:55:27 2016 +0000 +++ b/Doc/library/urllib.parse.rst Fri Sep 16 14:45:15 2016 +0300 @@ -25,7 +25,7 @@ ``gopher``, ``hdl``, ``http``, ``https``, ``imap``, ``mailto``, ``mms``, ``news``, ``nntp``, ``prospero``, ``rsync``, ``rtsp``, ``rtspu``, ``sftp``, ``shttp``, ``sip``, ``sips``, ``snews``, ``svn``, ``svn+ssh``, ``telnet``, -``wais``. +``wais``, ``ws``, ``wss``. The :mod:`urllib.parse` module defines functions that fall into two broad categories: URL parsing and URL quoting. These are covered in detail in diff -r 87de1f12c41c -r 9bf370a33938 Lib/test/test_urlparse.py --- a/Lib/test/test_urlparse.py Fri Sep 16 00:55:27 2016 +0000 +++ b/Lib/test/test_urlparse.py Fri Sep 16 14:45:15 2016 +0300 @@ -425,6 +425,8 @@ self.checkJoin('', 'http://a/./g', 'http://a/./g') self.checkJoin('svn://pathtorepo/dir1', 'dir2', 'svn://pathtorepo/dir2') self.checkJoin('svn+ssh://pathtorepo/dir1', 'dir2', 'svn+ssh://pathtorepo/dir2') + self.checkJoin('ws://a/b','g','ws://a/g') + self.checkJoin('wss://a/b','g','wss://a/g') # XXX: The following tests are no longer compatible with RFC3986 # self.checkJoin(SIMPLE_BASE, '../../../g','http://a/../g') diff -r 87de1f12c41c -r 9bf370a33938 Lib/urllib/parse.py --- a/Lib/urllib/parse.py Fri Sep 16 00:55:27 2016 +0000 +++ b/Lib/urllib/parse.py Fri Sep 16 14:45:15 2016 +0300 @@ -42,11 +42,12 @@ uses_relative = ['ftp', 'http', 'gopher', 'nntp', 'imap', 'wais', 'file', 'https', 'shttp', 'mms', 'prospero', 'rtsp', 'rtspu', '', 'sftp', - 'svn', 'svn+ssh'] + 'svn', 'svn+ssh', 'ws', 'wss'] uses_netloc = ['ftp', 'http', 'gopher', 'nntp', 'telnet', 'imap', 'wais', 'file', 'mms', 'https', 'shttp', 'snews', 'prospero', 'rtsp', 'rtspu', 'rsync', '', - 'svn', 'svn+ssh', 'sftp', 'nfs', 'git', 'git+ssh'] + 'svn', 'svn+ssh', 'sftp', 'nfs', 'git', 'git+ssh', + 'ws', 'wss'] uses_params = ['ftp', 'hdl', 'prospero', 'http', 'imap', 'https', 'shttp', 'rtsp', 'rtspu', 'sip', 'sips', 'mms', '', 'sftp', 'tel'] diff -r 87de1f12c41c -r 9bf370a33938 Misc/NEWS --- a/Misc/NEWS Fri Sep 16 00:55:27 2016 +0000 +++ b/Misc/NEWS Fri Sep 16 14:45:15 2016 +0300 @@ -27,6 +27,9 @@ Library ------- +- Issue #25895: Enable WebSocket URL schemes in urllib.parse.urljoin. + Patch by Gergely Imreh and Markus Holtermann. + - Issue #28114: Fix a crash in parse_envlist() when env contains byte strings. Patch by Eryk Sun. /berker.peksag@gmail.com