[Twisted-Python] Dropin.cache errors after clean install of twisted-8.2.0

glyph at divmod.com glyph at divmod.com
Thu Jun 18 01:18:36 EDT 2009

On 17 Jun, 07:47 pm, benjamin.rutt at gs.com wrote:
>I recently installed python-2.6.1 and then twisted-8.2.0 (outside of 
>python tree).  One of my users is complaining that when he uses trial 
>test some twisted programs, although his test passes, he has to stare 
>a stack trace like this which mentions dropin.cache.new failing to be

How did you install Twisted?  What distribution are you using?
>I would consider this to be an install bug.  Evidently, trial uses
>plugins, (...)

I would also consider this to be an installer bug.
>Regardless of whether ticket 2409 goes anywhere, should I raise an 
>that the install should really take care of initial dropin.cache
>generation, much like python install takes care of std lib .py->.pyc

No need to open a new ticket.  Here's the one you're looking for:


It would be very helpful if you would add a patch for this ticket, 
though; I'll go so far as to personally volunteer to review it until 
it's done if you do.

However, that ticket is somewhat anemic in its description of the 
problem.  Please be aware that distutils doesn't support post-install 
hooks in a general way (it leaves things up to the various 'bdist_' 
plugins), so it's hard to do this in a way which is unambiguously 
correct.  For example, the way post-installation scripts are specified 
to bdist_wininst, bdist_rpm, and bdist_msi are all subtly different. 
Also, the debian and redhat packages for twisted use 'setup.py install' 
but install to a different root, and then have their own custom post- 
installation hooks.  I'm sure that other packages (gentoo, for example) 
probably invoke setup.py as well, in slightly different ways.  bdist_egg 
doesn't allow for post-installation hooks *at all*, as you can see from 
<http://bugs.python.org/setuptools/issue41>.  So something that modified 
the behavior of setup.py install would have to carefully encapsulate its 
post-install hook and only invoke it if appropriate.

If you manage to circumnavigate all this nonsense and produce a nice, 
simple post-install hook with some unit tests, you will be a Twisted 
hero :).

More information about the Twisted-Python mailing list