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

Skip to content

Commit 2a157d2

Browse files
committed
Fix closes issue12683 - urljoin to work with relative join of svn scheme.
1 parent 86a1a89 commit 2a157d2

3 files changed

Lines changed: 7 additions & 1 deletion

File tree

Lib/test/test_urlparse.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,8 @@ def test_urljoins(self):
371371
self.checkJoin('http:///', '..','http:///')
372372
self.checkJoin('', 'http://a/b/c/g?y/./x','http://a/b/c/g?y/./x')
373373
self.checkJoin('', 'http://a/./g', 'http://a/./g')
374+
self.checkJoin('svn://pathtorepo/dir1', 'dir2', 'svn://pathtorepo/dir2')
375+
self.checkJoin('svn://pathtorepo/dir1', 'dir2', 'svn://pathtorepo/dir2')
374376

375377
def test_RFC2732(self):
376378
str_cases = [

Lib/urllib/parse.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@
3838
# A classification of schemes ('' means apply by default)
3939
uses_relative = ['ftp', 'http', 'gopher', 'nntp', 'imap',
4040
'wais', 'file', 'https', 'shttp', 'mms',
41-
'prospero', 'rtsp', 'rtspu', '', 'sftp']
41+
'prospero', 'rtsp', 'rtspu', '', 'sftp',
42+
'svn', 'svn+ssh']
4243
uses_netloc = ['ftp', 'http', 'gopher', 'nntp', 'telnet',
4344
'imap', 'wais', 'file', 'mms', 'https', 'shttp',
4445
'snews', 'prospero', 'rtsp', 'rtspu', 'rsync', '',

Misc/NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ Core and Builtins
4141
Library
4242
-------
4343

44+
- Issue #12683: urlparse updated to include svn as schemes that uses relative
45+
paths. (svn from 1.5 onwards support relative path).
46+
4447
- Issues #11104, #8688: Fix the behavior of distutils' sdist command with
4548
manually-maintained MANIFEST files.
4649

0 commit comments

Comments
 (0)