bob at redivi.com
Thu Feb 26 14:43:19 EST 2004
On Feb 26, 2004, at 2:16 PM, James Y Knight wrote:
> On Feb 26, 2004, at 12:19 PM, Christopher Armstrong wrote:
>> Glyph Lefkowitz wrote:
>>> I think James makes a compelling argument: if NewReality was the only
>>> thing stopping this fix from going through, forget about it.
>>> But still, make sure that the first version that changes this
>>> bumps at least a minor version number - a major reason I've been
>>> of changes like this is that folks expect micro-versions to behave
>>> _exactly_ the same.
>> Cool! Sounds like a good idea. It just means 1.3 might be sooner than
>> later :-)
> Anothing few things:
> - Does getRegistry's context.get(AdapterRegistry, theAdapterRegistry)
> actually have a use? It seems like it might just be slowing down the
> process without any gain.
> - Why hasn't AdapterRegistry.getAdapterClassWithInheritance been
> deprecated yet? Is it because Componentized.locateAdapterClass calls
> it? But then, why does Componentized.locateAdapterClass exist.
> - What's Adapter.isuper? Yes it forwards itself but what *IS* it?
> - The persist argument is kind of strange. It's a tristate with 3
> options: persist=None means lookup in the persistence table but don't
> add the newly created adapter to the table if one wasn't found,
> persist=False means don't lookup and don't add, and persist=True means
> lookup and add if necessary. Is that complication actually necessary?
> Also it doesn't seem to be documented.
How about just migrating off of t.p.components and switching to
PyProtocols? The license is compatible, it has PEP-backing, it is a
superset of what t.p.components does, has optional Pyrex acceleration,
and is compatible with Interfaces from itself, t.p.components, and
zope.components. The default Interface implementation does not support
the __call__ adaptation that we all know and love, but it is actually
generic enough to allow it.
As a side note, PEAK's peak.util.imports.whenImported hooks,
importString, and lazyModule might also be pretty useful to Twisted
(among so many other things).
More information about the Twisted-Python