<div dir="ltr">In the projects I was involved, ZODB3 3.11.a3 (not ZODB 4) has hurt more than it has helped.<div><br></div><div>In particular, the banishing of standard comparison from BTrees has made existing data break on an instance where ZODB3 was accidentally upgraded from 3.10.5 to 3.11a3 by pip 1.4 (i.e. a BTree containing a None as key, that happily worked on 3.10, failed to load, during setstate() under 3.11a3, making the data impossible to fix until I reverted ZODB3 back to 3.10, a non-trivial operation requiring manual uninstall of multiple packages: ZODB, BTrees, persistent).</div>

<div><br></div><div> Not that I disagree with the comparison change, mind you, but if ZODB3 3.11a3 never existed, and people had to explicitly install ZODB to get the new version, that would have been better overall.</div>

<div><br></div><div>Since erasing ZODB 3.11.a3 isn't really an option, I agree with the last option of not releasing a final version of ZODB3 3.11.</div><div><br></div><div>Cheers,</div><div><br></div><div>Leo</div></div>

<div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Sep 29, 2013 at 1:06 PM, Jim Fulton <span dir="ltr"><<a href="mailto:jim@zope.com" target="_blank">jim@zope.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

TimeStamps are used mainly to convert between high-level<br>
date-time representations and 8-byte binary transaction IDs.<br>
Historically, a TimeStamp's repr was used to retrieve the binary<br>
representation.  repr was used because, under the hood, slots<br>
are much faster to access than methods.<br>
<br>
In ZODB 3.3, a TimeStamp raw method was added to retrieve<br>
the binary data for a time stamp.  I wasn't actually aware of this<br>
until recently.  From an API point of view, using raw rather than<br>
repr is cleaner.  I don't know if the performance implications<br>
are significant, though probably not.<br>
<br>
In Python 3, __repr__ returns Unicode, rather than binary data,<br>
so it's no-longer possible to use it to get the binary representation<br>
of a time stamp.  TimeStamp's __repr__ was changed to<br>
return the repr of it's binary data.  Python 3 was going to have<br>
to be broken, but this was also a breaking change for Python 2.<br>
<br>
I don't remember this issue being raised earlier. If so, I missed it.<br>
<br>
In any case, going forward, it's best to embrace raw() as the correct<br>
way to get the binary representation of time stamps.  This is<br>
mainly a heads up for people porting to ZODB 4.<br>
<br>
I don't really see much value in returning the repr of the binary<br>
data.  I'd at least wrap the string in a TimeStamp call, something<br>
like "TimeStamp(b'...').<br>
<br>
I'd hoped that ZODB 4.0 would be backward compatible with<br>
ZODB3.  That's why ZODB3 3.11 is a meta package that<br>
requires the ZODB 4 packages.  Unfortunately, this means<br>
that ZODB3 3.11 isn't backward compatible.  Fortunately,<br>
ZODB 3.11.0 is still in alpha. :)<br>
<br>
I think the best option is to release what is currently<br>
ZODB3 3.11.0a3 as ZODB3 4.0.0.  This will allow<br>
packages that depend on ZODB3 to be used with<br>
ZODB 4, but it will clearly label the ZODB4 4.0.0 release<br>
as not backward compatible.<br>
<br>
Another option is to leave things as they are.<br>
Since buildout 2, and now pip, prefer final releases,<br>
existing applications that use current buildout or pip<br>
aren't broken by ZODB3 3.11a3, even if they don't<br>
pin versions.  If someone wants to mix ZODB3 and<br>
ZODB 4, they can explicitly require ZODB3 3.11a3.<br>
<br>
Thoughts?<br>
<span class="HOEnZb"><font color="#888888"><br>
Jim<br>
<br>
--<br>
Jim Fulton<br>
<a href="http://www.linkedin.com/in/jimfulton" target="_blank">http://www.linkedin.com/in/jimfulton</a><br>
_______________________________________________<br>
For more information about ZODB, see <a href="http://zodb.org/" target="_blank">http://zodb.org/</a><br>
<br>
ZODB-Dev mailing list  -  <a href="mailto:ZODB-Dev@zope.org">ZODB-Dev@zope.org</a><br>
<a href="https://mail.zope.org/mailman/listinfo/zodb-dev" target="_blank">https://mail.zope.org/mailman/listinfo/zodb-dev</a><br>
</font></span></blockquote></div><br></div>