@@ -4,6 +4,9 @@
* Fix the build on Windows. (Pascal Quantin)
+ * Fix get_transport_and_path compatibility with pre-2.6.5 versions of Python.
+ (Max Bowsher, #707438)
+
0.7.0 2011-01-21
FEATURES
@@ -41,6 +41,12 @@ from dulwich.pack import (
)
+# Python 2.6.6 included these in urlparse.uses_netloc upstream. Do
+# monkeypatching to enable similar behaviour in earlier Pythons:
+for scheme in ('git', 'git+ssh'):
+ if scheme not in urlparse.uses_netloc:
+ urlparse.uses_netloc.append(scheme)
def _fileno_can_read(fileno):
"""Check if a file descriptor is readable."""
return len(select.select([fileno], [], [], 0)[0]) > 0
@@ -125,7 +125,9 @@ class GitClientTests(TestCase):
self.assertEquals('foo.bar/baz', path)
def test_get_transport_and_path_error(self):
- self.assertRaises(ValueError, get_transport_and_path, 'foo://bar/baz')
+ # Need to use a known urlparse.uses_netloc URL scheme to get the
+ # expected parsing of the URL on Python versions less than 2.6.5
+ self.assertRaises(ValueError, get_transport_and_path, 'prospero://bar/baz')
class SSHGitClientTests(TestCase):