Re: cannot import name 'PersistentList'

Jean Jordaan <[email protected]>
Newsgroups gmane.comp.web.zope.zodb
Message-ID <CAJqnznDUmcUWM-fZ0EHxRueNJmnyxZ+0bQh_M=GyOLKZzPANTw@mail.gmail.com>
Try `from persistent.list import PersistentList`.
That's the way it is in `src/ZODB/tests/testPersistentList.py` (since
2003 :-) I see Guido van Rossum wrote most of that test).

On Wed, Oct 12, 2016 at 11:40 AM, Boylan, Ross <[email protected]> wrote:
> I get the error of the subject when I try to run a file that begins
> #! /usr/binpython3
> from collections import OrderedDict
> from persistent import PersistentList
> from persistent import Persistent
>
> Commenting out the "from collections" line doesn't help.
> "from persistent.persistence import PersistentList"  doesn't help.
>
> Using persistent 4.2.1 and python 3.4.  Interactively, after import persistent,
>>>> dir(persistent)
> ['CHANGED', 'GHOST', 'IPersistent', 'PURE_PYTHON', 'Persistent', 'PickleCache', 'STICKY', 'TimeStamp', 'UPTODATE', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__path__', '__spec__', '_compat', '_timestamp', 'cPersistence', 'cPickleCache', 'classImplements', 'copy_reg', 'interfaces', 'os', \
> 'simple_new', 'sys', 'timestamp']
>
> The source for persistent seems to define the class in list.py, though __init__.py doesn't mention it.
>
> Can anyone explain what's going on?
>
> Ross
>
>
> --
> You received this message because you are subscribed to the Google Groups "zodb" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
> For more options, visit https://groups.google.com/d/optout.



-- 
jean                                              . .. .... //\\\oo///\\

-- 
You received this message because you are subscribed to the Google Groups "zodb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.