[Python-checkins] cpython (3.2): Fix closes issue12683 - urljoin to work with relative join of svn scheme.

senthil.kumaran python-checkins at python.org
Wed Aug 3 12:47:23 CEST 2011


http://hg.python.org/cpython/rev/57a836eb6916
changeset:   71730:57a836eb6916
branch:      3.2
parent:      71714:5ff56995976c
user:        Senthil Kumaran <senthil at uthcode.com>
date:        Wed Aug 03 18:37:22 2011 +0800
summary:
  Fix closes issue12683 - urljoin to work with relative join of svn scheme.

files:
  Lib/test/test_urlparse.py |  2 ++
  Lib/urllib/parse.py       |  3 ++-
  Misc/NEWS                 |  3 +++
  3 files changed, 7 insertions(+), 1 deletions(-)


diff --git a/Lib/test/test_urlparse.py b/Lib/test/test_urlparse.py
--- a/Lib/test/test_urlparse.py
+++ b/Lib/test/test_urlparse.py
@@ -371,6 +371,8 @@
         self.checkJoin('http:///', '..','http:///')
         self.checkJoin('', 'http://a/b/c/g?y/./x','http://a/b/c/g?y/./x')
         self.checkJoin('', 'http://a/./g', 'http://a/./g')
+        self.checkJoin('svn://pathtorepo/dir1', 'dir2', 'svn://pathtorepo/dir2')
+        self.checkJoin('svn://pathtorepo/dir1', 'dir2', 'svn://pathtorepo/dir2')
 
     def test_RFC2732(self):
         str_cases = [
diff --git a/Lib/urllib/parse.py b/Lib/urllib/parse.py
--- a/Lib/urllib/parse.py
+++ b/Lib/urllib/parse.py
@@ -38,7 +38,8 @@
 # A classification of schemes ('' means apply by default)
 uses_relative = ['ftp', 'http', 'gopher', 'nntp', 'imap',
                  'wais', 'file', 'https', 'shttp', 'mms',
-                 'prospero', 'rtsp', 'rtspu', '', 'sftp']
+                 'prospero', 'rtsp', 'rtspu', '', 'sftp',
+                 'svn', 'svn+ssh']
 uses_netloc = ['ftp', 'http', 'gopher', 'nntp', 'telnet',
                'imap', 'wais', 'file', 'mms', 'https', 'shttp',
                'snews', 'prospero', 'rtsp', 'rtspu', 'rsync', '',
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -41,6 +41,9 @@
 Library
 -------
 
+- Issue #12683: urlparse updated to include svn as schemes that uses relative
+  paths. (svn from 1.5 onwards support relative path).
+
 - Issues #11104, #8688: Fix the behavior of distutils' sdist command with
   manually-maintained MANIFEST files.
 

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


More information about the Python-checkins mailing list