[tahoe-lafs-trac-stream] [tahoe-lafs] #1537: fix some Interface violations
tahoe-lafs
trac at tahoe-lafs.org
Mon Sep 19 14:52:13 PDT 2011
#1537: fix some Interface violations
--------------------+---------------------------
Reporter: warner | Owner: somebody
Type: defect | Status: new
Priority: minor | Milestone: undecided
Component: code | Version: 1.9.0a1
Keywords: | Launchpad Bug:
--------------------+---------------------------
David-Sarah ran a script (in #1474) and found a list of places where
classes that claim to implement some Interface don't in fact do it
correctly. Here's the list and a quick note about what I think should be
done about each:
* foolscap.slicer.!BaseUnslicer does not correctly implement
foolscap.tokens.IUnslicer: The 'where' method was not provided.
* ISTR !BaseUnslicer.where is purely abstract, meant to be overridden
by subclasses. Not sure if that makes it easier to remove the
IUnslicer annotation from !BaseUnslicer (and add it to all
subclasses, which is kinda verbose), or to add a dummy method to
!BaseUnslicer (which throws !NotImplementedError if ever called, and
maybe a tiny test to keep that line of code exercised so the coverage
metrics don't drop :)
* foolscap.slicers.root.!RootSlicer does not correctly implement
foolscap.tokens.ISlicer: The implementation of slice violates its
contract because implementation doesn't allow enough arguments.
* I think (but not sure) !RootSlicer.slice is never called.. it should
probably be modified to match signatures with tokens.ISlicer and also
throw an error if ever called, just to be sure
* foolscap.referenceable.Referenceable does not correctly implement
foolscap.ipb.IRemotelyCallable: The 'getInterfaceNames' method was not
provided.
* getInterfaceNames() looks like it's misspelled in ipb.py (should be
singular, not plural)
* foolscap.referenceable.!RemoteReferenceOnly does not correctly
implement foolscap.ipb.IRemoteReference: The 'callRemoteOnly' method
was not provided. The 'callRemote' method was not provided.
* IRemoteReference should be split, or moved: !RemoteReferenceOnly
isn't supposed to have callRemote/callRemoteOnly
* allmydata.codec.CRSEncoder does not correctly implement
allmydata.interfaces.ICodecEncoder: The 'encode_proposal' method was
not provided.
* allmydata.immutable.encode.Encoder does not correctly implement
allmydata.interfaces.IEncoder: The 'set_params' method was not
provided. The 'set_size' method was not provided.
* IEncoder should probably be split into two interfaces (one for
CRSEncoder with set_params/set_size, the rest for the higher-level
encode.Encoder)
* allmydata.immutable.offloaded.!LocalCiphertextReader does not
correctly implement allmydata.interfaces.IEncryptedUploadable: The
'set_upload_status' method was not provided.
* should probably be implemented
* allmydata.immutable.literal.!LiteralProducer does not correctly
implement twisted.internet.interfaces.IPushProducer: The
'pauseProducing' method was not provided.
* should be implemented
--
Ticket URL: <http://tahoe-lafs.org/trac/tahoe-lafs/ticket/1537>
tahoe-lafs <http://tahoe-lafs.org>
secure decentralized storage
More information about the tahoe-lafs-trac-stream
mailing list