Rev 2714: Suppress paramiko warning in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Thu Aug 16 09:16:34 BST 2007


At file:///home/pqm/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 2714
revision-id: pqm at pqm.ubuntu.com-20070816081628-m60gvacfft5dw7wj
parent: pqm at pqm.ubuntu.com-20070816055011-tnjdmdi948uyvz6a
parent: mbp at sourcefrog.net-20070816064312-bnv2krf6xntvf3td
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Thu 2007-08-16 09:16:28 +0100
message:
  Suppress paramiko warning
modified:
  NEWS                           NEWS-20050323055033-4e00b5db738777ff
  bzrlib/transport/sftp.py       sftp.py-20051019050329-ab48ce71b7e32dfe
    ------------------------------------------------------------
    revno: 2711.1.2
    merged: mbp at sourcefrog.net-20070816064312-bnv2krf6xntvf3td
    parent: mbp at sourcefrog.net-20070816060128-euhskh2c3g8bolqx
    parent: pqm at pqm.ubuntu.com-20070816055011-tnjdmdi948uyvz6a
    committer: Martin Pool <mbp at sourcefrog.net>
    branch nick: paramiko-warning
    timestamp: Thu 2007-08-16 16:43:12 +1000
    message:
      merge trunk
    ------------------------------------------------------------
    revno: 2711.1.1
    merged: mbp at sourcefrog.net-20070816060128-euhskh2c3g8bolqx
    parent: pqm at pqm.ubuntu.com-20070816031716-d03a5nwezxb96z0c
    committer: Martin Pool <mbp at sourcefrog.net>
    branch nick: paramiko-warning
    timestamp: Thu 2007-08-16 16:01:28 +1000
    message:
      Suppress warning about Paramiko use of struct.pack
=== modified file 'NEWS'
--- a/NEWS	2007-08-16 01:04:10 +0000
+++ b/NEWS	2007-08-16 06:43:12 +0000
@@ -5,6 +5,11 @@
     * New option ``--author`` in ``bzr commit`` to specify the author of the
       change, if it's different from the committer.  (Lukáš Lalinský)
 
+  BUG FIXES:
+
+    * Suppress warning "integer argument expected, got float" from Paramiko,
+      which sometimes caused false test failures.  (Martin Pool)
+
   IMPROVEMENTS:
 
     * ``pull`` and ``merge`` are much faster at installing bundle format 4.

=== modified file 'bzrlib/transport/sftp.py'
--- a/bzrlib/transport/sftp.py	2007-08-15 04:56:08 +0000
+++ b/bzrlib/transport/sftp.py	2007-08-16 06:43:12 +0000
@@ -34,6 +34,7 @@
 import time
 import urllib
 import urlparse
+import warnings
 
 from bzrlib import (
     errors,
@@ -60,6 +61,19 @@
     ConnectedTransport,
     )
 
+# Disable one particular warning that comes from paramiko in Python2.5; if
+# this is emitted at the wrong time it tends to cause spurious test failures
+# or at least noise in the test case::
+#
+# [1770/7639 in 86s, 1 known failures, 50 skipped, 2 missing features]
+# test_permissions.TestSftpPermissions.test_new_files
+# /var/lib/python-support/python2.5/paramiko/message.py:226: DeprecationWarning: integer argument expected, got float
+#  self.packet.write(struct.pack('>I', n))
+warnings.filterwarnings('ignore',
+        'integer argument expected, got float',
+        category=DeprecationWarning,
+        module='paramiko.message')
+
 try:
     import paramiko
 except ImportError, e:




More information about the bazaar-commits mailing list