summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSenthil Kumaran <senthil@uthcode.com>2011-08-03 10:44:10 (GMT)
committerSenthil Kumaran <senthil@uthcode.com>2011-08-03 10:44:10 (GMT)
commit8a984b58b720a84eb743737b4b7bd3ee13e3ceb7 (patch)
tree51a0478de7f598a45a55899fd659eb18a848fdad
parent05cd4c602b4f16606dd046dfad51f1d0465d9d85 (diff)
parent2a157d2a3d76960e696ef8004c237de4b424302e (diff)
downloadcpython-8a984b58b720a84eb743737b4b7bd3ee13e3ceb7.zip
cpython-8a984b58b720a84eb743737b4b7bd3ee13e3ceb7.tar.gz
cpython-8a984b58b720a84eb743737b4b7bd3ee13e3ceb7.tar.bz2
merge from 3.2 - Fix closes issue12683 - urljoin to work with relative join of svn scheme.
-rw-r--r--Lib/test/test_urlparse.py2
-rw-r--r--Lib/urllib/parse.py3
-rw-r--r--Misc/NEWS3
3 files changed, 7 insertions, 1 deletions
diff --git a/Lib/test/test_urlparse.py b/Lib/test/test_urlparse.py
index 72f3776..af200d5 100644
--- a/Lib/test/test_urlparse.py
+++ b/Lib/test/test_urlparse.py
@@ -371,6 +371,8 @@ class UrlParseTestCase(unittest.TestCase):
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
index 45ae202..01067ae 100644
--- a/Lib/urllib/parse.py
+++ b/Lib/urllib/parse.py
@@ -38,7 +38,8 @@ __all__ = ["urlparse", "urlunparse", "urljoin", "urldefrag",
# 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
index df05910..22ed1c0 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -249,6 +249,9 @@ Core and Builtins
Library
-------
+- Issue #12683: urlparse updated to include svn as schemes that uses relative
+ paths. (svn from 1.5 onwards support relative path).
+
- Issue #12655: Expose functions from sched.h in the os module: sched_yield(),
sched_setscheduler(), sched_getscheduler(), sched_setparam(),
sched_get_min_priority(), sched_get_max_priority(), sched_rr_get_interval(),