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

Rutt, Benjamin Benjamin.Rutt at gs.com
Wed Jun 17 15:47:38 EDT 2009

I recently installed python-2.6.1 and then twisted-8.2.0 (outside of the
python tree).  One of my users is complaining that when he uses trial to
test some twisted programs, although his test passes, he has to stare at
a stack trace like this which mentions dropin.cache.new failing to be

$ cat foo.py

from twisted.trial import unittest

class MyTestClass(unittest.TestCase):
    def test_foobar(self):
        print 'hello, world!'
        self.failUnless(1 == 1)
$ /sw/external/twisted-8.2.0/bin/trial ./foo.py
DeprecationWarning: the md5 module is deprecated; use hashlib instead
  import os, md5, sys
DeprecationWarning: the sha module is deprecated; use the hashlib module
  import sha
SyntaxWarning: assertion is always true, perhaps remove parentheses?
  assert (oldChild.parentNode is self,
Traceback (most recent call last):
  File "/sw/external/twisted-8.2.0/lib/python/twisted/python/usage.py",
line 241, in parseOptions
  File "/sw/external/twisted-8.2.0/lib/python/twisted/scripts/trial.py",
line 293, in postOptions
    self['reporter'] = self._loadReporterByName(self['reporter'])
  File "/sw/external/twisted-8.2.0/lib/python/twisted/scripts/trial.py",
line 279, in _loadReporterByName
    for p in plugin.getPlugins(itrial.IReporter):
  File "/sw/external/twisted-8.2.0/lib/python/twisted/plugin.py", line
200, in getPlugins
    allDropins = getCache(package)
--- <exception caught here> ---
  File "/sw/external/twisted-8.2.0/lib/python/twisted/plugin.py", line
179, in getCache
"/sw/external/twisted-8.2.0/lib/python/twisted/python/filepath.py", line
623, in setContent
    f = sib.open('w')
"/sw/external/twisted-8.2.0/lib/python/twisted/python/filepath.py", line
433, in open
    return open(self.path, mode+'b')
exceptions.IOError: [Errno 30] Read-only file system:
    test_foobar ... hello, world!

Ran 1 tests in 0.023s

PASSED (successes=1)

I would consider this to be an install bug.  Evidently, trial uses
plugins, which upon reading
uto3 I find that plugins need up-to-date dropin.cache files to be built,
or else they'll be built dynamically; the latter step fails in my case
due to my site-wide install being on a read-only directory.  The docs
say "when installing or removing software which provides Twisted
plugins, the site administrator should be sure the cache is
regenerated"; however all I did was install twisted itself, not any
specific plugins.  All I did to install twisted was 'python setup.py
install --home=...' and at no later point did I ever add new plugins to
it.  Why can't the install take care of initial dropin.cache generation
for me?

I see a related issue http://twistedmatrix.com/trac/ticket/2409.

Regardless of whether ticket 2409 goes anywhere, should I raise an issue
that the install should really take care of initial dropin.cache
generation, much like python install takes care of std lib .py->.pyc

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-python/attachments/20090617/d7b81071/attachment.htm 

More information about the Twisted-Python mailing list