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.15 2002-08-23 04:48:10 richard Exp $
20 __all__ = []
22 try:
23 import sys, anydbm
24 if not hasattr(sys, 'version_info') or sys.version_info < (2,1,2):
25 import dumbdbm
26 # dumbdbm only works in python 2.1.2+
27 assert anydbm._defaultmod != dumbdbm
28 del anydbm
29 del dumbdbm
30 except AssertionError:
31 print "WARNING: you should upgrade to python 2.1.3"
32 except ImportError, message:
33 if str(message) != 'No module named anydbm': raise
34 else:
35 import back_anydbm
36 anydbm = back_anydbm
37 __all__.append('anydbm')
39 try:
40 import gadfly
41 except ImportError, message:
42 if str(message) != 'No module named gadfly': raise
43 else:
44 import back_gadfly
45 gadfly = back_gadfly
46 __all__.append('gadfly')
48 try:
49 import bsddb
50 except ImportError, message:
51 if str(message) != 'No module named bsddb': raise
52 else:
53 import back_bsddb
54 bsddb = back_bsddb
55 __all__.append('bsddb')
57 try:
58 import bsddb3
59 except ImportError, message:
60 if str(message) != 'No module named bsddb3': raise
61 else:
62 import back_bsddb3
63 bsddb3 = back_bsddb3
64 __all__.append('bsddb3')
66 try:
67 import metakit
68 except ImportError, message:
69 if str(message) != 'No module named metakit': raise
70 else:
71 import back_metakit
72 metakit = back_metakit
73 __all__.append('metakit')
75 #
76 # $Log: not supported by cvs2svn $
77 # Revision 1.14 2002/08/22 07:56:51 richard
78 # Whee! It's not finished yet, but I can create a new instance and play with
79 # it a little bit :)
80 #
81 # Revision 1.13 2002/07/11 01:11:03 richard
82 # Added metakit backend to the db tests and fixed the more easily fixable test
83 # failures.
84 #
85 # Revision 1.12 2002/05/22 00:32:33 richard
86 # . changed the default message list in issues to display the message body
87 # . made backends.__init__ be more specific about which ImportErrors it really
88 # wants to ignore
89 # . fixed the example addresses in the templates to use correct example domains
90 # . cleaned out the template stylesheets, removing a bunch of junk that really
91 # wasn't necessary (font specs, styles never used) and added a style for
92 # message content
93 #
94 # Revision 1.11 2002/02/16 08:39:42 richard
95 # . #516854 ] "My Issues" and redisplay
96 #
97 # Revision 1.10 2002/01/22 07:08:50 richard
98 # I was certain I'd already done this (there's even a change note in
99 # CHANGES)...
100 #
101 # Revision 1.9 2001/12/12 02:30:51 richard
102 # I fixed the problems with people whose anydbm was using the dbm module at the
103 # backend. It turns out the dbm module modifies the file name to append ".db"
104 # and my check to determine if we're opening an existing or new db just
105 # tested os.path.exists() on the filename. Well, no longer! We now perform a
106 # much better check _and_ cope with the anydbm implementation module changing
107 # too!
108 # I also fixed the backends __init__ so only ImportError is squashed.
109 #
110 # Revision 1.8 2001/12/10 22:20:01 richard
111 # Enabled transaction support in the bsddb backend. It uses the anydbm code
112 # where possible, only replacing methods where the db is opened (it uses the
113 # btree opener specifically.)
114 # Also cleaned up some change note generation.
115 # Made the backends package work with pydoc too.
116 #
117 # Revision 1.7 2001/12/10 00:57:38 richard
118 # From CHANGES:
119 # . Added the "display" command to the admin tool - displays a node's values
120 # . #489760 ] [issue] only subject
121 # . fixed the doc/index.html to include the quoting in the mail alias.
122 #
123 # Also:
124 # . fixed roundup-admin so it works with transactions
125 # . disabled the back_anydbm module if anydbm tries to use dumbdbm
126 #
127 # Revision 1.6 2001/08/07 00:24:42 richard
128 # stupid typo
129 #
130 # Revision 1.5 2001/08/07 00:15:51 richard
131 # Added the copyright/license notice to (nearly) all files at request of
132 # Bizar Software.
133 #
134 #
135 #
136 # vim: set filetype=python ts=4 sw=4 et si