Code

. add, vim line and cvs log key.
[roundup.git] / roundup / backends / __init__.py
1 #
2 # Copyright (c) 2001 Bizar Software Pty Ltd (http://www.bizarsoftware.com.au/)
3 # This module is free software, and you may redistribute it and/or modify
4 # under the same terms as Python, so long as this copyright message and
5 # disclaimer are retained in their original form.
6 #
7 # IN NO EVENT SHALL BIZAR SOFTWARE PTY LTD BE LIABLE TO ANY PARTY FOR
8 # DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING
9 # OUT OF THE USE OF THIS CODE, EVEN IF THE AUTHOR HAS BEEN ADVISED OF THE
10 # POSSIBILITY OF SUCH DAMAGE.
11 #
12 # BIZAR SOFTWARE PTY LTD SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
14 # FOR A PARTICULAR PURPOSE.  THE CODE PROVIDED HEREUNDER IS ON AN "AS IS"
15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
17
18 # $Id: __init__.py,v 1.11 2002-02-16 08:39:42 richard Exp $
20 __all__ = []
22 try:
23     import sys
24     if not hasattr(sys, 'version_info') or sys.version_info < (2,1,2):
25         import anydbm, dumbdbm
26         # dumbdbm only works in python 2.1.2+
27         assert anydbm._defaultmod != dumbdbm
28         del anydbm
29         del dumbdbm
30     import back_anydbm
31     anydbm = back_anydbm
32     __all__.append('anydbm')
33 except AssertionError:
34     pass
35 except ImportError:
36     pass
38 try:
39     import back_bsddb
40     bsddb = back_bsddb
41     __all__.append('bsddb')
42 except ImportError:
43     pass
45 try:
46     import back_bsddb3
47     bsddb3 = back_bsddb3
48     __all__.append('bsddb3')
49 except ImportError:
50     pass
52 #
53 # $Log: not supported by cvs2svn $
54 # Revision 1.10  2002/01/22 07:08:50  richard
55 # I was certain I'd already done this (there's even a change note in
56 # CHANGES)...
57 #
58 # Revision 1.9  2001/12/12 02:30:51  richard
59 # I fixed the problems with people whose anydbm was using the dbm module at the
60 # backend. It turns out the dbm module modifies the file name to append ".db"
61 # and my check to determine if we're opening an existing or new db just
62 # tested os.path.exists() on the filename. Well, no longer! We now perform a
63 # much better check _and_ cope with the anydbm implementation module changing
64 # too!
65 # I also fixed the backends __init__ so only ImportError is squashed.
66 #
67 # Revision 1.8  2001/12/10 22:20:01  richard
68 # Enabled transaction support in the bsddb backend. It uses the anydbm code
69 # where possible, only replacing methods where the db is opened (it uses the
70 # btree opener specifically.)
71 # Also cleaned up some change note generation.
72 # Made the backends package work with pydoc too.
73 #
74 # Revision 1.7  2001/12/10 00:57:38  richard
75 # From CHANGES:
76 #  . Added the "display" command to the admin tool - displays a node's values
77 #  . #489760 ] [issue] only subject
78 #  . fixed the doc/index.html to include the quoting in the mail alias.
79 #
80 # Also:
81 #  . fixed roundup-admin so it works with transactions
82 #  . disabled the back_anydbm module if anydbm tries to use dumbdbm
83 #
84 # Revision 1.6  2001/08/07 00:24:42  richard
85 # stupid typo
86 #
87 # Revision 1.5  2001/08/07 00:15:51  richard
88 # Added the copyright/license notice to (nearly) all files at request of
89 # Bizar Software.
90 #
91 #
92 #
93 # vim: set filetype=python ts=4 sw=4 et si