[Python-checkins] cpython (merge 3.2 -> default): merge from 3.2 - Fix closes issue12683 - urljoin to work with relative join of
senthil.kumaran
python-checkins at python.org
Wed Aug 3 12:47:25 CEST 2011
http://hg.python.org/cpython/rev/a3981d0c4d9b
changeset: 71732:a3981d0c4d9b
parent: 71719:de5b5fa674b6
parent: 71730:57a836eb6916
user: Senthil Kumaran <senthil at uthcode.com>
date: Wed Aug 03 18:44:10 2011 +0800
summary:
merge from 3.2 - 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
@@ -249,6 +249,9 @@
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(),
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list