[ZODB-Dev] Some tests do not pass load's version parameter

Jim Fulton jim at zope.com
Mon Dec 13 13:56:06 EST 2010


On Mon, Dec 13, 2010 at 4:11 AM, Vincent Pelletier <vincent at nexedi.com> wrote:
> Hi.
>
> Reading ZODB.interface, I realised the "version" parameter is defined as
> mandatory:
>
> class IStorage(Interface):
>   [...]
>    def load(oid, version):
>
> But some tests do not pass this parameter:
>
> $ grep "\.load([^,]*)" *.py
> BasicStorage.py:        tid3 = self._storage.load(oid)[1]
> BasicStorage.py:        self.assert_(tid3 >
> self._storage.load('\0\0\0\0\0\0\0\xf3')[1])
> BasicStorage.py:            tid4 = self._storage.load(oid)[1]
> BasicStorage.py:            self.assert_(tid4 >
> self._storage.load('\0\0\0\0\0\0\0\xf4')[1])
> [...]
>
> I didn't review other matches, and my quick regex ignores word-wrapped lines.
>
> I think either should be fixed, but I'm not sure which (I tend to think
> interface should be fixed).

We should probably change the interface. I didn't want to do that
because that would require changes to existing storages.
For better or worse, I made another required storage change
lately to add the checkCurrentSerialInTransaction method, and I
should have cleaned these up at the same time.

Jim

-- 
Jim Fulton


More information about the ZODB-Dev mailing list