[pybsddb] pybsddb 4.7.3pre1: Compatibility with Python 3.0
Jesus Cea
jcea at jcea.es
Wed Aug 13 19:14:21 CEST 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi all.
Sorry for spamming several mailing list.
After many hours of hard work, I'm proud to present a preview of pybsddb
4.7.3, able to compile and work under Python 2.3, 2.4, 2.5, 2.6b2 and 3.0b2.
You can try it out downloading it directly from my repository:
~ svn co -r 597 svn://svn.argo.es/jcea/pybsddb/trunk \
~ pybsddb-4.7.3pre1
Please, DO NOT download any other revision, since I can make changes
anytime, breaking things.
To exercise the testsuite (currently, 304 tests, if you are running the
more recent Berkeley DB release (4.7.25)), do:
~ python2.3 test.py -bv
~ python2.4 test.py -bv
~ python2.5 test.py -bv
~ python2.6 test.py -bv
~ python3.0 test.py -bv
This will compile the code and run the testsuite for each supported
python release. Of course you need to have Berkeley DB installed, better
if you have 4.6 (fully patched, the original release was very buggy) or
the last 4.7.25 release (rock solid).
You can install the code using the usual "python setup.py install".
BEWARE, nevertheless; this code is not ready for production use,
especially under Python 3.0. But, please, test your code with this
preview. Test it as hard as you can.
Current code has several ugly hacks (like some abuse of "hasattr" to
avoid selected automatic 2to3 conversion), but it works and it will be
improved in the future.
Please, report any issue, incompatibility or improvement you can see.
I plan to release pybsddb 4.7.3 in mid-september, ready to be delivered
bundled in Python 2.6/3.0 (to be released early in october).
I'll be on summer holidays, 100% offline, until early september. I will
read your comments as soon as possible. Thanks for your time!.
Homepage:
http://www.jcea.es/programacion/pybsddb.htm
http://www.jcea.es/programacion/pybsddb.htm#bsddb-4.7.3
http://www.jcea.es/programacion/pybsddb_doc/preview/
CHANGES SINCE 4.7.2:
"""
~ * "private" is a keyword in C++. (Duncan Grisby)
~ * setup.py should install "bsddb.h". (Duncan Grisby)
~ * "DB_remove" memory corruption & crash. (Duncan Grisby)
~ * Under Python 3.0, you can't use string keys/values, but
~ bytes ones. Print the right error message.
~ * "DB.has_key()" allowed transactions as a positional parameter.
~ We allow, now, transactions as a keyword parameter also, as
~ documented.
~ * Correct "DB.associate()" parameter order in the documentation.
~ * "DB.append()" recognizes "txn" both as a positional and a
~ keyword parameter.
~ * Small fix in "dbshelve" for compatibility with Python 3.0.
~ * A lot of changes in "dbtables" for compatibility with Python 3.0.
~ * Huge work making the testsuite compatible with Python 3.0.
~ * In some cases the C module returned Unicode strings under
~ Python 3.0. It should return "bytes", ALWAYS. Solved.
"""
NOTES ABOUT PYTHON 3.0:
The most visible change in Python 3.0, related to this library, is that
Python 2.x strings are replaced by unicode strings and "bytes" objects.
Under Python 3.0, pybsddb always consumes and produces "bytes" objects.
Unicode strings are rejected.
To easy testsuite porting, I've defined some minimal proxy/adapter
objects to facade unicode strings from/to "bytes". So, current testsuite
works for every supported python release, with the minimal conditional
code. These adapter objects ARE NOT INTENTED to be used in production.
If you are developing for Python 3.0, just use the right approach: use
the native "bytes" objects.
- --
Jesus Cea Avion _/_/ _/_/_/ _/_/_/
jcea at jcea.es - http://www.jcea.es/ _/_/ _/_/ _/_/ _/_/ _/_/
jabber / xmpp:jcea at jabber.org _/_/ _/_/ _/_/_/_/_/
. _/_/ _/_/ _/_/ _/_/ _/_/
"Things are not so easy" _/_/ _/_/ _/_/ _/_/ _/_/ _/_/
"My name is Dump, Core Dump" _/_/_/ _/_/_/ _/_/ _/_/
"El amor es poner tu felicidad en la felicidad de otro" - Leibniz
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iQCVAwUBSKMWY5lgi5GaxT1NAQL64gP/flHcMi3PIMuy2iiMZftYZ9GLVFLztxxD
FZBivMJj/n3+B6tQ4PK9FZwYvelE4lgTPuC/Lv94SJi8xW3CxtLyjoUcj7Pobf3t
8cV6jXdcczQbYa8/4+kptQyHhr/lNnQD9vZ7Do1+D8Zdoz/vUM6yXKoKQnAiDcfQ
0qmlY+15SgA=
=RNRk
-----END PGP SIGNATURE-----
More information about the pybsddb
mailing list