Ticket #582 (closed defect: fixed)

Opened 13 months ago

Last modified 13 months ago

UploadDirectory tests fail on python 2.3 since tarfile.extractall is not available

Reported by: dbailey Owned by: warner
Priority: critical Milestone: 0.7.11
Version: 0.7.10 Keywords:
Cc:

Description

Following test fail on python 2.3

buildbot.test.test_transfer.UploadDirectory.testBigFile
buildbot.test.test_transfer.UploadDirectory.testManyDirsManyFiles
buildbot.test.test_transfer.UploadDirectory.testManyEmptyDirs
buildbot.test.test_transfer.UploadDirectory.testOneDirManyFiles
buildbot.test.test_transfer.UploadDirectory.testOneDirOneFile
buildbot.test.test_transfer.UploadDirectory.testOneEmptyDir
buildbot.test.test_transfer.UploadDirectory.testSuccess

all with the same error

  File "/build/user/darragh/rpmbuild/BUILD/djmitche-buildbot-4066acfdd6477e59b00767c1c5607e4666e15d6d/buildbot/steps/transfer.py", line 90, in remote_unpack
    archive.extractall(path=self.destroot)
exceptions.AttributeError: 'TarFile' object has no attribute 'extractall'

Problem is that Tarfile.extractall was only added since python 2.5 according to the python documentation
 http://docs.python.org/library/tarfile.html

Attachments

patch Download (1.8 KB) - added by stefan 13 months ago.
This patch fixes the test failures by injecting an extractall method into TarFile? if not already present.

Change History

Changed 13 months ago by dustin

  • priority changed from major to critical
  • milestone changed from undecided to 0.7.11

ok, this will definitely block the release. Let me know when the fix is ready.

Changed 13 months ago by stefan

OK, I can try to look into that. My plan is add the missing 'extractall' function inside buildbot, if it's not already part of the TarFile? object. Is there an easy way to run the testsuite with a non-default python version ? Or do I need to install Twisted for that python version first (to have a python-specific 'trial' script ?)

Thanks,

Changed 13 months ago by dustin

If you install another version of Python, depending on your packaging system you should see a "python2.3" executable. I think you can run trial via that executable with

/usr/bin/python2.3 /usr/bin/trial ...

Changed 13 months ago by stefan

No, that doesn't work, unfortunately, as that Python version doesn't have any twisted packages installed. (I could set the PYTHONPATH, but I'm afraid there are slight binary incompatibilities.) I'll install twisted for python2.3.

Thanks,

Changed 13 months ago by stefan

This patch fixes the test failures by injecting an extractall method into TarFile? if not already present.

Changed 13 months ago by dustin

  • status changed from new to closed
  • resolution set to fixed

merged -- thanks!

Note: See TracTickets for help on using tickets.