[tahoe-dev] [tahoe-lafs] #1190: we can end up importing the wrong version of a dependency even though the right one is "already the active version in easy-install.pth"

tahoe-lafs trac at tahoe-lafs.org
Sat Oct 30 08:42:16 UTC 2010


#1190: we can end up importing the wrong version of a dependency even though the
right one is "already the active version in easy-install.pth"
----------------------------+-----------------------------------------------
     Reporter:  davidsarah  |       Owner:  davidsarah                                                     
         Type:  defect      |      Status:  assigned                                                       
     Priority:  major       |   Milestone:  1.8.1                                                          
    Component:  packaging   |     Version:  1.8β                                                           
   Resolution:              |    Keywords:  setuptools test forward-compatibility review-needed news-needed
Launchpad Bug:              |  
----------------------------+-----------------------------------------------

Comment (by zooko):

 Replying to [comment:33 davidsarah]:
 > We do have {{{DistributionNotFound}}} errors (e.g. [http://tahoe-
 lafs.org/buildbot/builders/Ruben%20Fedora/builds/664/steps/test-from-
 prefixdir/logs/stdio here] for twisted)

 I think this one might be a bug in Fedora:
 [https://bugzilla.redhat.com/show_bug.cgi?id=523210 Fedora issue #523210].

 You can see from [http://tahoe-
 lafs.org/buildbot/builders/Ruben%20Fedora/builds/665/steps/show-tool-
 versions/logs/stdio this step] that {{{pkg_resources.require('Twisted')}}}
 yields nothing even though {{{import twisted}}} works.

 >  and {{{ImportError}}}s (e.g. [http://tahoe-
 lafs.org/buildbot/builders/Eugen%20lenny-amd64/builds/645/steps/test-from-
 prefixdir/logs/stdio here] for nevow

 This is expected because {{{test-from-prefixdir}}} is explicitly not using
 the setuptools automatic resolution of dependencies. It disables that
 feature by passing {{{--single-version-externally-managed}}}. Since Eugen
 lenny-amd64 doesn't have Nevow installed into the system, it is expected
 to fail. Oh wait! But instead of failing by !ImportError, it ought to fail
 by !DistributionNotFound. It fails by !ImportError because {{{import
 nevow}}} is present in
 [source:trunk/src/allmydata/__init__.py?annotate=blame&rev=4687
 allmydata/__init__.py] before {{{_auto_deps.require_auto_deps()}}} is
 called.


 > and [http://tahoe-
 lafs.org/buildbot/builders/David%20A.%20OpenSolaris%20i386/builds/439/steps
 /test-from-egg/logs/stdio here] for mock),

 We need to apply a hack similar to
 [20101030034303-93fa1-0267f4ed3c9014099eb2c9b4d8e43724d7ff85e1] to the
 {{{test-from-egg}}} step in the buildmaster configuration to fix this...
 There! I've updated the buildmaster config to add eggs to the
 {{{sys.path}}} from the source base dir (the dir that has {{{setup.py}}}
 instead of the CWD and that fixed it: [http://tahoe-
 lafs.org/buildbot/builders/Zooko%20zomp%20Mac-
 amd64%2010.6%20py2.6/builds/180/steps/test-from-egg/logs/stdio test-from-
 egg step].

-- 
Ticket URL: <http://tahoe-lafs.org/trac/tahoe-lafs/ticket/1190#comment:34>
tahoe-lafs <http://tahoe-lafs.org>
secure decentralized storage


More information about the tahoe-dev mailing list