annotate roundup/backends/back_bsddb.py @ 752:a721f4e7ebbc

Installation note for people running the tests with a CVS checkout.
author Richard Jones <richard@users.sourceforge.net>
date Tue, 28 May 2002 11:52:08 +0000
parents fed4c363a7f3
children 2dd862af72ee 8adaf5d169da
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
213
d45384bc6420 Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents: 152
diff changeset
1 #
d45384bc6420 Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents: 152
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: 152
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: 152
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: 152
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: 152
diff changeset
6 #
214
18134bffab37 stupid typo
Richard Jones <richard@users.sourceforge.net>
parents: 213
diff changeset
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: 152
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: 152
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: 152
diff changeset
10 # POSSIBILITY OF SUCH DAMAGE.
d45384bc6420 Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents: 152
diff changeset
11 #
d45384bc6420 Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents: 152
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: 152
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: 152
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: 152
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: 152
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: 152
diff changeset
17 #
719
fed4c363a7f3 node caching now works, and gives a small boost in performance
Richard Jones <richard@users.sourceforge.net>
parents: 676
diff changeset
18 #$Id: back_bsddb.py,v 1.18 2002-05-15 06:21:21 richard Exp $
440
de5bf4191f11 Enabled transaction support in the bsddb backend.
Richard Jones <richard@users.sourceforge.net>
parents: 394
diff changeset
19 '''
de5bf4191f11 Enabled transaction support in the bsddb backend.
Richard Jones <richard@users.sourceforge.net>
parents: 394
diff changeset
20 This module defines a backend that saves the hyperdatabase in BSDDB.
de5bf4191f11 Enabled transaction support in the bsddb backend.
Richard Jones <richard@users.sourceforge.net>
parents: 394
diff changeset
21 '''
46
3c5920433866 *sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
22
47
34491d9b91a0 Storing only marshallable data in the db - no nasty pickled class references.
Richard Jones <richard@users.sourceforge.net>
parents: 46
diff changeset
23 import bsddb, os, marshal
650
9b2575610953 Ran it through pychecker, made fixes
Richard Jones <richard@users.sourceforge.net>
parents: 625
diff changeset
24 from roundup import hyperdb, date
46
3c5920433866 *sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
25
440
de5bf4191f11 Enabled transaction support in the bsddb backend.
Richard Jones <richard@users.sourceforge.net>
parents: 394
diff changeset
26 # these classes are so similar, we just use the anydbm methods
de5bf4191f11 Enabled transaction support in the bsddb backend.
Richard Jones <richard@users.sourceforge.net>
parents: 394
diff changeset
27 import back_anydbm
de5bf4191f11 Enabled transaction support in the bsddb backend.
Richard Jones <richard@users.sourceforge.net>
parents: 394
diff changeset
28
46
3c5920433866 *sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
29 #
3c5920433866 *sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
30 # Now the database
3c5920433866 *sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
31 #
440
de5bf4191f11 Enabled transaction support in the bsddb backend.
Richard Jones <richard@users.sourceforge.net>
parents: 394
diff changeset
32 class Database(back_anydbm.Database):
46
3c5920433866 *sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
33 """A database for storing records containing flexible data types."""
3c5920433866 *sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
34 #
3c5920433866 *sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
35 # Class DBs
3c5920433866 *sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
36 #
3c5920433866 *sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
37 def clear(self):
3c5920433866 *sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
38 for cn in self.classes.keys():
3c5920433866 *sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
39 db = os.path.join(self.dir, 'nodes.%s'%cn)
3c5920433866 *sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
40 bsddb.btopen(db, 'n')
3c5920433866 *sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
41 db = os.path.join(self.dir, 'journals.%s'%cn)
3c5920433866 *sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
42 bsddb.btopen(db, 'n')
3c5920433866 *sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
43
3c5920433866 *sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
44 def getclassdb(self, classname, mode='r'):
3c5920433866 *sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
45 ''' grab a connection to the class db that will be used for
3c5920433866 *sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
46 multiple actions
3c5920433866 *sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
47 '''
3c5920433866 *sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
48 path = os.path.join(os.getcwd(), self.dir, 'nodes.%s'%classname)
152
80c062af1b7d Handle non-existence of db files in the other backends (code from anydbm).
Richard Jones <richard@users.sourceforge.net>
parents: 149
diff changeset
49 if os.path.exists(path):
80c062af1b7d Handle non-existence of db files in the other backends (code from anydbm).
Richard Jones <richard@users.sourceforge.net>
parents: 149
diff changeset
50 return bsddb.btopen(path, mode)
80c062af1b7d Handle non-existence of db files in the other backends (code from anydbm).
Richard Jones <richard@users.sourceforge.net>
parents: 149
diff changeset
51 else:
80c062af1b7d Handle non-existence of db files in the other backends (code from anydbm).
Richard Jones <richard@users.sourceforge.net>
parents: 149
diff changeset
52 return bsddb.btopen(path, 'n')
46
3c5920433866 *sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
53
570
e346a9792335 fixed back_bsddb so it passed the journal tests
Richard Jones <richard@users.sourceforge.net>
parents: 440
diff changeset
54 def _opendb(self, name, mode):
e346a9792335 fixed back_bsddb so it passed the journal tests
Richard Jones <richard@users.sourceforge.net>
parents: 440
diff changeset
55 '''Low-level database opener that gets around anydbm/dbm
e346a9792335 fixed back_bsddb so it passed the journal tests
Richard Jones <richard@users.sourceforge.net>
parents: 440
diff changeset
56 eccentricities.
e346a9792335 fixed back_bsddb so it passed the journal tests
Richard Jones <richard@users.sourceforge.net>
parents: 440
diff changeset
57 '''
719
fed4c363a7f3 node caching now works, and gives a small boost in performance
Richard Jones <richard@users.sourceforge.net>
parents: 676
diff changeset
58 if __debug__:
fed4c363a7f3 node caching now works, and gives a small boost in performance
Richard Jones <richard@users.sourceforge.net>
parents: 676
diff changeset
59 print >>hyperdb.DEBUG, self, '_opendb', (self, name, mode)
570
e346a9792335 fixed back_bsddb so it passed the journal tests
Richard Jones <richard@users.sourceforge.net>
parents: 440
diff changeset
60 # determine which DB wrote the class file
e346a9792335 fixed back_bsddb so it passed the journal tests
Richard Jones <richard@users.sourceforge.net>
parents: 440
diff changeset
61 path = os.path.join(os.getcwd(), self.dir, name)
e346a9792335 fixed back_bsddb so it passed the journal tests
Richard Jones <richard@users.sourceforge.net>
parents: 440
diff changeset
62 if not os.path.exists(path):
719
fed4c363a7f3 node caching now works, and gives a small boost in performance
Richard Jones <richard@users.sourceforge.net>
parents: 676
diff changeset
63 if __debug__:
fed4c363a7f3 node caching now works, and gives a small boost in performance
Richard Jones <richard@users.sourceforge.net>
parents: 676
diff changeset
64 print >>hyperdb.DEBUG, "_opendb bsddb.open(%r, 'n')"%path
570
e346a9792335 fixed back_bsddb so it passed the journal tests
Richard Jones <richard@users.sourceforge.net>
parents: 440
diff changeset
65 return bsddb.btopen(path, 'n')
e346a9792335 fixed back_bsddb so it passed the journal tests
Richard Jones <richard@users.sourceforge.net>
parents: 440
diff changeset
66
e346a9792335 fixed back_bsddb so it passed the journal tests
Richard Jones <richard@users.sourceforge.net>
parents: 440
diff changeset
67 # open the database with the correct module
719
fed4c363a7f3 node caching now works, and gives a small boost in performance
Richard Jones <richard@users.sourceforge.net>
parents: 676
diff changeset
68 if __debug__:
fed4c363a7f3 node caching now works, and gives a small boost in performance
Richard Jones <richard@users.sourceforge.net>
parents: 676
diff changeset
69 print >>hyperdb.DEBUG, "_opendb bsddb.open(%r, %r)"%(path, mode)
570
e346a9792335 fixed back_bsddb so it passed the journal tests
Richard Jones <richard@users.sourceforge.net>
parents: 440
diff changeset
70 return bsddb.btopen(path, mode)
e346a9792335 fixed back_bsddb so it passed the journal tests
Richard Jones <richard@users.sourceforge.net>
parents: 440
diff changeset
71
47
34491d9b91a0 Storing only marshallable data in the db - no nasty pickled class references.
Richard Jones <richard@users.sourceforge.net>
parents: 46
diff changeset
72 #
46
3c5920433866 *sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
73 # Journal
3c5920433866 *sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
74 #
3c5920433866 *sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
75 def getjournal(self, classname, nodeid):
3c5920433866 *sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
76 ''' get the journal for id
3c5920433866 *sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
77 '''
3c5920433866 *sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
78 # attempt to open the journal - in some rare cases, the journal may
3c5920433866 *sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
79 # not exist
3c5920433866 *sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
80 try:
3c5920433866 *sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
81 db = bsddb.btopen(os.path.join(self.dir, 'journals.%s'%classname),
3c5920433866 *sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
82 'r')
3c5920433866 *sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
83 except bsddb.error, error:
3c5920433866 *sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
84 if error.args[0] != 2: raise
3c5920433866 *sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
85 return []
50
674bd8e1b36e more handling of bad journals
Richard Jones <richard@users.sourceforge.net>
parents: 48
diff changeset
86 # mor handling of bad journals
674bd8e1b36e more handling of bad journals
Richard Jones <richard@users.sourceforge.net>
parents: 48
diff changeset
87 if not db.has_key(nodeid): return []
47
34491d9b91a0 Storing only marshallable data in the db - no nasty pickled class references.
Richard Jones <richard@users.sourceforge.net>
parents: 46
diff changeset
88 journal = marshal.loads(db[nodeid])
34491d9b91a0 Storing only marshallable data in the db - no nasty pickled class references.
Richard Jones <richard@users.sourceforge.net>
parents: 46
diff changeset
89 res = []
34491d9b91a0 Storing only marshallable data in the db - no nasty pickled class references.
Richard Jones <richard@users.sourceforge.net>
parents: 46
diff changeset
90 for entry in journal:
625
88acf6fe20a8 forgot to patch bsddb backend too
Richard Jones <richard@users.sourceforge.net>
parents: 570
diff changeset
91 (nodeid, date_stamp, user, action, params) = entry
48
671203878652 Moved over to using marshal in the bsddb and anydbm backends.
Richard Jones <richard@users.sourceforge.net>
parents: 47
diff changeset
92 date_obj = date.Date(date_stamp)
625
88acf6fe20a8 forgot to patch bsddb backend too
Richard Jones <richard@users.sourceforge.net>
parents: 570
diff changeset
93 res.append((nodeid, date_obj, user, action, params))
46
3c5920433866 *sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
94 db.close()
3c5920433866 *sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
95 return res
3c5920433866 *sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
96
440
de5bf4191f11 Enabled transaction support in the bsddb backend.
Richard Jones <richard@users.sourceforge.net>
parents: 394
diff changeset
97 def _doSaveJournal(self, classname, nodeid, action, params):
676
bc46480e2a2b Fixed serialisation problem...
Richard Jones <richard@users.sourceforge.net>
parents: 650
diff changeset
98 # serialise first
bc46480e2a2b Fixed serialisation problem...
Richard Jones <richard@users.sourceforge.net>
parents: 650
diff changeset
99 if action in ('set', 'create'):
bc46480e2a2b Fixed serialisation problem...
Richard Jones <richard@users.sourceforge.net>
parents: 650
diff changeset
100 params = self.serialise(classname, params)
bc46480e2a2b Fixed serialisation problem...
Richard Jones <richard@users.sourceforge.net>
parents: 650
diff changeset
101
440
de5bf4191f11 Enabled transaction support in the bsddb backend.
Richard Jones <richard@users.sourceforge.net>
parents: 394
diff changeset
102 entry = (nodeid, date.Date().get_tuple(), self.journaltag, action,
de5bf4191f11 Enabled transaction support in the bsddb backend.
Richard Jones <richard@users.sourceforge.net>
parents: 394
diff changeset
103 params)
676
bc46480e2a2b Fixed serialisation problem...
Richard Jones <richard@users.sourceforge.net>
parents: 650
diff changeset
104
719
fed4c363a7f3 node caching now works, and gives a small boost in performance
Richard Jones <richard@users.sourceforge.net>
parents: 676
diff changeset
105 if __debug__:
fed4c363a7f3 node caching now works, and gives a small boost in performance
Richard Jones <richard@users.sourceforge.net>
parents: 676
diff changeset
106 print >>hyperdb.DEBUG, '_doSaveJournal', entry
676
bc46480e2a2b Fixed serialisation problem...
Richard Jones <richard@users.sourceforge.net>
parents: 650
diff changeset
107
440
de5bf4191f11 Enabled transaction support in the bsddb backend.
Richard Jones <richard@users.sourceforge.net>
parents: 394
diff changeset
108 db = bsddb.btopen(os.path.join(self.dir, 'journals.%s'%classname), 'c')
676
bc46480e2a2b Fixed serialisation problem...
Richard Jones <richard@users.sourceforge.net>
parents: 650
diff changeset
109
440
de5bf4191f11 Enabled transaction support in the bsddb backend.
Richard Jones <richard@users.sourceforge.net>
parents: 394
diff changeset
110 if db.has_key(nodeid):
de5bf4191f11 Enabled transaction support in the bsddb backend.
Richard Jones <richard@users.sourceforge.net>
parents: 394
diff changeset
111 s = db[nodeid]
650
9b2575610953 Ran it through pychecker, made fixes
Richard Jones <richard@users.sourceforge.net>
parents: 625
diff changeset
112 l = marshal.loads(s)
440
de5bf4191f11 Enabled transaction support in the bsddb backend.
Richard Jones <richard@users.sourceforge.net>
parents: 394
diff changeset
113 l.append(entry)
de5bf4191f11 Enabled transaction support in the bsddb backend.
Richard Jones <richard@users.sourceforge.net>
parents: 394
diff changeset
114 else:
de5bf4191f11 Enabled transaction support in the bsddb backend.
Richard Jones <richard@users.sourceforge.net>
parents: 394
diff changeset
115 l = [entry]
676
bc46480e2a2b Fixed serialisation problem...
Richard Jones <richard@users.sourceforge.net>
parents: 650
diff changeset
116
440
de5bf4191f11 Enabled transaction support in the bsddb backend.
Richard Jones <richard@users.sourceforge.net>
parents: 394
diff changeset
117 db[nodeid] = marshal.dumps(l)
de5bf4191f11 Enabled transaction support in the bsddb backend.
Richard Jones <richard@users.sourceforge.net>
parents: 394
diff changeset
118 db.close()
46
3c5920433866 *sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
119
3c5920433866 *sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
120 #
3c5920433866 *sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
121 #$Log: not supported by cvs2svn $
719
fed4c363a7f3 node caching now works, and gives a small boost in performance
Richard Jones <richard@users.sourceforge.net>
parents: 676
diff changeset
122 #Revision 1.17 2002/04/03 05:54:31 richard
fed4c363a7f3 node caching now works, and gives a small boost in performance
Richard Jones <richard@users.sourceforge.net>
parents: 676
diff changeset
123 #Fixed serialisation problem by moving the serialisation step out of the
fed4c363a7f3 node caching now works, and gives a small boost in performance
Richard Jones <richard@users.sourceforge.net>
parents: 676
diff changeset
124 #hyperdb.Class (get, set) into the hyperdb.Database.
fed4c363a7f3 node caching now works, and gives a small boost in performance
Richard Jones <richard@users.sourceforge.net>
parents: 676
diff changeset
125 #
fed4c363a7f3 node caching now works, and gives a small boost in performance
Richard Jones <richard@users.sourceforge.net>
parents: 676
diff changeset
126 #Also fixed htmltemplate after the showid changes I made yesterday.
fed4c363a7f3 node caching now works, and gives a small boost in performance
Richard Jones <richard@users.sourceforge.net>
parents: 676
diff changeset
127 #
fed4c363a7f3 node caching now works, and gives a small boost in performance
Richard Jones <richard@users.sourceforge.net>
parents: 676
diff changeset
128 #Unit tests for all of the above written.
fed4c363a7f3 node caching now works, and gives a small boost in performance
Richard Jones <richard@users.sourceforge.net>
parents: 676
diff changeset
129 #
676
bc46480e2a2b Fixed serialisation problem...
Richard Jones <richard@users.sourceforge.net>
parents: 650
diff changeset
130 #Revision 1.16 2002/02/27 03:40:59 richard
bc46480e2a2b Fixed serialisation problem...
Richard Jones <richard@users.sourceforge.net>
parents: 650
diff changeset
131 #Ran it through pychecker, made fixes
bc46480e2a2b Fixed serialisation problem...
Richard Jones <richard@users.sourceforge.net>
parents: 650
diff changeset
132 #
650
9b2575610953 Ran it through pychecker, made fixes
Richard Jones <richard@users.sourceforge.net>
parents: 625
diff changeset
133 #Revision 1.15 2002/02/16 09:15:33 richard
9b2575610953 Ran it through pychecker, made fixes
Richard Jones <richard@users.sourceforge.net>
parents: 625
diff changeset
134 #forgot to patch bsddb backend too
9b2575610953 Ran it through pychecker, made fixes
Richard Jones <richard@users.sourceforge.net>
parents: 625
diff changeset
135 #
625
88acf6fe20a8 forgot to patch bsddb backend too
Richard Jones <richard@users.sourceforge.net>
parents: 570
diff changeset
136 #Revision 1.14 2002/01/22 07:21:13 richard
88acf6fe20a8 forgot to patch bsddb backend too
Richard Jones <richard@users.sourceforge.net>
parents: 570
diff changeset
137 #. fixed back_bsddb so it passed the journal tests
88acf6fe20a8 forgot to patch bsddb backend too
Richard Jones <richard@users.sourceforge.net>
parents: 570
diff changeset
138 #
88acf6fe20a8 forgot to patch bsddb backend too
Richard Jones <richard@users.sourceforge.net>
parents: 570
diff changeset
139 #... it didn't seem happy using the back_anydbm _open method, which is odd.
88acf6fe20a8 forgot to patch bsddb backend too
Richard Jones <richard@users.sourceforge.net>
parents: 570
diff changeset
140 #Yet another occurrance of whichdb not being able to recognise older bsddb
88acf6fe20a8 forgot to patch bsddb backend too
Richard Jones <richard@users.sourceforge.net>
parents: 570
diff changeset
141 #databases. Yadda yadda. Made the HYPERDBDEBUG stuff more sane in the
88acf6fe20a8 forgot to patch bsddb backend too
Richard Jones <richard@users.sourceforge.net>
parents: 570
diff changeset
142 #process.
88acf6fe20a8 forgot to patch bsddb backend too
Richard Jones <richard@users.sourceforge.net>
parents: 570
diff changeset
143 #
570
e346a9792335 fixed back_bsddb so it passed the journal tests
Richard Jones <richard@users.sourceforge.net>
parents: 440
diff changeset
144 #Revision 1.13 2001/12/10 22:20:01 richard
e346a9792335 fixed back_bsddb so it passed the journal tests
Richard Jones <richard@users.sourceforge.net>
parents: 440
diff changeset
145 #Enabled transaction support in the bsddb backend. It uses the anydbm code
e346a9792335 fixed back_bsddb so it passed the journal tests
Richard Jones <richard@users.sourceforge.net>
parents: 440
diff changeset
146 #where possible, only replacing methods where the db is opened (it uses the
e346a9792335 fixed back_bsddb so it passed the journal tests
Richard Jones <richard@users.sourceforge.net>
parents: 440
diff changeset
147 #btree opener specifically.)
e346a9792335 fixed back_bsddb so it passed the journal tests
Richard Jones <richard@users.sourceforge.net>
parents: 440
diff changeset
148 #Also cleaned up some change note generation.
e346a9792335 fixed back_bsddb so it passed the journal tests
Richard Jones <richard@users.sourceforge.net>
parents: 440
diff changeset
149 #Made the backends package work with pydoc too.
e346a9792335 fixed back_bsddb so it passed the journal tests
Richard Jones <richard@users.sourceforge.net>
parents: 440
diff changeset
150 #
440
de5bf4191f11 Enabled transaction support in the bsddb backend.
Richard Jones <richard@users.sourceforge.net>
parents: 394
diff changeset
151 #Revision 1.12 2001/11/21 02:34:18 richard
de5bf4191f11 Enabled transaction support in the bsddb backend.
Richard Jones <richard@users.sourceforge.net>
parents: 394
diff changeset
152 #Added a target version field to the extended issue schema
de5bf4191f11 Enabled transaction support in the bsddb backend.
Richard Jones <richard@users.sourceforge.net>
parents: 394
diff changeset
153 #
394
f43af1e97fdd Added a target version field to the extended issue schema
Richard Jones <richard@users.sourceforge.net>
parents: 275
diff changeset
154 #Revision 1.11 2001/10/09 23:58:10 richard
f43af1e97fdd Added a target version field to the extended issue schema
Richard Jones <richard@users.sourceforge.net>
parents: 275
diff changeset
155 #Moved the data stringification up into the hyperdb.Class class' get, set
f43af1e97fdd Added a target version field to the extended issue schema
Richard Jones <richard@users.sourceforge.net>
parents: 275
diff changeset
156 #and create methods. This means that the data is also stringified for the
f43af1e97fdd Added a target version field to the extended issue schema
Richard Jones <richard@users.sourceforge.net>
parents: 275
diff changeset
157 #journal call, and removes duplication of code from the backends. The
f43af1e97fdd Added a target version field to the extended issue schema
Richard Jones <richard@users.sourceforge.net>
parents: 275
diff changeset
158 #backend code now only sees strings.
f43af1e97fdd Added a target version field to the extended issue schema
Richard Jones <richard@users.sourceforge.net>
parents: 275
diff changeset
159 #
275
1cc866cec608 Moved the data stringification up into the hyperdb.Class class's...
Richard Jones <richard@users.sourceforge.net>
parents: 270
diff changeset
160 #Revision 1.10 2001/10/09 07:25:59 richard
1cc866cec608 Moved the data stringification up into the hyperdb.Class class's...
Richard Jones <richard@users.sourceforge.net>
parents: 270
diff changeset
161 #Added the Password property type. See "pydoc roundup.password" for
1cc866cec608 Moved the data stringification up into the hyperdb.Class class's...
Richard Jones <richard@users.sourceforge.net>
parents: 270
diff changeset
162 #implementation details. Have updated some of the documentation too.
1cc866cec608 Moved the data stringification up into the hyperdb.Class class's...
Richard Jones <richard@users.sourceforge.net>
parents: 270
diff changeset
163 #
270
a4241ddd22d7 Added the Password property type.
Richard Jones <richard@users.sourceforge.net>
parents: 224
diff changeset
164 #Revision 1.9 2001/08/12 06:32:36 richard
a4241ddd22d7 Added the Password property type.
Richard Jones <richard@users.sourceforge.net>
parents: 224
diff changeset
165 #using isinstance(blah, Foo) now instead of isFooType
a4241ddd22d7 Added the Password property type.
Richard Jones <richard@users.sourceforge.net>
parents: 224
diff changeset
166 #
224
ad2c98faec97 using isinstance(blah, Foo) now instead of isFooType
Richard Jones <richard@users.sourceforge.net>
parents: 214
diff changeset
167 #Revision 1.8 2001/08/07 00:24:42 richard
ad2c98faec97 using isinstance(blah, Foo) now instead of isFooType
Richard Jones <richard@users.sourceforge.net>
parents: 214
diff changeset
168 #stupid typo
ad2c98faec97 using isinstance(blah, Foo) now instead of isFooType
Richard Jones <richard@users.sourceforge.net>
parents: 214
diff changeset
169 #
214
18134bffab37 stupid typo
Richard Jones <richard@users.sourceforge.net>
parents: 213
diff changeset
170 #Revision 1.7 2001/08/07 00:15:51 richard
18134bffab37 stupid typo
Richard Jones <richard@users.sourceforge.net>
parents: 213
diff changeset
171 #Added the copyright/license notice to (nearly) all files at request of
18134bffab37 stupid typo
Richard Jones <richard@users.sourceforge.net>
parents: 213
diff changeset
172 #Bizar Software.
18134bffab37 stupid typo
Richard Jones <richard@users.sourceforge.net>
parents: 213
diff changeset
173 #
213
d45384bc6420 Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents: 152
diff changeset
174 #Revision 1.6 2001/07/30 02:36:23 richard
d45384bc6420 Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents: 152
diff changeset
175 #Handle non-existence of db files in the other backends (code from anydbm).
d45384bc6420 Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents: 152
diff changeset
176 #
152
80c062af1b7d Handle non-existence of db files in the other backends (code from anydbm).
Richard Jones <richard@users.sourceforge.net>
parents: 149
diff changeset
177 #Revision 1.5 2001/07/30 01:41:36 richard
80c062af1b7d Handle non-existence of db files in the other backends (code from anydbm).
Richard Jones <richard@users.sourceforge.net>
parents: 149
diff changeset
178 #Makes schema changes mucho easier.
80c062af1b7d Handle non-existence of db files in the other backends (code from anydbm).
Richard Jones <richard@users.sourceforge.net>
parents: 149
diff changeset
179 #
149
fbc77ecf133b Makes schema changes mucho easier.
Richard Jones <richard@users.sourceforge.net>
parents: 50
diff changeset
180 #Revision 1.4 2001/07/23 08:25:33 richard
fbc77ecf133b Makes schema changes mucho easier.
Richard Jones <richard@users.sourceforge.net>
parents: 50
diff changeset
181 #more handling of bad journals
fbc77ecf133b Makes schema changes mucho easier.
Richard Jones <richard@users.sourceforge.net>
parents: 50
diff changeset
182 #
50
674bd8e1b36e more handling of bad journals
Richard Jones <richard@users.sourceforge.net>
parents: 48
diff changeset
183 #Revision 1.3 2001/07/23 08:20:44 richard
674bd8e1b36e more handling of bad journals
Richard Jones <richard@users.sourceforge.net>
parents: 48
diff changeset
184 #Moved over to using marshal in the bsddb and anydbm backends.
674bd8e1b36e more handling of bad journals
Richard Jones <richard@users.sourceforge.net>
parents: 48
diff changeset
185 #roundup-admin now has a "freshen" command that'll load/save all nodes (not
674bd8e1b36e more handling of bad journals
Richard Jones <richard@users.sourceforge.net>
parents: 48
diff changeset
186 # retired - mod hyperdb.Class.list() so it lists retired nodes)
674bd8e1b36e more handling of bad journals
Richard Jones <richard@users.sourceforge.net>
parents: 48
diff changeset
187 #
48
671203878652 Moved over to using marshal in the bsddb and anydbm backends.
Richard Jones <richard@users.sourceforge.net>
parents: 47
diff changeset
188 #Revision 1.2 2001/07/23 07:56:05 richard
671203878652 Moved over to using marshal in the bsddb and anydbm backends.
Richard Jones <richard@users.sourceforge.net>
parents: 47
diff changeset
189 #Storing only marshallable data in the db - no nasty pickled class references.
671203878652 Moved over to using marshal in the bsddb and anydbm backends.
Richard Jones <richard@users.sourceforge.net>
parents: 47
diff changeset
190 #
47
34491d9b91a0 Storing only marshallable data in the db - no nasty pickled class references.
Richard Jones <richard@users.sourceforge.net>
parents: 46
diff changeset
191 #Revision 1.1 2001/07/23 07:22:13 richard
34491d9b91a0 Storing only marshallable data in the db - no nasty pickled class references.
Richard Jones <richard@users.sourceforge.net>
parents: 46
diff changeset
192 #*sigh* some databases have _foo.so as their underlying implementation.
34491d9b91a0 Storing only marshallable data in the db - no nasty pickled class references.
Richard Jones <richard@users.sourceforge.net>
parents: 46
diff changeset
193 #This time for sure, Rocky.
34491d9b91a0 Storing only marshallable data in the db - no nasty pickled class references.
Richard Jones <richard@users.sourceforge.net>
parents: 46
diff changeset
194 #
46
3c5920433866 *sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
195 #Revision 1.1 2001/07/23 07:15:57 richard
3c5920433866 *sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
196 #Moved the backends into the backends package. Anydbm hasn't been tested at all.
3c5920433866 *sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
197 #
3c5920433866 *sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
198 #Revision 1.1 2001/07/23 06:23:41 richard
3c5920433866 *sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
199 #moved hyper_bsddb.py to the new backends package as bsddb.py
3c5920433866 *sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
200 #
3c5920433866 *sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
201 #Revision 1.2 2001/07/22 12:09:32 richard
3c5920433866 *sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
202 #Final commit of Grande Splite
3c5920433866 *sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
203 #
3c5920433866 *sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
204 #Revision 1.1 2001/07/22 11:58:35 richard
3c5920433866 *sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
205 #More Grande Splite
3c5920433866 *sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
206 #

Roundup Issue Tracker: http://roundup-tracker.org/