[Zodb-checkins] SVN: ZODB/branches/tseaver-python_picklecache-2/src/persistent/__init__.py Enable 'Timestamp' fallback to 'timestamp' when extension unavailable.

Tres Seaver tseaver at palladion.com
Tue Sep 27 12:31:05 EST 2011


Log message for revision 122973:
  Enable 'Timestamp' fallback to 'timestamp' when extension unavailable.

Changed:
  U   ZODB/branches/tseaver-python_picklecache-2/src/persistent/__init__.py

-=-
Modified: ZODB/branches/tseaver-python_picklecache-2/src/persistent/__init__.py
===================================================================
--- ZODB/branches/tseaver-python_picklecache-2/src/persistent/__init__.py	2011-09-27 17:31:04 UTC (rev 122972)
+++ ZODB/branches/tseaver-python_picklecache-2/src/persistent/__init__.py	2011-09-27 17:31:05 UTC (rev 122973)
@@ -39,6 +39,13 @@
 except ImportError:
     from picklecache import PickleCache
 
+try:
+    import TimeStamp
+except ImportError:
+    import timestamp as TimeStamp
+    import sys
+    sys.modules['persistent.TimeStamp'] = sys.modules['persistent.timestamp']
+
 if _HAVE_CPERSISTECE:
     # Make an interface declaration for Persistent, if zope.interface
     # is available.  XXX that the pyPersistent version already does this?



More information about the Zodb-checkins mailing list