tags 750517 + pending thanks Dear maintainer,
I've prepared an NMU for paramiko (versioned as 1.14.0-2.1) and uploaded it to DELAYED/10. Please feel free to tell me if I should delay it longer. Kind regards, Jelmer Vernooij
diff -Nru paramiko-1.14.0/debian/changelog paramiko-1.14.0/debian/changelog --- paramiko-1.14.0/debian/changelog 2014-05-28 03:30:16.000000000 +0200 +++ paramiko-1.14.0/debian/changelog 2014-07-06 00:21:14.000000000 +0200 @@ -1,3 +1,11 @@ +paramiko (1.14.0-2.1) unstable; urgency=medium + + * Non-maintainer upload. + * Add patch 01_fix_buffer_argument, allowing buffer() objects to be + passed in where bytestrings are supported. Closes: #750517 + + -- Jelmer Vernooij <jel...@debian.org> Sat, 05 Jul 2014 23:57:15 +0200 + paramiko (1.14.0-2) unstable; urgency=low * Add extend-diff-ignore to debian/source/options. diff -Nru paramiko-1.14.0/debian/patches/01_fix_buffer_argument paramiko-1.14.0/debian/patches/01_fix_buffer_argument --- paramiko-1.14.0/debian/patches/01_fix_buffer_argument 1970-01-01 01:00:00.000000000 +0100 +++ paramiko-1.14.0/debian/patches/01_fix_buffer_argument 2014-07-05 23:56:27.000000000 +0200 @@ -0,0 +1,47 @@ +Author: Jelmer Vernooij <jel...@samba.org> +Description: Support passing in "buffer" objects again where bytestrings are expected. +Debian-Bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=750517 +Status: merge proposal created for upstream +Bug: https://github.com/paramiko/paramiko/issues/343 + +diff --git a/paramiko/py3compat.py b/paramiko/py3compat.py +index 8842b98..57c096b 100644 +--- a/paramiko/py3compat.py ++++ b/paramiko/py3compat.py +@@ -39,6 +39,8 @@ if PY2: + return s + elif isinstance(s, unicode): + return s.encode(encoding) ++ elif isinstance(s, buffer): ++ return s + else: + raise TypeError("Expected unicode or bytes, got %r" % s) + +@@ -49,6 +51,8 @@ if PY2: + return s.decode(encoding) + elif isinstance(s, unicode): + return s ++ elif isinstance(s, buffer): ++ return s.decode(encoding) + else: + raise TypeError("Expected unicode or bytes, got %r" % s) + +diff --git a/tests/test_file.py b/tests/test_file.py +index c6edd7a..cd9cd54 100755 +--- a/tests/test_file.py ++++ b/tests/test_file.py +@@ -151,6 +151,14 @@ class BufferedFileTest (unittest.TestCase): + b'need to close them again.\n') + f.close() + ++ def test_8_buffering(self): ++ """ ++ verify that buffered objects can be written ++ """ ++ f = LoopbackFile('r+', 16) ++ f.write(buffer(b'Too small.')) ++ f.close() ++ + if __name__ == '__main__': + from unittest import main + main() diff -Nru paramiko-1.14.0/debian/patches/series paramiko-1.14.0/debian/patches/series --- paramiko-1.14.0/debian/patches/series 1970-01-01 01:00:00.000000000 +0100 +++ paramiko-1.14.0/debian/patches/series 2014-07-05 23:55:14.000000000 +0200 @@ -0,0 +1 @@ +01_fix_buffer_argument
signature.asc
Description: Digital signature