[z3-checkins] r26100 - z3/sqlos/trunk/src/sqlos

jinty at codespeak.net jinty at codespeak.net
Fri Apr 21 15:23:02 CEST 2006


Author: jinty
Date: Fri Apr 21 15:22:59 2006
New Revision: 26100

Modified:
   z3/sqlos/trunk/src/sqlos/__init__.py
Log:
Remove cruft and deprecated code. Also drop an XXX for untested code.

Modified: z3/sqlos/trunk/src/sqlos/__init__.py
==============================================================================
--- z3/sqlos/trunk/src/sqlos/__init__.py	(original)
+++ z3/sqlos/trunk/src/sqlos/__init__.py	Fri Apr 21 15:22:59 2006
@@ -10,10 +10,7 @@
 $Id$
 """
 
-__metaclass__ = type
-
 from datetime import datetime, date
-import zope.component
 from sqlobject.sqlbuilder import registerConverter
 
 # sqlos.SQLOS is softly deprecated, will go away sometime
@@ -21,14 +18,8 @@
 # import directly from sqlos.zsqlobject
 from sqlos.zsqlobject import SQLOS
 
-def caller(n=1):
-    """Return the name of the calling function n levels up in the frame stack.
-    Ex: caller(0) ==> 'caller'; def f(): return caller(); f() ==> 'f'
-    """
-    import inspect
-    return inspect.getouterframes(inspect.currentframe())[n][3]
-
 
+## XXX: What are these?? I am sure there are no tests for them. - jinty
 def DateTimeConverter(value, db=None):
     return repr(value.isoformat())
 
@@ -40,19 +31,3 @@
     return repr(value.isoformat())
 
 registerConverter(date, DateConverter)
-
-
-def getFactory(name, context=None, default=None):
-    # XXX - deprecated, goes away after sqlos 0.2
-    return zope.component.queryUtility(IISQLObject, name, default=default, context=context)
-
-from zope.deprecation import deprecated
-msg = "getFactory is depreciated and will go away after sqlos 0.2 you should \
-replace this with a direct call to \
-zope.component.getUtility(IISQLObject, name, context=context) if you need the \
-functionailty of a SQLObject class, or \
-zope.component.getUtility(IFactory, name, context=context) if you want to use it as a \
-factory."
-
-deprecated("getFactory", msg)
-deprecated("caller", "sqlos.caller is deprecated and will be removed after sqlos 0.2")


More information about the z3-checkins mailing list