CVS: Products/ZopeVersionControl - CHANGES.txt:1.4 Utility.py:1.5

Tres Seaver <[email protected]>
Newsgroups gmane.comp.web.zope.public-cvs
Message-ID <[email protected]>
Update of /cvs-repository/Products/ZopeVersionControl
In directory cvs.zope.org:/tmp/cvs-serv1258

Modified Files:
	CHANGES.txt Utility.py 
Log Message:


  - Import tidying.

  - Make import of 'referencesf' helper work with ZODB3 3.3+, falling back
    to ZODB3 3.2 location.


=== Products/ZopeVersionControl/CHANGES.txt 1.3 => 1.4 ===
--- Products/ZopeVersionControl/CHANGES.txt:1.3	Tue Jan 25 13:03:37 2005
+++ Products/ZopeVersionControl/CHANGES.txt	Mon Apr  4 11:52:40 2005
@@ -1,5 +1,10 @@
 ZopeVersionControl Product Changelog
 
+  After ZopeVersionControl 0.3.1
+
+    - Utility.py:  Import cleanup, including compatibility with ZODB 3.3+
+      location of 'refrencesf'.
+
   ZopeVersionControl 0.3.1 (2004/05/03)
 
     - IVersionControl.py:  Added a module-scope alias for the benefit


=== Products/ZopeVersionControl/Utility.py 1.4 => 1.5 ===
--- Products/ZopeVersionControl/Utility.py:1.4	Tue Feb 24 14:25:13 2004
+++ Products/ZopeVersionControl/Utility.py	Mon Apr  4 11:52:40 2005
@@ -11,15 +11,20 @@
 # 
 ##############################################################################
 
-from Globals import InitializeClass, Persistent
+import os
+import time
+
 from AccessControl import ClassSecurityInfo
-from ZODB.referencesf import referencesf
-from ZODB.TimeStamp import TimeStamp
+from AccessControl import getSecurityManager
 from App.Common import package_home
-import os, time, AccessControl
 from DateTime import DateTime
-from types import FloatType
+from Globals import InitializeClass, Persistent
+from ZODB.TimeStamp import TimeStamp
 
+try:
+    from ZODB.serialize import referencesf
+except ImportError:  # < Zope 2.8 / ZODB 3.3
+    from ZODB.referencesf import referencesf
 
 _dtmldir = os.path.join( package_home( globals() ), 'dtml' )
 
@@ -103,7 +108,7 @@
 
 
 def _findUserId():
-    user = AccessControl.getSecurityManager().getUser()
+    user = getSecurityManager().getUser()
     return user.getUserName()
 
 def _findPath(object):

_______________________________________________
Zope-CVS maillist  -  [email protected]
http://mail.zope.org/mailman/listinfo/zope-cvs

Zope CVS instructions: http://dev.zope.org/CVS
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.