[Twisted-Python] svn-reorg blocking

Christopher Armstrong radeex at gmail.com
Tue Oct 25 21:01:53 EDT 2005

I really want to get svn-reorg finished up, because lots of people
really want me to release Twisted sumo, and releasing sumo without
svn-reorg is going to be very scary. Unfortunately, there's something
blocking svn-reorg's merge: We haven't figured out a way to get the
test suite to actually run with it.

Trial, in trunk, looks for packages by traversing the filesystem. This
doesn't work with packages made up of __path__s, which is how
svn-reorg works. svn-reorg includes some changes to trial that
replaces filesystem traversal with package importing, and special
support for __path__. However, this doesn't work when a package is

Twisted has (at least) two packages which for various reasons are
unimportable depending on your environment:
twisted.internet.iocpreactor and twisted.internet.serialport. Both of
them are unimportable because their __init__.py files have code in
them, which is against the coding standard. I think glyph mentioned
elsewhere in this thread that the coding standard allows it for
current public interfaces, but it actually only allows it for the
purposes of backwards compatibility while refactoring a module into a

for iocpreactor, this is easy enough to fix: all it does in
__init__.py is "from proactor import install", which is easily
replaced with

def install(*a, **kw):
    from proactor import install
    return install(*a, **kw)

However, serialport is much more devious: 'from serialport import *'.
This then causes an error on any system that doesn't have the
third-party "serial" module installed (which is imported by
serialport.py). The best suggestion I've heard for fixing this one is
to make serialport a single module (again) that defines all the
classes conditionally, but I do think that at least as far as code
organisation is concerned, the current way the files are laid out is

Can we try to come to a conclusion about this stuff soon?

  Twisted   |  Christopher Armstrong: International Man of Twistery
   Radix    |    -- http://radix.twistedmatrix.com
            |  Release Manager, Twisted Project
  \\\V///   |    -- http://twistedmatrix.com
   |o O|    |

More information about the Twisted-Python mailing list