[Interface-dev] Twisted port status report
Itamar Shtull-Trauring
itamar at itamarst.org
Wed Apr 28 11:32:55 EDT 2004
I think I have all Twisted tests passing. I now need to backport z.i to
2.2. First issue I noticed was sets - alternatives include storing copy
of it in zope.interface tarball and install it in 2.2, or just porting
the appropriate code and making it pickle compatible.
The other thing I'd like to discuss is persistent adapters. In Twisted,
if you do IFoo(o, persist=True), it'll keep the resulting adapter alive
so long as o is alive (using weakrefs). For the backwards compat layer I
just did that in Twisted's code (I subclass InterfaceClass and created
my own Interface using that), but it's a useful function. Not
necessarily as is, other suggestions have included having a special
attribute on adapters indicating this is wanted, or specifying it as
flag during adapter registration.
You can see the code at:
http://svn.twistedmatrix.com/cvs/trunk/sandbox/itamar/components.py?view=markup&rev=10624&root=Twisted
one interesting bit of code is Componentized and Adapter and the way
they interact. I'm not sure I really like the way they're currently
implemented.
--
Itamar Shtull-Trauring http://itamarst.org
Looking for a job -- http://itamarst.org/resume.html
More information about the Interface-dev
mailing list