[tahoe-lafs-trac-stream] [tahoe-lafs] #1258: having Tahoe or any dependency installed in site-packages (or any other shared directory) can cause us to run or test the wrong code
tahoe-lafs
trac at tahoe-lafs.org
Mon Aug 15 15:32:01 PDT 2011
#1258: having Tahoe or any dependency installed in site-packages (or any other
shared directory) can cause us to run or test the wrong code
------------------------------------+----------------------------------
Reporter: davidsarah | Owner: davidsarah
Type: defect | Status: new
Priority: major | Milestone: eventually
Component: dev-infrastructure | Version: 1.8.0
Resolution: | Keywords: setuptools test docs
Launchpad Bug: |
------------------------------------+----------------------------------
Comment (by davidsarah):
Replying to [comment:26 davidsarah]:
> I don't know how to fix this in the general case.
To be more precise, I don't know how to do it while still using
setuptools. If we ditched setuptools then I would know how to do it (by
making sure that the dependencies are always added at the start of
{{{sys.path}}}, and/or by using a custom import hook). The amount of work
needed to replace the affected setuptools functionality shouldn't be
underestimated, though.
> How about if we establish a weaker goal: to detect at run-time whether
this has happened and raise an exception if so.
We already check that the version found by import is acceptable, except in
the case of packages that don't declare their version in an easily
inspectable manner (#1473). That isn't equivalent to checking whether this
bug has occurred, though: we can (and frequently do) import a package that
is not the version that setuptools intended to import, but that just
happens to have an acceptable version. We know which version and path
setuptools intended to import, and the original code I wrote to check for
mismatches did treat this as an error. We changed it to be a warning that
is only displayed in the situations described in comment:30, because the
error was happening too often :-(
(The ticket1306 branch, which did the more thorough check, has been
deleted from the trac, so links to it no longer work. It can still be
checked out using {{{darcs get --lazy http://tahoe-lafs.org/source/tahoe-
lafs/ticket1306}}}, though.)
--
Ticket URL: <http://tahoe-lafs.org/trac/tahoe-lafs/ticket/1258#comment:28>
tahoe-lafs <http://tahoe-lafs.org>
secure decentralized storage
More information about the tahoe-lafs-trac-stream
mailing list