Re: Re: UnicodeDecodeError
Toby Dickenson <[email protected]> Sat, 31 Dec 2005 11:03:16 +0000
| Newsgroups | gmane.comp.web.zope.zodb.dirstorage |
|---|---|
| Message-ID | <[email protected]> |
On Tuesday 20 Dec 2005 14:02, Philipp von Weitershausen wrote: > Therefore, if DirectoryStorage synced its behaviour with FileStorage > regarding the str()ing of principal IDs/user names, we would be safe > with Zope 3.2+ (and also with Zope 3.1 as long as principal IDs used > there are ASCII only). Agreed. The attached patch is now in cvs. There have been no other reported problems with Novembers release candidate, so I propose to make a final release including this patch next Monday.
usernames.diff
(text/x-diff, 1.2 KB)
Index: BaseDirectoryStorage.py
===================================================================
RCS file: /cvsroot/dirstorage/DirectoryStorage/BaseDirectoryStorage.py,v
retrieving revision 1.36
retrieving revision 1.37
diff -c -3 -r1.36 -r1.37
*** BaseDirectoryStorage.py 13 Sep 2005 08:27:56 -0000 1.36
--- BaseDirectoryStorage.py 31 Dec 2005 10:24:10 -0000 1.37
***************
*** 187,195 ****
if tid <= self._prev_serial:
raise DirectoryStorageError('descending serial numbers in _begin')
td = self._transaction_directory = self.filesystem.transaction(tid)
! td.u = u
! td.d = d
! td.e = e
if 0:
# calculate transactions throughput figure
self._times.append(time.time())
--- 187,195 ----
if tid <= self._prev_serial:
raise DirectoryStorageError('descending serial numbers in _begin')
td = self._transaction_directory = self.filesystem.transaction(tid)
! td.u = str(u)
! td.d = str(d)
! td.e = str(e)
if 0:
# calculate transactions throughput figure
self._times.append(time.time())