[Zodb-checkins] CVS: Zope/lib/python/ZODB - DemoStorage.py:1.19 FileStorage.py:1.136

Fred L. Drake, Jr. fred at zope.com
Wed Jul 9 13:25:57 EDT 2003


Update of /cvs-repository/Zope/lib/python/ZODB
In directory cvs.zope.org:/tmp/cvs-serv12488/ZODB

Modified Files:
	DemoStorage.py FileStorage.py 
Log Message:
Replace apply(f,args,kw) with f(*args,**kw) to avoid deprecation warnings
from Python 2.3.
These warnings are displayed when running the unit tests.
This patch fixes the occurrances that are triggered by the unit tests;
there are probably others.


=== Zope/lib/python/ZODB/DemoStorage.py 1.18 => 1.19 ===
--- Zope/lib/python/ZODB/DemoStorage.py:1.18	Tue Apr 22 14:11:44 2003
+++ Zope/lib/python/ZODB/DemoStorage.py	Wed Jul  9 12:25:19 2003
@@ -436,7 +436,7 @@
         self._lock_acquire()
         try:
 
-            stop=`apply(TimeStamp, time.gmtime(t)[:5]+(t%60,))`
+            stop=`TimeStamp(*time.gmtime(t)[:5]+(t%60,))`
             _data=self._data
 
             # Build indexes up to the pack time:


=== Zope/lib/python/ZODB/FileStorage.py 1.135 => 1.136 ===
--- Zope/lib/python/ZODB/FileStorage.py:1.135	Fri May 30 15:20:55 2003
+++ Zope/lib/python/ZODB/FileStorage.py	Wed Jul  9 12:25:19 2003
@@ -293,7 +293,7 @@
 
         self._ts = tid = TimeStamp(tid)
         t = time.time()
-        t = apply(TimeStamp, (time.gmtime(t)[:5] + (t % 60,)))
+        t = TimeStamp(*time.gmtime(t)[:5] + (t % 60,))
         if tid > t:
             warn("%s Database records in the future", file_name);
             if tid.timeTime() - t.timeTime() > 86400*30:
@@ -1460,7 +1460,7 @@
         if self._is_read_only:
             raise POSException.ReadOnlyError()
         
-        stop=`apply(TimeStamp, time.gmtime(t)[:5]+(t%60,))`
+        stop=`TimeStamp(*time.gmtime(t)[:5]+(t%60,))`
         if stop==z64: raise FileStorageError, 'Invalid pack time'
 
         # If the storage is empty, there's nothing to do.




More information about the Zodb-checkins mailing list