~ubuntu-branches/ubuntu/raring/python3.3/raring-proposed

« back to all changes in this revision

Viewing changes to debian/README.dbm

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2012-03-22 06:14:01 UTC
  • Revision ID: package-import@ubuntu.com-20120322061401-vvrgvw3nvi68rtqq
Tags: 3.3.0~a1-1
* Python 3.3.0 alpha1 release.
* Update to 20120321 from the trunk.
* Update debian/copyright.
* Build-depend on expat (>= 2.1~).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
 Python and dbm modules on Debian
 
3
 --------------------------------
 
4
 
 
5
This file documents the configuration of the dbm modules for Debian. It
 
6
gives hints at the preferred use of the dbm modules.
 
7
 
 
8
 
 
9
The preferred way to access dbm databases in Python is the anydbm module.
 
10
dbm databases behave like mappings (dictionaries).
 
11
 
 
12
Since there exist several dbm database formats, we choose the following
 
13
layout for Python on Debian:
 
14
 
 
15
  * creating a new database with anydbm will create a Berkeley DB 2.X Hash
 
16
    database file. This is the standard format used by libdb starting
 
17
    with glibc 2.1.
 
18
 
 
19
  * opening an existing database with anydbm will try to guess the format
 
20
    of the file (using whichdb) and then load it using one of the bsddb,
 
21
    bsddb1, gdbm or dbm (only if the python-gdbm package is installed)
 
22
    or dumbdbm modules.
 
23
 
 
24
  * The modules use the following database formats:
 
25
 
 
26
    - bsddb:   Berkeley DB 2.X Hash (as in libc6 >=2.1 or libdb2)
 
27
    - bsddb1:  Berkeley DB 1.85 Hash (as in libc6 >=2.1 or libdb2)
 
28
    - gdbm:    GNU dbm 1.x or ndbm
 
29
    - dbm:     " (nearly the same as the gdbm module for us)
 
30
    - dumbdbm: a hand-crafted format only used in this module
 
31
 
 
32
    That means that all usual formats should be readable with anydbm.
 
33
 
 
34
  * If you want to create a database in a format different from DB 2.X,
 
35
    you can still directly use the specified module.
 
36
 
 
37
  * I.e. bsddb is the preferred module, and DB 2.X is the preferred format.
 
38
 
 
39
  * Note that the db1hash and bsddb1 modules are Debian specific. anydbm
 
40
    and whichdb have been modified to support DB 2.X Hash files (see
 
41
    below for details).
 
42
    
 
43
 
 
44
 
 
45
For experts only:
 
46
----------------
 
47
 
 
48
Although bsddb employs the new DB 2.X format and uses the new Sleepycat
 
49
DB 2 library as included with glibc >= 2.1, it's still using the old
 
50
DB 1.85 API (which is still supported by DB 2).
 
51
 
 
52
A more recent version 1.1 of the BSD DB module (available from
 
53
http://starship.skyport.net/robind/python/) directly uses the DB 2.X API.
 
54
It has a richer set of features.
 
55
 
 
56
 
 
57
On a glibc 2.1 system, bsddb is linked with -ldb, bsddb1 is linked with
 
58
-ldb1 and gdbm as well as dbm are linked with -lgdbm.
 
59
 
 
60
On a glibc 2.0 system (e.g. potato for m68k or slink), bsddb will be
 
61
linked with -ldb2 while bsddb1 will be linked with -ldb (therefore
 
62
python-base here depends on libdb2).
 
63
 
 
64
 
 
65
db1hash and bsddb1 nearly completely identical to dbhash and bsddb. The
 
66
only difference is that bsddb is linked with the real DB 2 library, while
 
67
bsddb1 is linked with an library which provides compatibility with legacy
 
68
DB 1.85 databases.
 
69
 
 
70
 
 
71
    July 16, 1999
 
72
    Gregor Hoffleit <flight@debian.org>