Mercurial > p > roundup > code
annotate roundup/backends/__init__.py @ 440:de5bf4191f11
Enabled transaction support in the bsddb backend.
It uses the anydbm code where possible, only replacing methods where
the db is opened (it uses the btree opener specifically.)
Also cleaned up some change note generation.
Made the backends package work with pydoc too.
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Mon, 10 Dec 2001 22:20:01 +0000 |
| parents | 9d97c1a4ddad |
| children | a0c598702f17 |
| rev | line source |
|---|---|
|
213
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
159
diff
changeset
|
1 # |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
159
diff
changeset
|
2 # Copyright (c) 2001 Bizar Software Pty Ltd (http://www.bizarsoftware.com.au/) |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
159
diff
changeset
|
3 # This module is free software, and you may redistribute it and/or modify |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
159
diff
changeset
|
4 # under the same terms as Python, so long as this copyright message and |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
159
diff
changeset
|
5 # disclaimer are retained in their original form. |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
159
diff
changeset
|
6 # |
| 214 | 7 # IN NO EVENT SHALL BIZAR SOFTWARE PTY LTD BE LIABLE TO ANY PARTY FOR |
|
213
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
159
diff
changeset
|
8 # DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
159
diff
changeset
|
9 # OUT OF THE USE OF THIS CODE, EVEN IF THE AUTHOR HAS BEEN ADVISED OF THE |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
159
diff
changeset
|
10 # POSSIBILITY OF SUCH DAMAGE. |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
159
diff
changeset
|
11 # |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
159
diff
changeset
|
12 # BIZAR SOFTWARE PTY LTD SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
159
diff
changeset
|
13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
159
diff
changeset
|
14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
159
diff
changeset
|
15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
159
diff
changeset
|
16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
159
diff
changeset
|
17 # |
|
440
de5bf4191f11
Enabled transaction support in the bsddb backend.
Richard Jones <richard@users.sourceforge.net>
parents:
438
diff
changeset
|
18 # $Id: __init__.py,v 1.8 2001-12-10 22:20:01 richard Exp $ |
|
213
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
159
diff
changeset
|
19 |
|
159
764db91c0dea
Checks for ability to import the specific back-end module.
Richard Jones <richard@users.sourceforge.net>
parents:
46
diff
changeset
|
20 __all__ = [] |
|
764db91c0dea
Checks for ability to import the specific back-end module.
Richard Jones <richard@users.sourceforge.net>
parents:
46
diff
changeset
|
21 |
|
764db91c0dea
Checks for ability to import the specific back-end module.
Richard Jones <richard@users.sourceforge.net>
parents:
46
diff
changeset
|
22 try: |
|
438
9d97c1a4ddad
Notes from changes.
Richard Jones <richard@users.sourceforge.net>
parents:
214
diff
changeset
|
23 import anydbm, dumbdbm |
|
9d97c1a4ddad
Notes from changes.
Richard Jones <richard@users.sourceforge.net>
parents:
214
diff
changeset
|
24 # dumbdbm in python 2,2b2, 2.1.1 and earlier is seriously broken |
|
9d97c1a4ddad
Notes from changes.
Richard Jones <richard@users.sourceforge.net>
parents:
214
diff
changeset
|
25 assert anydbm._defaultmod != dumbdbm |
|
9d97c1a4ddad
Notes from changes.
Richard Jones <richard@users.sourceforge.net>
parents:
214
diff
changeset
|
26 del anydbm |
|
9d97c1a4ddad
Notes from changes.
Richard Jones <richard@users.sourceforge.net>
parents:
214
diff
changeset
|
27 del dumbdbm |
|
159
764db91c0dea
Checks for ability to import the specific back-end module.
Richard Jones <richard@users.sourceforge.net>
parents:
46
diff
changeset
|
28 import back_anydbm |
|
764db91c0dea
Checks for ability to import the specific back-end module.
Richard Jones <richard@users.sourceforge.net>
parents:
46
diff
changeset
|
29 anydbm = back_anydbm |
|
440
de5bf4191f11
Enabled transaction support in the bsddb backend.
Richard Jones <richard@users.sourceforge.net>
parents:
438
diff
changeset
|
30 __all__.append('anydbm') |
|
de5bf4191f11
Enabled transaction support in the bsddb backend.
Richard Jones <richard@users.sourceforge.net>
parents:
438
diff
changeset
|
31 except AssertionError: |
|
159
764db91c0dea
Checks for ability to import the specific back-end module.
Richard Jones <richard@users.sourceforge.net>
parents:
46
diff
changeset
|
32 del back_anydbm |
|
764db91c0dea
Checks for ability to import the specific back-end module.
Richard Jones <richard@users.sourceforge.net>
parents:
46
diff
changeset
|
33 except: |
|
764db91c0dea
Checks for ability to import the specific back-end module.
Richard Jones <richard@users.sourceforge.net>
parents:
46
diff
changeset
|
34 pass |
|
44
c1f3e058c58d
Moved the database backends off into backends.
Richard Jones <richard@users.sourceforge.net>
parents:
42
diff
changeset
|
35 |
|
159
764db91c0dea
Checks for ability to import the specific back-end module.
Richard Jones <richard@users.sourceforge.net>
parents:
46
diff
changeset
|
36 try: |
|
764db91c0dea
Checks for ability to import the specific back-end module.
Richard Jones <richard@users.sourceforge.net>
parents:
46
diff
changeset
|
37 import back_bsddb |
|
764db91c0dea
Checks for ability to import the specific back-end module.
Richard Jones <richard@users.sourceforge.net>
parents:
46
diff
changeset
|
38 bsddb = back_bsddb |
|
764db91c0dea
Checks for ability to import the specific back-end module.
Richard Jones <richard@users.sourceforge.net>
parents:
46
diff
changeset
|
39 __all__.append('bsddb') |
|
764db91c0dea
Checks for ability to import the specific back-end module.
Richard Jones <richard@users.sourceforge.net>
parents:
46
diff
changeset
|
40 except: |
|
764db91c0dea
Checks for ability to import the specific back-end module.
Richard Jones <richard@users.sourceforge.net>
parents:
46
diff
changeset
|
41 pass |
|
764db91c0dea
Checks for ability to import the specific back-end module.
Richard Jones <richard@users.sourceforge.net>
parents:
46
diff
changeset
|
42 |
|
764db91c0dea
Checks for ability to import the specific back-end module.
Richard Jones <richard@users.sourceforge.net>
parents:
46
diff
changeset
|
43 try: |
|
764db91c0dea
Checks for ability to import the specific back-end module.
Richard Jones <richard@users.sourceforge.net>
parents:
46
diff
changeset
|
44 import back_bsddb3 |
|
764db91c0dea
Checks for ability to import the specific back-end module.
Richard Jones <richard@users.sourceforge.net>
parents:
46
diff
changeset
|
45 bsddb3 = back_bsddb3 |
|
764db91c0dea
Checks for ability to import the specific back-end module.
Richard Jones <richard@users.sourceforge.net>
parents:
46
diff
changeset
|
46 __all__.append('bsddb3') |
|
764db91c0dea
Checks for ability to import the specific back-end module.
Richard Jones <richard@users.sourceforge.net>
parents:
46
diff
changeset
|
47 except: |
|
764db91c0dea
Checks for ability to import the specific back-end module.
Richard Jones <richard@users.sourceforge.net>
parents:
46
diff
changeset
|
48 pass |
|
764db91c0dea
Checks for ability to import the specific back-end module.
Richard Jones <richard@users.sourceforge.net>
parents:
46
diff
changeset
|
49 |
|
213
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
159
diff
changeset
|
50 # |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
159
diff
changeset
|
51 # $Log: not supported by cvs2svn $ |
|
440
de5bf4191f11
Enabled transaction support in the bsddb backend.
Richard Jones <richard@users.sourceforge.net>
parents:
438
diff
changeset
|
52 # Revision 1.7 2001/12/10 00:57:38 richard |
|
de5bf4191f11
Enabled transaction support in the bsddb backend.
Richard Jones <richard@users.sourceforge.net>
parents:
438
diff
changeset
|
53 # From CHANGES: |
|
de5bf4191f11
Enabled transaction support in the bsddb backend.
Richard Jones <richard@users.sourceforge.net>
parents:
438
diff
changeset
|
54 # . Added the "display" command to the admin tool - displays a node's values |
|
de5bf4191f11
Enabled transaction support in the bsddb backend.
Richard Jones <richard@users.sourceforge.net>
parents:
438
diff
changeset
|
55 # . #489760 ] [issue] only subject |
|
de5bf4191f11
Enabled transaction support in the bsddb backend.
Richard Jones <richard@users.sourceforge.net>
parents:
438
diff
changeset
|
56 # . fixed the doc/index.html to include the quoting in the mail alias. |
|
de5bf4191f11
Enabled transaction support in the bsddb backend.
Richard Jones <richard@users.sourceforge.net>
parents:
438
diff
changeset
|
57 # |
|
de5bf4191f11
Enabled transaction support in the bsddb backend.
Richard Jones <richard@users.sourceforge.net>
parents:
438
diff
changeset
|
58 # Also: |
|
de5bf4191f11
Enabled transaction support in the bsddb backend.
Richard Jones <richard@users.sourceforge.net>
parents:
438
diff
changeset
|
59 # . fixed roundup-admin so it works with transactions |
|
de5bf4191f11
Enabled transaction support in the bsddb backend.
Richard Jones <richard@users.sourceforge.net>
parents:
438
diff
changeset
|
60 # . disabled the back_anydbm module if anydbm tries to use dumbdbm |
|
de5bf4191f11
Enabled transaction support in the bsddb backend.
Richard Jones <richard@users.sourceforge.net>
parents:
438
diff
changeset
|
61 # |
|
438
9d97c1a4ddad
Notes from changes.
Richard Jones <richard@users.sourceforge.net>
parents:
214
diff
changeset
|
62 # Revision 1.6 2001/08/07 00:24:42 richard |
|
9d97c1a4ddad
Notes from changes.
Richard Jones <richard@users.sourceforge.net>
parents:
214
diff
changeset
|
63 # stupid typo |
|
9d97c1a4ddad
Notes from changes.
Richard Jones <richard@users.sourceforge.net>
parents:
214
diff
changeset
|
64 # |
| 214 | 65 # Revision 1.5 2001/08/07 00:15:51 richard |
| 66 # Added the copyright/license notice to (nearly) all files at request of | |
| 67 # Bizar Software. | |
| 68 # | |
|
213
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
159
diff
changeset
|
69 # |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
159
diff
changeset
|
70 # |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
159
diff
changeset
|
71 # vim: set filetype=python ts=4 sw=4 et si |
