persistent paramiko DeprecationWarning: integer argument expected, got float on hardy

Bug #625686 reported by Vincent Ladeuil
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Medium
Vincent Ladeuil

Bug Description

For a couple of weeks, bzrlib.tests.blackbox.test_upgrade.SFTPTests.test_upgrade_url is failing on hardy:
Traceback (most recent call last):
  File "/home/babune/lib/python/testtools/runtest.py", line 144, in _run_user
    return fn(*args)
  File "/home/babune/lib/python/testtools/testcase.py", line 465, in _run_test_method
    testMethod()
  File "/home/babune/babune/slaves/hardy32.local/workspace/selftest-hardy/bzrlib/tests/blackbox/test_upgrade.py", line 213, in test_upgrade_url
    self.assertEqual('', err)
AssertionError: not equal:
a = ''
b = "/home/babune/lib/python/paramiko/message.py:226: DeprecationWarning: integer argument expected, got float\n self.packet.write(struct.pack('>I', n))\n"

Related branches

Revision history for this message
Vincent Ladeuil (vila) wrote :

This is rather puzzling as './bzr selftest -s bzrlib.tests.blackbox.test_upgrade.SFTPTests.test_upgrade_url' succeeds.

But './bzr selftest -s bzrlib.tests.blackbox --parallel=fork' fails !

Changed in bzr:
assignee: nobody → Vincent Ladeuil (vila)
importance: Undecided → Medium
status: New → Confirmed
tags: added: babune selftest
Revision history for this message
Vincent Ladeuil (vila) wrote :

Even more surprising: we already have:

# 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')

in bzrlib.transport/sftp/py...

Revision history for this message
Vincent Ladeuil (vila) wrote :

I strongly suspect an isolation problem here that is triggered by spiv's change related to the tests partitioning for parallel=fork.

As for the warning itself, it has been fixed in more recent versions of paramiko (hardy uses 1.6.4-1.1)
based on a proposal by... our own poolie ;)

Revision history for this message
Vincent Ladeuil (vila) wrote :

Bingo, via trial and error I found one combination that triggers the problem,
running the following tests with --load-list is enough to reproduce:
 bzrlib.tests.blackbox.test_selftest.TestOptions.test_subunit
 bzrlib.tests.blackbox.test_upgrade.SFTPTests.test_upgrade_url

Revision history for this message
Vincent Ladeuil (vila) wrote :

So, the root cause is that cmd_selftest calls activate_deprecation_warnings() and blackbox/test_selftest
redefine tests.selftest to test the arguments received.

Vincent Ladeuil (vila)
Changed in bzr:
status: Confirmed → In Progress
Vincent Ladeuil (vila)
Changed in bzr:
milestone: none → 2.3b1
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.