[Subversion] / PyProtocols / TODO.txt |
No default branch
Bookmark a link to HEAD:
(view)
(download)
Fix typos, and update TODO for PyProtocols 1.0 impl. and docs.
Implement some of the changes that were planned for 1.0; cleanup TODO, CHANGES, UPGRADING, and manual for current '1.0a0' CVS version status.
Refactor a portion of the predicate dispatch machinery so that dispatch functions can request a new key be added to a dispatch node, thus allowing a fix for a problem with multiple inheritance. Using MRO order is a fine optimization for adapter lookups, but it's not the right thing for dispatch nodes. Instead, we now walk '__bases__', but only so long as there is a single base. The moment we hit a class with more than one base, we force a specific (but slower) calculation of the dispatch subtree for that class. (Of course, it's then cached so future lookups for that class and its subclasses won't need to repeat the recalculation.)
Backport useful fixes from the 0.9.x branch to the trunk
Adapter factories are now only called with one argument: the object to adapt. For backward compatibility, any adapter factories that require more than one argument are wrapped in a converter. It's highly recommended that you transition to one-argument adapters as soon as practical, since using two-argument adapters will cause deprecation warnings in PyProtocols version 1.0 (and causes PendingDeprecationWarnings in 0.9.3). This change was made for symmetry with Zope and Twisted adapters, as well as Pythonic adapter factories like 'int' et al. (Note that as a result of this change, 'Adapter' objects no longer have a 'protocol' attribute, and 'StickyAdapter' objects will also lose their 'protocol' attribute in 1.0.) Also, I restored the previously-removed 'factory' argument to 'adapt()', but it generates a DeprecationWarning if you use it. Thus, programs written for PyProtocols 0.9.2 that use this argument will keep working until version 1.0, making the 'protocol' attribute the only bit that's not 100% backward compatible.
Removed 'factory' parameter from the 'adapt()' function, bringing us more in line with PEP 246, and preparing for the removal of the second parameter of adapter factories.
Added 'protocols.AdaptationFailure' exception. Added 'TODO.txt'.
cvs-admin@eby-sarna.com Powered by ViewCVS 1.0-dev |
ViewCVS and CVS Help |