E&S CVS Commit: PyProtocols - Adapter factories are now only called with one argument: the object to
pje at eby-sarna.com
pje at eby-sarna.com
Mon Jul 5 19:09:00 EDT 2004
Module Name: PyProtocols
Committed By: pje
Date: Mon Jul 5 23:08:08 UTC 2004
Modified Files:
PyProtocols: CHANGES.txt TODO.txt
PyProtocols/docs/ref: libprotocols.tex
PyProtocols/src/protocols: _speedups.c _speedups.pyx adapters.py api.py
classic.py generate.py interfaces.py twisted_support.py
zope_support.py
PyProtocols/src/protocols/tests: __init__.py checks.py
Log Message:
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.
To view diffs of this commit, you can use the following URL(s):
http://cvs.eby-sarna.com/PyProtocols/CHANGES.txt.diff?r1=1.14&r2=1.15
http://cvs.eby-sarna.com/PyProtocols/TODO.txt.diff?r1=1.2&r2=1.3
http://cvs.eby-sarna.com/PyProtocols/docs/ref/libprotocols.tex.diff?r1=1.42&r2=1.43
http://cvs.eby-sarna.com/PyProtocols/src/protocols/_speedups.c.diff?r1=1.9&r2=1.10
http://cvs.eby-sarna.com/PyProtocols/src/protocols/_speedups.pyx.diff?r1=1.9&r2=1.10
http://cvs.eby-sarna.com/PyProtocols/src/protocols/adapters.py.diff?r1=1.6&r2=1.7
http://cvs.eby-sarna.com/PyProtocols/src/protocols/zope_support.py.diff?r1=1.6&r2=1.7
http://cvs.eby-sarna.com/PyProtocols/src/protocols/api.py.diff?r1=1.11&r2=1.12
http://cvs.eby-sarna.com/PyProtocols/src/protocols/classic.py.diff?r1=1.16&r2=1.17
http://cvs.eby-sarna.com/PyProtocols/src/protocols/generate.py.diff?r1=1.4&r2=1.5
http://cvs.eby-sarna.com/PyProtocols/src/protocols/interfaces.py.diff?r1=1.17&r2=1.18
http://cvs.eby-sarna.com/PyProtocols/src/protocols/twisted_support.py.diff?r1=1.2&r2=1.3
http://cvs.eby-sarna.com/PyProtocols/src/protocols/tests/__init__.py.diff?r1=1.15&r2=1.16
http://cvs.eby-sarna.com/PyProtocols/src/protocols/tests/checks.py.diff?r1=1.10&r2=1.11
To generate a diff of this commit:
cvs rdiff -r1.14 -r1.15 PyProtocols/CHANGES.txt
cvs rdiff -r1.2 -r1.3 PyProtocols/TODO.txt
cvs rdiff -r1.42 -r1.43 PyProtocols/docs/ref/libprotocols.tex
cvs rdiff -r1.9 -r1.10 PyProtocols/src/protocols/_speedups.c \
PyProtocols/src/protocols/_speedups.pyx
cvs rdiff -r1.6 -r1.7 PyProtocols/src/protocols/adapters.py \
PyProtocols/src/protocols/zope_support.py
cvs rdiff -r1.11 -r1.12 PyProtocols/src/protocols/api.py
cvs rdiff -r1.16 -r1.17 PyProtocols/src/protocols/classic.py
cvs rdiff -r1.4 -r1.5 PyProtocols/src/protocols/generate.py
cvs rdiff -r1.17 -r1.18 PyProtocols/src/protocols/interfaces.py
cvs rdiff -r1.2 -r1.3 PyProtocols/src/protocols/twisted_support.py
cvs rdiff -r1.15 -r1.16 PyProtocols/src/protocols/tests/__init__.py
cvs rdiff -r1.10 -r1.11 PyProtocols/src/protocols/tests/checks.py
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
More information about the source-changes
mailing list