[ZODB-Dev] RFC: Python2 - Py3k database compatibility

Tres Seaver tseaver at palladion.com
Fri Apr 26 21:34:15 UTC 2013


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 04/16/2013 04:38 PM, Tres Seaver wrote:

> - ``zodbpickle`` should provide a new ``binary`` type which Python2 
> applications can begin using to signal that attributes should be 
> unpickled in Py3k as ``bytes``.  See: 
> https://github.com/zopefoundation/zodbpickle/tree/py2_explicit_bytes
> 
> - ``zodbpickle`` should provide a pickler/unpickler for use by Python2
> clients who operate against converted storages (replace_py2_cpickle_).
> See: 
> https://github.com/zopefoundation/zodbpickle/tree/py2_explicit_bytes
> 
> - ``zodbpickle`` should provide a pickler/unpickler for use by Py3k
> clients who operate against unconverted storages 
> (replace_py3k_pickle_). See: 
> https://github.com/zopefoundation/zodbpickle


I have pushed a new branch, 'merge_py2_py3k', which basically holds the
existing Py3k forks (from master) alongside the Pyton-2 forks (from
'py2_explicit_bytes'):

 https://github.com/zopefoundation/zodbpickle/tree/merge_py2_py3k

After thrashing and failing in my attempt to have the Python code
straddle, I instead have separate versions (based on Python 2.7 and 3.2),
and a unifying 'zodbpickle.pickle' module which pulls in the standard API
from the appropriate module.  This solution is ugly, but it does allow
for running tests cleanly on each supported version of Python.  It also
minimized the extent of patching for each fork (the straddled version I
discarded was a franken-module by comparison).

I would like to merge this branch to master early next week and make a
release, so that we can evaluate merging the 'py3' branch of ZODB.

Thoughts?  Note that I have not yet addressed the portions of my proposal
which deal with analyzing / converting existing databases, or with the
possibly-needed wrapper storage (for on-the-fly conversion).


Tres.
- -- 
===================================================================
Tres Seaver          +1 540-429-0999          tseaver at palladion.com
Palladion Software   "Excellence by Design"    http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with undefined - http://www.enigmail.net/

iEYEARECAAYFAlF68tcACgkQ+gerLs4ltQ4lzQCdHvsnCZ5cfZlycJ1BQw8Uct5q
CGYAnilMitegoqsVOevpPlbLcuu7bur6
=qEsj
-----END PGP SIGNATURE-----



More information about the ZODB-Dev mailing list