[ZODB-Dev] RE: RE: PersistentMapping

Tim Peters tim at zope.com
Fri Nov 18 10:32:17 EST 2005


[Thomas Lotze]
> OK. Right now I have the problem of getting the tests to pass before I
> start changing things. Doing just as README.txt says (python2.4 setup.py
> build, then python2.4 test.py) earns me waggon loads of errors which
> almost entirely seem to stem from the fact that the transaction module is
> not available. Is there a reason the module is not in build/lib.foo after
> running the setup.py build?

Things I can't guess include which version of ZODB you're trying this with,
and exactly what the errors were.  Copy+paste generally works a lot better
than English paraphrasing.  From the "build/lib.foo" part I guess you're
running on Linux.

So I tried that just now using ZODB trunk.  It failed too, but with
different symptoms than you're describing:

$ python2.4 setup.py build
...
$ python2.4 test.py -v
Running tests from build/lib.linux-i686-2.4
Traceback (most recent call last):
  File "test.py", line 40, in ?
    from zope.testing import testrunner
ImportError: No module named zope.testing
$

I never do "setup.py build" myself, so I was only mildly surprised by that.
It should probably be fixed ;-)

This worked (which is what I normally do):

$ python2.4 setup.py build_ext -i
Running tests from src
Running tests at level 1
Running unit tests:
  Running:
    ..................................................
    ..................................................
    ..................................................
...
    .................
  Ran 2317 tests with 0 failures and 0 errors in 169.318 seconds.
$

Note that things can get really confused if you _also_ have a ZODB
_installed_.  I don't:

$ python2.4
Python 2.4.2 (#1, Nov  2 2005, 19:41:44)
[GCC 3.3.2 20031022 (Red Hat Linux 3.3.2-1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import ZODB
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
ImportError: No module named ZODB
>>>


>> If you count this as a new feature, it should only go in on the ZODB
>> trunk. If you count this is a bugfix (that's my inclination),

> And mine.

Good!

>> then it should also go in:
>>
>>     ZODB/branches/3.4
>>     ZODB/branches/3.5
>>     ZODB/branches/3.6

> An almost disencouraging number of branches ;o)

It should also go in the Zope-2_7-branch branch of CVS module ZODB3 (which
will eventually become ZODB 3.2.11, for use in the Zope 2.7 line).

>> Since the database root object under all ZODBs is of type
>> PersistentMapping, and "everyone knows that", at this point I'd prefer
>> to deprecate PersistentDict (under the sensible theory that there was
>> never a real reason for it to exist in the ZODB 3 line).

> +1

I don't know what +1 means on other lists, but on this list it means "that's
such a good idea I'm going to devote my life to implementing it, and I
promise to finish it before this time next week" -- thanks ;-)




More information about the ZODB-Dev mailing list