[Zope-Checkins] SVN: Zope/branches/jim-fix-zclasses/lib/python/
Removed BoboPOS compatibility code.
Jim Fulton
jim at zope.com
Fri Apr 1 06:24:22 EST 2005
Log message for revision 29772:
Removed BoboPOS compatibility code.
Changed:
U Zope/branches/jim-fix-zclasses/lib/python/App/ApplicationManager.py
U Zope/branches/jim-fix-zclasses/lib/python/ZClasses/Basic.py
U Zope/branches/jim-fix-zclasses/lib/python/ZClasses/ZClass.py
U Zope/branches/jim-fix-zclasses/lib/python/Zope2/App/startup.py
-=-
Modified: Zope/branches/jim-fix-zclasses/lib/python/App/ApplicationManager.py
===================================================================
--- Zope/branches/jim-fix-zclasses/lib/python/App/ApplicationManager.py 2005-04-01 11:24:20 UTC (rev 29771)
+++ Zope/branches/jim-fix-zclasses/lib/python/App/ApplicationManager.py 2005-04-01 11:24:22 UTC (rev 29772)
@@ -376,11 +376,9 @@
return self._p_jar.db().getName()
def db_size(self):
- if Globals.DatabaseVersion=='2':
- s=os.stat(self.db_name())[6]
- else:
- s=self._p_jar.db().getSize()
- if type(s) is type(''): return s
+ s=self._p_jar.db().getSize()
+ if type(s) is type(''):
+ return s
if s >= 1048576.0: return '%.1fM' % (s/1048576.0)
return '%.1fK' % (s/1024.0)
Modified: Zope/branches/jim-fix-zclasses/lib/python/ZClasses/Basic.py
===================================================================
--- Zope/branches/jim-fix-zclasses/lib/python/ZClasses/Basic.py 2005-04-01 11:24:20 UTC (rev 29771)
+++ Zope/branches/jim-fix-zclasses/lib/python/ZClasses/Basic.py 2005-04-01 11:24:22 UTC (rev 29772)
@@ -64,7 +64,7 @@
def classIcon(self): return self.getClassAttr('icon','')
- def show_class_id(self): return Globals.DatabaseVersion=='3'
+ def show_class_id(self): return True
def class_id(self):
return (self.getClassAttr('__module__','') or '')[1:]
Modified: Zope/branches/jim-fix-zclasses/lib/python/ZClasses/ZClass.py
===================================================================
--- Zope/branches/jim-fix-zclasses/lib/python/ZClasses/ZClass.py 2005-04-01 11:24:20 UTC (rev 29771)
+++ Zope/branches/jim-fix-zclasses/lib/python/ZClasses/ZClass.py 2005-04-01 11:24:22 UTC (rev 29772)
@@ -126,12 +126,6 @@
continue
raise AttributeError, name
-def dbVersionEquals(ver):
- # A helper function to isolate db version checking.
- return hasattr(Globals, 'DatabaseVersion') and \
- Globals.DatabaseVersion == ver
-
-
bad_id=re.compile('[^a-zA-Z0-9_]').search
def manage_addZClass(self, id, title='', baseclasses=[],
@@ -139,6 +133,7 @@
zope_object=0):
"""Add a Z Class
"""
+
if bad_id(id) is not None:
raise BadRequest, (
'The id %s is invalid as a class name.' % id)
@@ -351,8 +346,6 @@
changeClassId__roles__ = () # Private
def changeClassId(self, newid=None):
- if not dbVersionEquals('3'):
- return
if newid is None: newid=self._new_class_id()
self._unregister()
if newid:
@@ -427,16 +420,12 @@
self.propertysheets.methods.manage_afterClone(item)
def manage_afterAdd(self, item, container):
- if not dbVersionEquals('3'):
- return
if not self._zclass_.__module__:
self.setClassAttr('__module__', self._new_class_id())
self._register()
self.propertysheets.methods.manage_afterAdd(item, container)
def manage_beforeDelete(self, item, container):
- if not dbVersionEquals('3'):
- return
self._unregister()
self.propertysheets.methods.manage_beforeDelete(item, container)
Modified: Zope/branches/jim-fix-zclasses/lib/python/Zope2/App/startup.py
===================================================================
--- Zope/branches/jim-fix-zclasses/lib/python/Zope2/App/startup.py 2005-04-01 11:24:20 UTC (rev 29771)
+++ Zope/branches/jim-fix-zclasses/lib/python/Zope2/App/startup.py 2005-04-01 11:24:22 UTC (rev 29772)
@@ -40,8 +40,6 @@
def startup():
global app
- Globals.DatabaseVersion='3'
-
# Import products
OFS.Application.import_products()
More information about the Zope-Checkins
mailing list