On Fri, 13 Jan 2012 08:59:27 -0500
"Edward K. Ream" <[email protected]> wrote:

> >> > There's a lot of discussion on the web about this, but I can't find a 
> >> > solution.  
> 
> Terry, can you summarize where we are with this?  Is this a gotcha for
> Leo's file format?

Tried a couple of times on python IRC to get people to look at the
short test case file (attached to this thread a couple of times), but
no luck (as in no response).

Maybe you and Ville and anyone else who feels like taking a look could
see if I'm just doing something dumb.

I don't know if I'm (and Leo's load code is) just not feeding the data
into pickle.loads correctly, or if there's something wrong with the
string / unicode / bytes handling.  Or if there's an actual deficiency
in Python's ability to unpickle in 3.x things pickled in 2.x.  You'd
think fix_imports=True would be enough to deal with changed module
paths in 3.x, and anyway, datetime.datetime hasn't moved.

Leo file format wise it strongly supports the idea that json is
preferable to pickle, although datetime.datetime isn't json
serializable, so it's no silver bullet.

So you can't import todo.py plugin data into 3.x from 2.x.  A last
resort fix would be teaching todo.py to support and silently migrate to
a new format which doesn't use datetime to store dates, so that todo
data loaded and saved in a sufficiently recent version of Leo using
2.x would be loadable in 3.x, but that's a pain.

Cheers -Terry

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en.

Reply via email to