[Python-checkins] cpython (merge default -> default): merge heads

benjamin.peterson python-checkins at python.org
Wed Aug 3 15:54:55 CEST 2011


http://hg.python.org/cpython/rev/e8a53f4643ce
changeset: 71736:e8a53f4643ce
parent: 71735:8e39ae75a639
parent: 71733:60353231df0c
user: Benjamin Peterson <benjamin at python.org>
date: Wed Aug 03 08:54:44 2011 -0500
summary:
 merge heads
files:
 Lib/http/client.py | 4 ++--
 Lib/test/test_urlparse.py | 2 ++
 Lib/urllib/parse.py | 3 ++-
 Misc/NEWS | 3 +++
 4 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/Lib/http/client.py b/Lib/http/client.py
--- a/Lib/http/client.py
+++ b/Lib/http/client.py
@@ -777,8 +777,8 @@
 for d in data:
 self.sock.sendall(d)
 else:
- raise TypeError("data should be a bytes-like object\
- or an iterable, got %r " % type(data))
+ raise TypeError("data should be a bytes-like object "
+ "or an iterable, got %r" % type(data))
 
 def _output(self, s):
 """Add a line of output to the current request buffer.
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

AltStyle によって変換されたページ (->オリジナル) /