On 16/11/10 04:30, Dan Stromberg wrote:

> BTW, it might cause confusion down the road to call something that is
> basically like cpython's bsddb (Berkeley DB) by the name "dbm" in pypy's
> library.  In the cpython standard library, "dbm" is an interface to ndbm
> databases.  These all provide the same dictionary-like interface to Python
> programs, but have somewhat different API's to C, and pretty different,
> incompatible on-disk representations.

Hi Dan,
I played a bit (veeeery quickly) with dbm on both pypy and cpython, and I'm 
not sure I get what you mean when you say that our dbm.py is equivalent to 
cpython's bsddb. E.g., I can create a db on cpython and open it from pypy, so 
it seems that the two modules are compatible.

Moreover, I checked which libraries the links to. On CPython, it links to 
libdb-4.8.so:

viper2 ~ $ ldd /usr/lib/python2.6/lib-dynload/dbm.so
         linux-gate.so.1 =>  (0x00884000)
         libdb-4.8.so => /usr/lib/libdb-4.8.so (0x00110000)
         libpthread.so.0 => /lib/libpthread.so.0 (0x003de000)
         libc.so.6 => /lib/libc.so.6 (0x003f8000)
         /lib/ld-linux.so.2 (0x002e0000)

the pypy version first tries to open libdb.so, then libdb-4.5.so. I had to 
manually modify it to open version 4.8 (I agree that we should find a more 
general way to find it), but apart from that what I can see is that it uses 
the same underlying wrapper as CPython.

So, to summarise: could you elaborate a bit more why we should delete dbm.py 
from pypy?

ciao,
Anto
_______________________________________________
pypy-dev@codespeak.net
http://codespeak.net/mailman/listinfo/pypy-dev

Reply via email to