Fix build on Python 2.4.
Spotted by: kris
This commit is contained in:
parent
cd5494c6d0
commit
a2b184cd1e
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=122996
16
databases/zodb/files/patch-BTrees::convert.py
Normal file
16
databases/zodb/files/patch-BTrees::convert.py
Normal file
@ -0,0 +1,16 @@
|
||||
--- BTrees/convert.py.orig Fri Dec 3 01:25:34 2004
|
||||
+++ BTrees/convert.py Fri Dec 3 01:26:15 2004
|
||||
@@ -13,11 +13,11 @@
|
||||
##############################################################################
|
||||
|
||||
|
||||
-def convert(old, new, threshold=200, f=None, None=None):
|
||||
+def convert(old, new, threshold=200, f=None, _None=None):
|
||||
"Utility for converting old btree to new"
|
||||
n=0
|
||||
for k, v in old.items():
|
||||
- if f is not None: v=f(v)
|
||||
+ if f is not _None: v=f(v)
|
||||
new[k]=v
|
||||
n=n+1
|
||||
if n > threshold:
|
20
databases/zodb/files/patch-ZEO::StorageServer.py
Normal file
20
databases/zodb/files/patch-ZEO::StorageServer.py
Normal file
@ -0,0 +1,20 @@
|
||||
--- ZEO/StorageServer.py.orig Fri Dec 3 01:27:05 2004
|
||||
+++ ZEO/StorageServer.py Fri Dec 3 01:27:22 2004
|
||||
@@ -268,7 +268,7 @@
|
||||
|
||||
def message_input(self, message,
|
||||
dump=dump, Unpickler=Unpickler, StringIO=StringIO,
|
||||
- None=None):
|
||||
+ _None=None):
|
||||
if __debug__:
|
||||
if len(message) > max_blather:
|
||||
tmp = `message[:max_blather]`
|
||||
@@ -276,7 +276,7 @@
|
||||
tmp = `message`
|
||||
blather('message_input', id(self), tmp)
|
||||
|
||||
- if self.__storage is None:
|
||||
+ if self.__storage is _None:
|
||||
# This is the first communication from the client
|
||||
self.__storage, self.__storage_id = (
|
||||
self.__server.register_connection(self, message))
|
17
databases/zodb/files/patch-ZODB::ConflictResolution.py
Normal file
17
databases/zodb/files/patch-ZODB::ConflictResolution.py
Normal file
@ -0,0 +1,17 @@
|
||||
--- ZODB/ConflictResolution.py.orig Fri Dec 3 01:28:07 2004
|
||||
+++ ZODB/ConflictResolution.py Fri Dec 3 01:28:26 2004
|
||||
@@ -56,12 +56,12 @@
|
||||
data=None
|
||||
|
||||
def __call__(self, oid,
|
||||
- getattr=getattr, None=None):
|
||||
+ getattr=getattr, _None=None):
|
||||
|
||||
data=self.data
|
||||
if not data: data=self.data={}
|
||||
|
||||
- r=data.get(oid, None)
|
||||
+ r=data.get(oid, _None)
|
||||
if r is None:
|
||||
r=PersistentReference()
|
||||
r.data=oid
|
14
databases/zodb/files/patch-ZODB::Transaction.py
Normal file
14
databases/zodb/files/patch-ZODB::Transaction.py
Normal file
@ -0,0 +1,14 @@
|
||||
--- ZODB/Transaction.py.orig Fri Dec 3 01:29:04 2004
|
||||
+++ ZODB/Transaction.py Fri Dec 3 01:29:17 2004
|
||||
@@ -351,9 +351,9 @@
|
||||
|
||||
else:
|
||||
_t={}
|
||||
- def get_transaction(_id=thread.get_ident, _t=_t, get=_t.get, None=None):
|
||||
+ def get_transaction(_id=thread.get_ident, _t=_t, get=_t.get, _None=None):
|
||||
id=_id()
|
||||
- t=get(id, None)
|
||||
+ t=get(id, _None)
|
||||
if t is None: _t[id]=t=Transaction(id)
|
||||
return t
|
||||
|
14
databases/zodb/files/patch-ZODB::referencesf.py
Normal file
14
databases/zodb/files/patch-ZODB::referencesf.py
Normal file
@ -0,0 +1,14 @@
|
||||
--- ZODB/referencesf.py.orig Fri Dec 3 01:29:52 2004
|
||||
+++ ZODB/referencesf.py Fri Dec 3 01:30:06 2004
|
||||
@@ -19,9 +19,9 @@
|
||||
Unpickler=cPickle.Unpickler,
|
||||
StringIO=cStringIO.StringIO,
|
||||
tt=type(()),
|
||||
- type=type, None=None):
|
||||
+ type=type, _None=None):
|
||||
|
||||
- if rootl is None: rootl=[]
|
||||
+ if rootl is _None: rootl=[]
|
||||
u=Unpickler(StringIO(p))
|
||||
l=len(rootl)
|
||||
u.persistent_load=rootl
|
Loading…
Reference in New Issue
Block a user