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

Skip to content

Commit f8479ee

Browse files
committed
Issue #25895: Merge from 3.5
2 parents 355bbb0 + f676748 commit f8479ee

4 files changed

Lines changed: 9 additions & 3 deletions

File tree

Doc/library/urllib.parse.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Resource Locators. It supports the following URL schemes: ``file``, ``ftp``,
2525
``gopher``, ``hdl``, ``http``, ``https``, ``imap``, ``mailto``, ``mms``,
2626
``news``, ``nntp``, ``prospero``, ``rsync``, ``rtsp``, ``rtspu``, ``sftp``,
2727
``shttp``, ``sip``, ``sips``, ``snews``, ``svn``, ``svn+ssh``, ``telnet``,
28-
``wais``.
28+
``wais``, ``ws``, ``wss``.
2929

3030
The :mod:`urllib.parse` module defines functions that fall into two broad
3131
categories: URL parsing and URL quoting. These are covered in detail in

Lib/test/test_urlparse.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,8 @@ def test_urljoins(self):
425425
self.checkJoin('', 'http://a/./g', 'http://a/./g')
426426
self.checkJoin('svn://pathtorepo/dir1', 'dir2', 'svn://pathtorepo/dir2')
427427
self.checkJoin('svn+ssh://pathtorepo/dir1', 'dir2', 'svn+ssh://pathtorepo/dir2')
428+
self.checkJoin('ws://a/b','g','ws://a/g')
429+
self.checkJoin('wss://a/b','g','wss://a/g')
428430

429431
# XXX: The following tests are no longer compatible with RFC3986
430432
# self.checkJoin(SIMPLE_BASE, '../../../g','http://a/../g')

Lib/urllib/parse.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,12 @@
4242
uses_relative = ['ftp', 'http', 'gopher', 'nntp', 'imap',
4343
'wais', 'file', 'https', 'shttp', 'mms',
4444
'prospero', 'rtsp', 'rtspu', '', 'sftp',
45-
'svn', 'svn+ssh']
45+
'svn', 'svn+ssh', 'ws', 'wss']
4646
uses_netloc = ['ftp', 'http', 'gopher', 'nntp', 'telnet',
4747
'imap', 'wais', 'file', 'mms', 'https', 'shttp',
4848
'snews', 'prospero', 'rtsp', 'rtspu', 'rsync', '',
49-
'svn', 'svn+ssh', 'sftp', 'nfs', 'git', 'git+ssh']
49+
'svn', 'svn+ssh', 'sftp', 'nfs', 'git', 'git+ssh',
50+
'ws', 'wss']
5051
uses_params = ['ftp', 'hdl', 'prospero', 'http', 'imap',
5152
'https', 'shttp', 'rtsp', 'rtspu', 'sip', 'sips',
5253
'mms', '', 'sftp', 'tel']

Misc/NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ Core and Builtins
2727
Library
2828
-------
2929

30+
- Issue #25895: Enable WebSocket URL schemes in urllib.parse.urljoin.
31+
Patch by Gergely Imreh and Markus Holtermann.
32+
3033
- Issue #28114: Fix a crash in parse_envlist() when env contains byte strings.
3134
Patch by Eryk Sun.
3235

0 commit comments

Comments
 (0)