regression from python 2.6.2 and from upstream python 2.6.4 in distutils (?)

Bug #452774 reported by Zooko Wilcox-O'Hearn
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Tahoe-LAFS
Invalid
Unknown
python-defaults (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

This unit test is running with python 2.6.2:

http://allmydata.org/buildbot/builders/Zooko%20jaunty%20amd64%20yukyuk/builds/233

click on "show-tool-versions" for more information about what version of Python it is. It reports itself as "python: 2.6.2 (release26-maint, Apr 19 2009, 01:58:18) [GCC 4.3.3], maxunicode: 1114111". I think I got it from Ubuntu Jaunty or Ubuntu Karmic.

The tests all pass.

The next test is with python 2.6.4rc1 from today's Karmic:

http://allmydata.org/buildbot/builders/Zooko%20jaunty%20amd64%20yukyuk/builds/234

One of the tests fails. The failure seems to have something to do with pkg_resources and how it locates the contents of eggs.

The next test is with python 2.6.4rc1 from today's upstream Python SVN repo (release26-maint branch):

http://allmydata.org/buildbot/builders/Zooko%20jaunty%20amd64%20yukyuk/builds/235

All tests pass!

And finally I put back the Ubuntu version of Python -- 2.6.4~rc1-0ubuntu1 -- and ran it again and it failed again in the same way:

http://allmydata.org/buildbot/builders/Zooko%20jaunty%20amd64%20yukyuk/builds/236

I also reproduced this by running the unit tests directly on the command line (instead of through a buildbot). To reproduce it run the following three commands from your shell:

darcs get --lazy http://allmydata.org/source/tahoe/trunk
cd trunk
python ./setup.py test -s allmydata.test.test_runner.RunNode.test_client

With upstream Python 2.6.4rc1, it outputs:

allmydata.test.test_runner
  RunNode
    test_client ... [OK]

-------------------------------------------------------------------------------
Ran 1 tests in 6.990s

PASSED (successes=1)

With Ubuntu Python 2.6.4~rc1-0ubuntu1, it outputs:

allmydata.test.test_runner
  RunNode
    test_client ... [FAIL]

===============================================================================
[FAIL]: allmydata.test.test_runner.RunNode.test_client

Traceback (most recent call last):
  File "/home/zooko/t/trunk/src/allmydata/test/test_runner.py", line 370, in _cb2
    self.failUnlessEqual(rc_or_sig, 0, errstr)
twisted.trial.unittest.FailTest: rc=1, OUT: '', ERR: 'Traceback (most recent call last):
  File "/usr/local/bin/twistd", line 5, in <module>
    pkg_resources.run_script('Twisted==8.2.0', 'twistd')
  File "/home/zooko/t/trunk/support/lib/python2.6/site-packages/setuptools-0.6c12dev.egg/pkg_resources.py", line 448, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/home/zooko/t/trunk/support/lib/python2.6/site-packages/setuptools-0.6c12dev.egg/pkg_resources.py", line 1160, in run_script
    raise ResolutionError("No script named %r" % script_name)
pkg_resources.ResolutionError: No script named 'twistd'
client node probably not started
'
not equal:
a = 1
b = 0

-------------------------------------------------------------------------------
Ran 1 tests in 1.585s

FAILED (failures=1)

ProblemType: Bug
Architecture: amd64
Date: Thu Oct 15 22:30:32 2009
DistroRelease: Ubuntu 9.10
Package: python 2.6.4~rc1-0ubuntu1
PackageArchitecture: all
ProcEnviron:
 LANGUAGE=
 LC_CTYPE=en_US.UTF-8
 PATH=(custom, user)
 LANG=en_DK.UTF-8
 SHELL=/bin/bash
SourcePackage: python-defaults
Uname: Linux 2.6.31.1yukyuk33 x86_64

Revision history for this message
Zooko Wilcox-O'Hearn (zooko) wrote :
Revision history for this message
Zooko Wilcox-O'Hearn (zooko) wrote :

Okay I've investigated more and this really has nothing to do with the difference between Python 2.6.4rc1 upstream and Python 2.6.4rc1 in Ubuntu. It is just an accident that when I test with the upstream version then my build script doesn't find Twisted (because it doesn't have /usr/lib/python2.6/dist-packages in its sys.path) and therefore it automatically installs a copy of Twisted for me, and then the test passes because that copy of Twisted is installed in a place where it can be found during the test. If I use the Ubuntu version of Python then it does not install a copy of Twisted (since Twisted is already installed and /usr/lib/python2.6/dist-packages is in the sys.path), but it is installed in such a way that its 'twistd' script can't be run by the "pkg_resources.run_script()" command so the test fails.

Revision history for this message
Zooko Wilcox-O'Hearn (zooko) wrote :

Oh, because I have a broken /usr/local/bin/twistd in my PATH. Myu mistake. Sorry about that. Marking this as invalid.

Changed in python-defaults (Ubuntu):
status: New → Invalid
Changed in tahoe-lafs:
status: Unknown → Invalid
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.