E&S CVS Commit: PyProtocols - Implement Twisted-style 'IFoo(ob)' as shorthand for 'adapt(ob,IFoo)'. As

Ulrich Eck ueck at net-labs.de
Sun May 30 16:58:01 EDT 2004


the latest checkout used with debian/python2.3 produces the following 
error when running "peak test":

vdrserver:/data/develop/PEAK# peak test
Traceback (most recent call last):
  File "/usr/bin/peak", line 3, in ?
    from peak.running import commands
  File "/usr/lib/python2.3/site-packages/peak/running/commands.py", line
3, in ?
    from peak.api import *
  File "/usr/lib/python2.3/site-packages/peak/api/__init__.py", line 30,
in ?
    from peak.core import *
  File "/usr/lib/python2.3/site-packages/peak/core.py", line 32, in ?
    import protocols
  File "/usr/lib/python2.3/site-packages/protocols/__init__.py", line 3,
in ?
    from api import *
  File "/usr/lib/python2.3/site-packages/protocols/api.py", line 17, in
?
    from interfaces import IOpenProtocol, IOpenProvider,
IOpenImplementor
  File "/usr/lib/python2.3/site-packages/protocols/interfaces.py", line
247, in ?
    class InterfaceClass(AbstractBaseMeta):
  File "/usr/lib/python2.3/site-packages/protocols/interfaces.py", line
255, in InterfaceClass
    __call__ = Protocol.__call__
TypeError: issubclass() arg 2 must be a class or tuple of classes


commenting out the import of the Speedup let the unit-tests
pass.

cheers
Ulrich

Am So, den 30.05.2004 schrieb pje at eby-sarna.com um 06:59:
> Module Name:	PyProtocols
> Committed By:	pje
> Date:		Sun May 30 04:59:29 UTC 2004
> 
> Modified Files:
> 	PyProtocols: CHANGES.txt
> 	PyProtocols/docs/ref: libprotocols.tex
> 	PyProtocols/src/protocols: _speedups.c _speedups.pyx interfaces.py
> 	PyProtocols/src/protocols/tests: __init__.py checks.py
> 
> Log Message:
> Implement Twisted-style 'IFoo(ob)' as shorthand for 'adapt(ob,IFoo)'.  As
> a result, there's now an 'AbstractBase' you can subclass instead of
> 'Interface', if you need the old behavior.  See CHANGES.txt and the updated
> docs for the full lowdown.  (Note that *all* 'Protocol' subclasses other
> than 'AbstractBase' now do this, not just 'Interface'.)  Note that this
> change will break 'peak.util.fmtparse' (at least), so I'm going to go fix
> that next.
> 
> 
> To view diffs of this commit, you can use the following URL(s):
> http://cvs.eby-sarna.com/PyProtocols/CHANGES.txt.diff?r1=1.10&r2=1.11
> http://cvs.eby-sarna.com/PyProtocols/docs/ref/libprotocols.tex.diff?r1=1.37&r2=1.38
> http://cvs.eby-sarna.com/PyProtocols/src/protocols/_speedups.c.diff?r1=1.5&r2=1.6
> http://cvs.eby-sarna.com/PyProtocols/src/protocols/_speedups.pyx.diff?r1=1.5&r2=1.6
> http://cvs.eby-sarna.com/PyProtocols/src/protocols/interfaces.py.diff?r1=1.14&r2=1.15
> http://cvs.eby-sarna.com/PyProtocols/src/protocols/tests/__init__.py.diff?r1=1.12&r2=1.13
> http://cvs.eby-sarna.com/PyProtocols/src/protocols/tests/checks.py.diff?r1=1.9&r2=1.10
> 
> To generate a diff of this commit:
> cvs rdiff -r1.10 -r1.11 PyProtocols/CHANGES.txt
> cvs rdiff -r1.37 -r1.38 PyProtocols/docs/ref/libprotocols.tex
> cvs rdiff -r1.5 -r1.6 PyProtocols/src/protocols/_speedups.c \
>     PyProtocols/src/protocols/_speedups.pyx
> cvs rdiff -r1.14 -r1.15 PyProtocols/src/protocols/interfaces.py
> cvs rdiff -r1.12 -r1.13 PyProtocols/src/protocols/tests/__init__.py
> cvs rdiff -r1.9 -r1.10 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