[Twisted-Python] dispensers for coil

Itamar Shtull-Trauring twisted at itamarst.org
Tue Apr 9 06:48:56 EDT 2002


I just took a look - config dispensers are totally broken.

The whole way they work for web coil is wrong (i.e. they are only available 
when an object is newly created, if you load in an existing tap you won't 
have dispensers.) This is because they are added only when a new object is 
first created.

The solution is scanning the whole heirarchy for dispensers when it's first 
loaded. Or rather each time a plugin is loaded.

This will probably create duplicate dispensers for each run the current way 
web stores dispensers. This can be fixed by having webcoil store, instead of 
the id(!!!!) of the method, a tuple of the configurator class, the dispenser 
name, and the instance from which the dispensers were gotten (dispensers are 
specific to an object.)

Summary:
We scan for dispensers every time a new plugin is loaded.
Add dispensers upon object creation.
Change how we store "references" to dispenser methods.
Move this functionality into coil.py where it belongs, maybe

Any comments?





More information about the Twisted-Python mailing list