[CMF-checkins] SVN: CMF/trunk/ - fix up a lot of unused imports, some double imports and a few hidden

Jens Vagelpohl jens at dataflake.org
Thu Mar 15 12:10:52 EDT 2007


Log message for revision 73194:
  - fix up a lot of unused imports, some double imports and a few hidden
    undefined names, found by Pyflakes
  

Changed:
  U   CMF/trunk/CMFActionIcons/exportimport.py
  U   CMF/trunk/CMFActionIcons/interfaces/_tools.py
  U   CMF/trunk/CMFCalendar/browser/event.py
  U   CMF/trunk/CMFCalendar/interfaces/_content.py
  U   CMF/trunk/CMFCalendar/interfaces/_tools.py
  U   CMF/trunk/CMFCore/ActionInformation.py
  U   CMF/trunk/CMFCore/DiscussionTool.py
  U   CMF/trunk/CMFCore/FSDTMLMethod.py
  U   CMF/trunk/CMFCore/FSPropertiesObject.py
  U   CMF/trunk/CMFCore/FSSTXMethod.py
  U   CMF/trunk/CMFCore/exportimport/actions.py
  U   CMF/trunk/CMFCore/exportimport/cachingpolicymgr.py
  U   CMF/trunk/CMFCore/exportimport/catalog.py
  U   CMF/trunk/CMFCore/exportimport/content.py
  U   CMF/trunk/CMFCore/exportimport/contenttyperegistry.py
  U   CMF/trunk/CMFCore/exportimport/cookieauth.py
  U   CMF/trunk/CMFCore/exportimport/skins.py
  U   CMF/trunk/CMFCore/exportimport/tests/test_cookieauth.py
  U   CMF/trunk/CMFCore/exportimport/tests/test_typeinfo.py
  U   CMF/trunk/CMFCore/fiveactionstool.py
  U   CMF/trunk/CMFCore/interfaces/_content.py
  U   CMF/trunk/CMFCore/tests/base/testcase.py
  U   CMF/trunk/CMFCore/tests/test_CachingPolicyManager.py
  U   CMF/trunk/CMFCore/tests/test_CatalogTool.py
  U   CMF/trunk/CMFCore/tests/test_FSReSTMethod.py
  U   CMF/trunk/CMFCore/tests/test_FSSTXMethod.py
  U   CMF/trunk/CMFCore/tests/test_FSSecurity.py
  U   CMF/trunk/CMFCore/tests/test_MemberDataTool.py
  U   CMF/trunk/CMFCore/tests/test_MembershipTool.py
  U   CMF/trunk/CMFCore/tests/test_SkinsTool.py
  U   CMF/trunk/CMFCore/tests/test_TypesTool.py
  U   CMF/trunk/CMFCore/utils.py
  U   CMF/trunk/CMFDefault/DiscussionTool.py
  U   CMF/trunk/CMFDefault/MetadataTool.py
  U   CMF/trunk/CMFDefault/NewsItem.py
  U   CMF/trunk/CMFDefault/RegistrationTool.py
  U   CMF/trunk/CMFDefault/SyndicationTool.py
  U   CMF/trunk/CMFDefault/formlib/widgets.py
  U   CMF/trunk/CMFDefault/interfaces/_content.py
  U   CMF/trunk/CMFDefault/tests/test_Document.py
  U   CMF/trunk/CMFDefault/tests/test_MembershipTool.py
  U   CMF/trunk/CMFDefault/tests/test_MetadataTool.py
  U   CMF/trunk/CMFUid/interfaces.py
  U   CMF/trunk/CMFUid/tests/test_uidhandling.py
  U   CMF/trunk/DCWorkflow/interfaces.py
  U   CMF/trunk/DCWorkflow/tests/test_exportimport.py
  U   CMF/trunk/functest/creator/scaffolding.py
  U   CMF/trunk/functest/visitor/scaffolding.py
  U   CMF/trunk/slurp_release.py

-=-
Modified: CMF/trunk/CMFActionIcons/exportimport.py
===================================================================
--- CMF/trunk/CMFActionIcons/exportimport.py	2007-03-15 14:56:17 UTC (rev 73193)
+++ CMF/trunk/CMFActionIcons/exportimport.py	2007-03-15 16:10:50 UTC (rev 73194)
@@ -23,8 +23,6 @@
 from Products.PageTemplates.PageTemplateFile import PageTemplateFile
 
 from zope.component import getSiteManager
-from zope.component import getUtility
-from zope.component import queryUtility
 
 from Products.GenericSetup.utils import CONVERTER
 from Products.GenericSetup.utils import DEFAULT

Modified: CMF/trunk/CMFActionIcons/interfaces/_tools.py
===================================================================
--- CMF/trunk/CMFActionIcons/interfaces/_tools.py	2007-03-15 14:56:17 UTC (rev 73193)
+++ CMF/trunk/CMFActionIcons/interfaces/_tools.py	2007-03-15 16:10:50 UTC (rev 73194)
@@ -16,7 +16,6 @@
 """
 
 from zope.interface import Interface
-from zope.interface import Attribute
 
 
 class IActionIconsTool(Interface):

Modified: CMF/trunk/CMFCalendar/browser/event.py
===================================================================
--- CMF/trunk/CMFCalendar/browser/event.py	2007-03-15 14:56:17 UTC (rev 73193)
+++ CMF/trunk/CMFCalendar/browser/event.py	2007-03-15 16:10:50 UTC (rev 73194)
@@ -24,9 +24,7 @@
 from zope.interface import Interface
 from zope.schema import Choice
 from zope.schema import Datetime
-from zope.schema import Field
 from zope.schema import Set
-from zope.schema import Tuple
 from zope.schema import Text
 from zope.schema import TextLine
 from zope.schema import URI

Modified: CMF/trunk/CMFCalendar/interfaces/_content.py
===================================================================
--- CMF/trunk/CMFCalendar/interfaces/_content.py	2007-03-15 14:56:17 UTC (rev 73193)
+++ CMF/trunk/CMFCalendar/interfaces/_content.py	2007-03-15 16:10:50 UTC (rev 73194)
@@ -16,7 +16,6 @@
 """
 
 from zope.interface import Interface
-from zope.interface import Attribute
 
 
 class IEvent(Interface):

Modified: CMF/trunk/CMFCalendar/interfaces/_tools.py
===================================================================
--- CMF/trunk/CMFCalendar/interfaces/_tools.py	2007-03-15 14:56:17 UTC (rev 73193)
+++ CMF/trunk/CMFCalendar/interfaces/_tools.py	2007-03-15 16:10:50 UTC (rev 73194)
@@ -16,7 +16,6 @@
 """
 
 from zope.interface import Interface
-from zope.interface import Attribute
 
 
 class ICalendarTool(Interface):

Modified: CMF/trunk/CMFCore/ActionInformation.py
===================================================================
--- CMF/trunk/CMFCore/ActionInformation.py	2007-03-15 14:56:17 UTC (rev 73193)
+++ CMF/trunk/CMFCore/ActionInformation.py	2007-03-15 16:10:50 UTC (rev 73194)
@@ -37,7 +37,6 @@
 from interfaces.portal_actions import ActionInfo as z2IActionInfo
 from permissions import View
 from utils import _checkPermission
-from utils import _wwwdir
 
 
 _unchanged = [] # marker

Modified: CMF/trunk/CMFCore/DiscussionTool.py
===================================================================
--- CMF/trunk/CMFCore/DiscussionTool.py	2007-03-15 14:56:17 UTC (rev 73193)
+++ CMF/trunk/CMFCore/DiscussionTool.py	2007-03-15 16:10:50 UTC (rev 73194)
@@ -15,10 +15,14 @@
 $Id$
 """
 
-from OFS.SimpleItem import SimpleItem
-from Globals import InitializeClass, DTMLFile
+import urllib
+
 from Acquisition import Implicit
 from AccessControl import ClassSecurityInfo
+from DateTime.DateTime import DateTime
+from Globals import DTMLFile
+from Globals import InitializeClass
+from OFS.SimpleItem import SimpleItem
 
 from zope.component import getUtility
 from zope.interface import implements

Modified: CMF/trunk/CMFCore/FSDTMLMethod.py
===================================================================
--- CMF/trunk/CMFCore/FSDTMLMethod.py	2007-03-15 14:56:17 UTC (rev 73193)
+++ CMF/trunk/CMFCore/FSDTMLMethod.py	2007-03-15 16:10:50 UTC (rev 73194)
@@ -176,7 +176,7 @@
         '''
         ks = []
         for key in keys:
-            key = strip(str(key))
+            key = str(key).strip()
             if key:
                 ks.append(key)
         self._cache_namespace_keys = tuple(ks)

Modified: CMF/trunk/CMFCore/FSPropertiesObject.py
===================================================================
--- CMF/trunk/CMFCore/FSPropertiesObject.py	2007-03-15 14:56:17 UTC (rev 73193)
+++ CMF/trunk/CMFCore/FSPropertiesObject.py	2007-03-15 16:10:50 UTC (rev 73194)
@@ -123,7 +123,7 @@
                             })
             except:
                 raise ValueError, ( 'Error processing line %s of %s:\n%s'
-                                  % (lino,fp,line) )
+                                  % (lino,self._filepath,line) )
         self._properties = tuple(map)
 
     if Globals.DevelopmentMode:

Modified: CMF/trunk/CMFCore/FSSTXMethod.py
===================================================================
--- CMF/trunk/CMFCore/FSSTXMethod.py	2007-03-15 14:56:17 UTC (rev 73193)
+++ CMF/trunk/CMFCore/FSSTXMethod.py	2007-03-15 16:10:50 UTC (rev 73194)
@@ -19,7 +19,6 @@
 from AccessControl import ClassSecurityInfo
 from DocumentTemplate.DT_HTML import HTML as DTML_HTML
 from Globals import DTMLFile
-from Globals import HTML as Global_HTML
 from Globals import InitializeClass
 from OFS.DTMLDocument import DTMLDocument
 from StructuredText.StructuredText import HTML as STX_HTML

Modified: CMF/trunk/CMFCore/exportimport/actions.py
===================================================================
--- CMF/trunk/CMFCore/exportimport/actions.py	2007-03-15 14:56:17 UTC (rev 73193)
+++ CMF/trunk/CMFCore/exportimport/actions.py	2007-03-15 16:10:50 UTC (rev 73194)
@@ -35,7 +35,6 @@
 from zope.component import adapts
 from zope.component import getUtility
 from zope.component import getSiteManager
-from zope.component import queryUtility
 
 _SPECIAL_PROVIDERS = ('portal_actions', 'portal_types', 'portal_workflow')
 

Modified: CMF/trunk/CMFCore/exportimport/cachingpolicymgr.py
===================================================================
--- CMF/trunk/CMFCore/exportimport/cachingpolicymgr.py	2007-03-15 14:56:17 UTC (rev 73193)
+++ CMF/trunk/CMFCore/exportimport/cachingpolicymgr.py	2007-03-15 16:10:50 UTC (rev 73194)
@@ -16,10 +16,8 @@
 """
 
 from zope.component import adapts
-from zope.component import getUtility
 from zope.component import getSiteManager
 from zope.component import queryMultiAdapter
-from zope.component import queryUtility
 
 from Products.GenericSetup.interfaces import INode
 from Products.GenericSetup.interfaces import ISetupEnviron

Modified: CMF/trunk/CMFCore/exportimport/catalog.py
===================================================================
--- CMF/trunk/CMFCore/exportimport/catalog.py	2007-03-15 14:56:17 UTC (rev 73193)
+++ CMF/trunk/CMFCore/exportimport/catalog.py	2007-03-15 16:10:50 UTC (rev 73194)
@@ -20,8 +20,6 @@
 from Products.GenericSetup.utils import importObjects
 
 from zope.component import getSiteManager
-from zope.component import getUtility
-from zope.component import queryUtility
 
 
 def importCatalogTool(context):

Modified: CMF/trunk/CMFCore/exportimport/content.py
===================================================================
--- CMF/trunk/CMFCore/exportimport/content.py	2007-03-15 14:56:17 UTC (rev 73193)
+++ CMF/trunk/CMFCore/exportimport/content.py	2007-03-15 16:10:50 UTC (rev 73194)
@@ -16,14 +16,12 @@
 """
 
 from csv import reader
-from csv import register_dialect
 from csv import writer
 from ConfigParser import ConfigParser
 from StringIO import StringIO
 
 from zope.component import getUtility
 from zope.interface import implements
-from zope.interface import directlyProvides
 
 from Products.GenericSetup.interfaces import IFilesystemExporter
 from Products.GenericSetup.interfaces import IFilesystemImporter

Modified: CMF/trunk/CMFCore/exportimport/contenttyperegistry.py
===================================================================
--- CMF/trunk/CMFCore/exportimport/contenttyperegistry.py	2007-03-15 14:56:17 UTC (rev 73193)
+++ CMF/trunk/CMFCore/exportimport/contenttyperegistry.py	2007-03-15 16:10:50 UTC (rev 73194)
@@ -17,8 +17,6 @@
 
 from zope.component import adapts
 from zope.component import getSiteManager
-from zope.component import getUtility
-from zope.component import queryUtility
 
 from Products.CMFCore.interfaces import IContentTypeRegistry
 from Products.GenericSetup.interfaces import ISetupEnviron
@@ -26,9 +24,7 @@
 from Products.GenericSetup.utils import importObjects
 from Products.GenericSetup.utils import XMLAdapterBase
 
-from Products.CMFCore.interfaces import IContentTypeRegistry
 
-
 class ContentTypeRegistryXMLAdapter(XMLAdapterBase):
 
     """XML im- and exporter for ContentTypeRegistry.

Modified: CMF/trunk/CMFCore/exportimport/cookieauth.py
===================================================================
--- CMF/trunk/CMFCore/exportimport/cookieauth.py	2007-03-15 14:56:17 UTC (rev 73193)
+++ CMF/trunk/CMFCore/exportimport/cookieauth.py	2007-03-15 16:10:50 UTC (rev 73194)
@@ -17,7 +17,6 @@
 
 from zope.component import adapts
 from zope.component import getSiteManager
-from zope.component import getUtility
 from zope.component import queryUtility
 
 from Products.GenericSetup.interfaces import ISetupEnviron

Modified: CMF/trunk/CMFCore/exportimport/skins.py
===================================================================
--- CMF/trunk/CMFCore/exportimport/skins.py	2007-03-15 14:56:17 UTC (rev 73193)
+++ CMF/trunk/CMFCore/exportimport/skins.py	2007-03-15 16:10:50 UTC (rev 73194)
@@ -20,8 +20,6 @@
 
 from zope.component import adapts
 from zope.component import getSiteManager
-from zope.component import getUtility
-from zope.component import queryUtility
 
 from Products.GenericSetup.interfaces import ISetupEnviron
 from Products.GenericSetup.utils import exportObjects

Modified: CMF/trunk/CMFCore/exportimport/tests/test_cookieauth.py
===================================================================
--- CMF/trunk/CMFCore/exportimport/tests/test_cookieauth.py	2007-03-15 14:56:17 UTC (rev 73193)
+++ CMF/trunk/CMFCore/exportimport/tests/test_cookieauth.py	2007-03-15 16:10:50 UTC (rev 73194)
@@ -91,8 +91,6 @@
         return CookieCrumblerXMLAdapter
 
     def setUp(self):
-        from Products.CMFCore.CookieCrumbler import CookieCrumbler
-
         BodyAdapterTestCase.setUp(self)
         self._obj = CookieCrumbler('foo_cookiecrumbler')
         self._BODY = _COOKIECRUMBLER_BODY

Modified: CMF/trunk/CMFCore/exportimport/tests/test_typeinfo.py
===================================================================
--- CMF/trunk/CMFCore/exportimport/tests/test_typeinfo.py	2007-03-15 14:56:17 UTC (rev 73193)
+++ CMF/trunk/CMFCore/exportimport/tests/test_typeinfo.py	2007-03-15 16:10:50 UTC (rev 73194)
@@ -291,8 +291,6 @@
         self.assertEqual(obj._actions[0].condition.text, 'python:1')
 
     def setUp(self):
-        from Products.CMFCore.TypesTool import FactoryTypeInformation
-
         BodyAdapterTestCase.setUp(self)
         self._obj = FactoryTypeInformation('foo_fti')
         self._BODY = _FTI_BODY
@@ -309,13 +307,9 @@
         return TypesToolXMLAdapter
 
     def _populate(self, obj):
-        from Products.CMFCore.TypesTool import FactoryTypeInformation
-
         obj._setObject('foo_type', FactoryTypeInformation('foo_type'))
 
     def setUp(self):
-        from Products.CMFCore.TypesTool import TypesTool
-
         BodyAdapterTestCase.setUp(self)
         self._obj = TypesTool()
         self._BODY = _TYPESTOOL_BODY

Modified: CMF/trunk/CMFCore/fiveactionstool.py
===================================================================
--- CMF/trunk/CMFCore/fiveactionstool.py	2007-03-15 14:56:17 UTC (rev 73193)
+++ CMF/trunk/CMFCore/fiveactionstool.py	2007-03-15 16:10:50 UTC (rev 73194)
@@ -18,7 +18,6 @@
 from AccessControl import ClassSecurityInfo
 from Globals import InitializeClass
 from OFS.SimpleItem import SimpleItem
-from Products.Five import security
 from zope.app.publisher.interfaces.browser import IBrowserMenu
 from zope.app.publisher.browser.menu import getMenu
 from zope.component import getUtilitiesFor

Modified: CMF/trunk/CMFCore/interfaces/_content.py
===================================================================
--- CMF/trunk/CMFCore/interfaces/_content.py	2007-03-15 14:56:17 UTC (rev 73193)
+++ CMF/trunk/CMFCore/interfaces/_content.py	2007-03-15 16:10:50 UTC (rev 73194)
@@ -16,7 +16,6 @@
 """
 
 from zope.interface import Interface
-from zope.interface import Attribute
 
 
 #

Modified: CMF/trunk/CMFCore/tests/base/testcase.py
===================================================================
--- CMF/trunk/CMFCore/tests/base/testcase.py	2007-03-15 14:56:17 UTC (rev 73193)
+++ CMF/trunk/CMFCore/tests/base/testcase.py	2007-03-15 16:10:50 UTC (rev 73194)
@@ -65,7 +65,6 @@
         if self._old_stderr is not None:
             return
 
-        import sys
         from StringIO import StringIO
 
         self._old_stderr = sys.stderr
@@ -76,7 +75,6 @@
         if self._old_stderr is None:
             return
 
-        import sys
         sys.stderr = self._old_stderr
 
 

Modified: CMF/trunk/CMFCore/tests/test_CachingPolicyManager.py
===================================================================
--- CMF/trunk/CMFCore/tests/test_CachingPolicyManager.py	2007-03-15 14:56:17 UTC (rev 73193)
+++ CMF/trunk/CMFCore/tests/test_CachingPolicyManager.py	2007-03-15 16:10:50 UTC (rev 73194)
@@ -37,7 +37,6 @@
 from Products.CMFCore.tests.base.dummy import DummyContent
 from Products.CMFCore.tests.base.dummy import DummySite
 from Products.CMFCore.tests.base.dummy import DummyTool
-from Products.CMFCore.tests.base.dummy import DummyUserFolder
 from Products.CMFCore.tests.base.testcase import FSDVTest
 from Products.CMFCore.tests.base.testcase import RequestTest
 from Products.CMFCore.interfaces import ICachingPolicyManager
@@ -453,7 +452,6 @@
     def test_z3interfaces(self):
         from zope.interface.verify import verifyClass
         from Products.CMFCore.CachingPolicyManager import CachingPolicyManager
-        from Products.CMFCore.interfaces import ICachingPolicyManager
 
         verifyClass(ICachingPolicyManager, CachingPolicyManager)
 

Modified: CMF/trunk/CMFCore/tests/test_CatalogTool.py
===================================================================
--- CMF/trunk/CMFCore/tests/test_CatalogTool.py	2007-03-15 14:56:17 UTC (rev 73193)
+++ CMF/trunk/CMFCore/tests/test_CatalogTool.py	2007-03-15 16:10:50 UTC (rev 73194)
@@ -19,7 +19,6 @@
 import Testing
 
 from AccessControl.SecurityManagement import newSecurityManager
-from AccessControl.SecurityManagement import noSecurityManager
 from DateTime import DateTime
 
 from Products.CMFCore.tests.base.dummy import DummyContent

Modified: CMF/trunk/CMFCore/tests/test_FSReSTMethod.py
===================================================================
--- CMF/trunk/CMFCore/tests/test_FSReSTMethod.py	2007-03-15 14:56:17 UTC (rev 73193)
+++ CMF/trunk/CMFCore/tests/test_FSReSTMethod.py	2007-03-15 16:10:50 UTC (rev 73194)
@@ -134,7 +134,6 @@
         from webdav.common import rfc1123_date
         from Products.CMFCore.tests.base.dummy \
             import DummyCachingManagerWithPolicy
-        from Products.CMFCore.tests.base.dummy import DummyContent
 
         mod_time = DateTime()
         self.root.caching_policy_manager = DummyCachingManagerWithPolicy()

Modified: CMF/trunk/CMFCore/tests/test_FSSTXMethod.py
===================================================================
--- CMF/trunk/CMFCore/tests/test_FSSTXMethod.py	2007-03-15 14:56:17 UTC (rev 73193)
+++ CMF/trunk/CMFCore/tests/test_FSSTXMethod.py	2007-03-15 16:10:50 UTC (rev 73194)
@@ -164,7 +164,6 @@
         from webdav.common import rfc1123_date
         from Products.CMFCore.tests.base.dummy \
             import DummyCachingManagerWithPolicy
-        from Products.CMFCore.tests.base.dummy import DummyContent
 
         mod_time = DateTime()
         self.root.caching_policy_manager = DummyCachingManagerWithPolicy()

Modified: CMF/trunk/CMFCore/tests/test_FSSecurity.py
===================================================================
--- CMF/trunk/CMFCore/tests/test_FSSecurity.py	2007-03-15 14:56:17 UTC (rev 73193)
+++ CMF/trunk/CMFCore/tests/test_FSSecurity.py	2007-03-15 16:10:50 UTC (rev 73194)
@@ -49,8 +49,8 @@
                 self.assertEqual((acquire, expected), (acquired, got))
                 happy = 1
         if not happy:
-            raise ValueError("'%s' not found in permissions: %s"
-                             % (permissionname, all_names))
+            raise ValueError("'%s' not found in inherited permissions."
+                             % permissionname)
 
     def setUp( self ):
         # initialise skins

Modified: CMF/trunk/CMFCore/tests/test_MemberDataTool.py
===================================================================
--- CMF/trunk/CMFCore/tests/test_MemberDataTool.py	2007-03-15 14:56:17 UTC (rev 73193)
+++ CMF/trunk/CMFCore/tests/test_MemberDataTool.py	2007-03-15 16:10:50 UTC (rev 73194)
@@ -93,7 +93,6 @@
     def test_z3interfaces(self):
         from zope.interface.verify import verifyClass
         from Products.CMFCore.interfaces import IActionProvider
-        from Products.CMFCore.interfaces import IMemberDataTool
         from Products.CMFCore.MemberDataTool import MemberDataTool
 
         verifyClass(IActionProvider, MemberDataTool)

Modified: CMF/trunk/CMFCore/tests/test_MembershipTool.py
===================================================================
--- CMF/trunk/CMFCore/tests/test_MembershipTool.py	2007-03-15 14:56:17 UTC (rev 73193)
+++ CMF/trunk/CMFCore/tests/test_MembershipTool.py	2007-03-15 16:10:50 UTC (rev 73194)
@@ -28,7 +28,6 @@
 from Products.CMFCore.PortalFolder import PortalFolder
 from Products.CMFCore.interfaces import IMemberDataTool
 from Products.CMFCore.interfaces import ISiteRoot
-from Products.CMFCore.interfaces import IURLTool
 from Products.CMFCore.tests.base.dummy import DummySite
 from Products.CMFCore.tests.base.dummy import DummyTool
 from Products.CMFCore.tests.base.dummy import DummyUserFolder

Modified: CMF/trunk/CMFCore/tests/test_SkinsTool.py
===================================================================
--- CMF/trunk/CMFCore/tests/test_SkinsTool.py	2007-03-15 14:56:17 UTC (rev 73193)
+++ CMF/trunk/CMFCore/tests/test_SkinsTool.py	2007-03-15 16:10:50 UTC (rev 73194)
@@ -66,7 +66,6 @@
         from zope.interface.verify import verifyClass
         from Products.CMFCore.interfaces import IActionProvider
         from Products.CMFCore.interfaces import ISkinsContainer
-        from Products.CMFCore.interfaces import ISkinsTool
         from Products.CMFCore.SkinsTool import SkinsTool
 
         verifyClass(IActionProvider, SkinsTool)

Modified: CMF/trunk/CMFCore/tests/test_TypesTool.py
===================================================================
--- CMF/trunk/CMFCore/tests/test_TypesTool.py	2007-03-15 14:56:17 UTC (rev 73193)
+++ CMF/trunk/CMFCore/tests/test_TypesTool.py	2007-03-15 16:10:50 UTC (rev 73194)
@@ -36,7 +36,6 @@
 from Products.CMFCore.tests.base.dummy import DummyFactory
 from Products.CMFCore.tests.base.dummy import DummyFactoryDispatcher
 from Products.CMFCore.tests.base.dummy import DummyFolder
-from Products.CMFCore.tests.base.dummy import DummyObject
 from Products.CMFCore.tests.base.dummy import DummySite
 from Products.CMFCore.tests.base.dummy import DummyUserFolder
 from Products.CMFCore.tests.base.security import OmnipotentUser

Modified: CMF/trunk/CMFCore/utils.py
===================================================================
--- CMF/trunk/CMFCore/utils.py	2007-03-15 14:56:17 UTC (rev 73193)
+++ CMF/trunk/CMFCore/utils.py	2007-03-15 16:10:50 UTC (rev 73194)
@@ -29,7 +29,6 @@
 from AccessControl.PermissionRole import rolesForPermissionOn
 from AccessControl.Role import gather_permissions
 from Acquisition import aq_get
-from Acquisition import aq_inner
 from Acquisition import aq_parent
 from Acquisition import Implicit
 from DateTime import DateTime

Modified: CMF/trunk/CMFDefault/DiscussionTool.py
===================================================================
--- CMF/trunk/CMFDefault/DiscussionTool.py	2007-03-15 14:56:17 UTC (rev 73193)
+++ CMF/trunk/CMFDefault/DiscussionTool.py	2007-03-15 16:10:50 UTC (rev 73194)
@@ -41,7 +41,6 @@
 from exceptions import DiscussionNotAllowed
 from permissions import ManagePortal
 from permissions import ModifyPortalContent
-from permissions import ReplyToItem
 from utils import _dtmldir
 
 

Modified: CMF/trunk/CMFDefault/MetadataTool.py
===================================================================
--- CMF/trunk/CMFDefault/MetadataTool.py	2007-03-15 14:56:17 UTC (rev 73193)
+++ CMF/trunk/CMFDefault/MetadataTool.py	2007-03-15 16:10:50 UTC (rev 73194)
@@ -16,7 +16,6 @@
 """
 
 from AccessControl import ClassSecurityInfo
-from AccessControl import getSecurityManager
 from Globals import DTMLFile
 from Globals import InitializeClass
 from Globals import PersistentMapping

Modified: CMF/trunk/CMFDefault/NewsItem.py
===================================================================
--- CMF/trunk/CMFDefault/NewsItem.py	2007-03-15 14:56:17 UTC (rev 73193)
+++ CMF/trunk/CMFDefault/NewsItem.py	2007-03-15 16:10:50 UTC (rev 73194)
@@ -24,7 +24,6 @@
 from interfaces import IMutableNewsItem
 from interfaces import INewsItem
 from permissions import ModifyPortalContent
-from permissions import View
 
 
 def addNewsItem( self

Modified: CMF/trunk/CMFDefault/RegistrationTool.py
===================================================================
--- CMF/trunk/CMFDefault/RegistrationTool.py	2007-03-15 14:56:17 UTC (rev 73193)
+++ CMF/trunk/CMFDefault/RegistrationTool.py	2007-03-15 16:10:50 UTC (rev 73194)
@@ -53,7 +53,7 @@
         # the template will be made with a blank To:, this is bad
         if email is None:
             msg = _(u'No email address is registered for member: '
-                    u'${member_id}', mapping={'member_id': new_member_id})
+                    u'${member_id}', mapping={'member_id': member.getId()})
             raise ValueError(msg)
 
         checkEmailAddress(email)

Modified: CMF/trunk/CMFDefault/SyndicationTool.py
===================================================================
--- CMF/trunk/CMFDefault/SyndicationTool.py	2007-03-15 14:56:17 UTC (rev 73193)
+++ CMF/trunk/CMFDefault/SyndicationTool.py	2007-03-15 16:10:50 UTC (rev 73194)
@@ -361,7 +361,7 @@
             raise 'Syndication is not Allowed'
 
         if obj is None:
-            when = syUpdateBase
+            when = self.syUpdateBase
             return when.HTML4()
 
         syInfo = getattr(obj, 'syndication_information',

Modified: CMF/trunk/CMFDefault/formlib/widgets.py
===================================================================
--- CMF/trunk/CMFDefault/formlib/widgets.py	2007-03-15 14:56:17 UTC (rev 73193)
+++ CMF/trunk/CMFDefault/formlib/widgets.py	2007-03-15 16:10:50 UTC (rev 73194)
@@ -32,7 +32,6 @@
 from zope.schema import Tuple
 from zope.schema.interfaces import ISet
 from zope.schema.interfaces import ITuple
-from zope.schema.interfaces import ITextLine
 
 from Products.CMFCore.interfaces import IMetadataTool
 from Products.CMFDefault.exceptions import IllegalHTML

Modified: CMF/trunk/CMFDefault/interfaces/_content.py
===================================================================
--- CMF/trunk/CMFDefault/interfaces/_content.py	2007-03-15 14:56:17 UTC (rev 73193)
+++ CMF/trunk/CMFDefault/interfaces/_content.py	2007-03-15 16:10:50 UTC (rev 73194)
@@ -16,7 +16,6 @@
 """
 
 from zope.interface import Interface
-from zope.interface import Attribute
 
 
 class IDocument(Interface):

Modified: CMF/trunk/CMFDefault/tests/test_Document.py
===================================================================
--- CMF/trunk/CMFDefault/tests/test_Document.py	2007-03-15 14:56:17 UTC (rev 73193)
+++ CMF/trunk/CMFDefault/tests/test_Document.py	2007-03-15 16:10:50 UTC (rev 73194)
@@ -34,7 +34,6 @@
 from Products.CMFCore.tests.base.content import ENTITY_IN_TITLE
 from Products.CMFCore.tests.base.content import FAUX_HTML_LEADING_TEXT
 from Products.CMFCore.tests.base.content import HTML_TEMPLATE
-from Products.CMFCore.tests.base.content import SIMPLE_HTML
 from Products.CMFCore.tests.base.content import SIMPLE_STRUCTUREDTEXT
 from Products.CMFCore.tests.base.content import SIMPLE_XHTML
 from Products.CMFCore.tests.base.content import STX_NO_HEADERS

Modified: CMF/trunk/CMFDefault/tests/test_MembershipTool.py
===================================================================
--- CMF/trunk/CMFDefault/tests/test_MembershipTool.py	2007-03-15 14:56:17 UTC (rev 73193)
+++ CMF/trunk/CMFDefault/tests/test_MembershipTool.py	2007-03-15 16:10:50 UTC (rev 73194)
@@ -24,7 +24,6 @@
 from zope.testing.cleanup import cleanUp
 
 from Products.CMFCore.interfaces import IConfigurableWorkflowTool
-from Products.CMFCore.interfaces import IMembershipTool
 from Products.CMFCore.PortalFolder import PortalFolder
 from Products.CMFCore.tests.base.dummy import DummyFolder
 from Products.CMFCore.tests.base.dummy import DummySite

Modified: CMF/trunk/CMFDefault/tests/test_MetadataTool.py
===================================================================
--- CMF/trunk/CMFDefault/tests/test_MetadataTool.py	2007-03-15 14:56:17 UTC (rev 73193)
+++ CMF/trunk/CMFDefault/tests/test_MetadataTool.py	2007-03-15 16:10:50 UTC (rev 73194)
@@ -389,8 +389,6 @@
         self.assertRaises( MetadataError, tool.setInitialMetadata, foo )
 
     def test_initialValues_explicit_mutliple_types( self ):
-        from Products.CMFDefault.exceptions import MetadataError
-
         tool = self._makeOne()
         dcmi = tool.DCMI
         foo, bar = self._makeTestObjects()
@@ -497,7 +495,6 @@
     def test_migration( self ):
         # Test that we forward-migrate old-style DCMI policies.
         from Products.CMFDefault.MetadataTool import ElementSpec
-        from Products.CMFDefault.MetadataTool import _DCMI_ELEMENT_SPECS
 
         tool = self._makeOne()
         tool.element_specs = { 'Title' : ElementSpec( 0 )

Modified: CMF/trunk/CMFUid/interfaces.py
===================================================================
--- CMF/trunk/CMFUid/interfaces.py	2007-03-15 14:56:17 UTC (rev 73193)
+++ CMF/trunk/CMFUid/interfaces.py	2007-03-15 16:10:50 UTC (rev 73194)
@@ -20,7 +20,6 @@
 """
 
 from zope.interface import Interface
-from zope.interface import Attribute
 
 from Products.CMFCore.interfaces import ICallableOpaqueItem
 from Products.CMFCore.interfaces import ICallableOpaqueItemEvents

Modified: CMF/trunk/CMFUid/tests/test_uidhandling.py
===================================================================
--- CMF/trunk/CMFUid/tests/test_uidhandling.py	2007-03-15 14:56:17 UTC (rev 73193)
+++ CMF/trunk/CMFUid/tests/test_uidhandling.py	2007-03-15 16:10:50 UTC (rev 73194)
@@ -24,7 +24,6 @@
 from Products.CMFCore.interfaces import ICatalogTool
 from Products.CMFCore.tests.base.dummy import DummyContent
 from Products.CMFCore.tests.base.dummy import DummyFolder
-from Products.CMFCore.tests.base.dummy import DummySite
 from Products.CMFCore.tests.base.testcase import SecurityTest
 from Products.CMFUid.interfaces import IUniqueIdAnnotationManagement
 from Products.CMFUid.interfaces import IUniqueIdGenerator

Modified: CMF/trunk/DCWorkflow/interfaces.py
===================================================================
--- CMF/trunk/DCWorkflow/interfaces.py	2007-03-15 14:56:17 UTC (rev 73193)
+++ CMF/trunk/DCWorkflow/interfaces.py	2007-03-15 16:10:50 UTC (rev 73194)
@@ -45,4 +45,4 @@
     
     """An event that's fired after a workflow transition.
     """
-    
\ No newline at end of file
+

Modified: CMF/trunk/DCWorkflow/tests/test_exportimport.py
===================================================================
--- CMF/trunk/DCWorkflow/tests/test_exportimport.py	2007-03-15 14:56:17 UTC (rev 73193)
+++ CMF/trunk/DCWorkflow/tests/test_exportimport.py	2007-03-15 16:10:50 UTC (rev 73194)
@@ -29,8 +29,6 @@
         import _EMPTY_TOOL_EXPORT
 from Products.CMFCore.exportimport.tests.test_workflow \
         import _WorkflowSetup as WorkflowSetupBase
-from Products.CMFCore.exportimport.tests.test_workflow \
-        import DummyWorkflowTool
 from Products.CMFCore.interfaces import IConfigurableWorkflowTool
 from Products.CMFCore.testing import DummyWorkflow
 from Products.DCWorkflow.DCWorkflow import DCWorkflowDefinition
@@ -760,8 +758,6 @@
 
     def test_parseWorkflowXML_normal_variables( self ):
 
-        from Products.DCWorkflow.exportimport import TRIGGER_TYPES
-
         WF_ID = 'normal'
         WF_TITLE = 'Normal DCWorkflow'
         WF_INITIAL_STATE = 'closed'
@@ -837,8 +833,6 @@
 
     def test_parseWorkflowXML_normal_worklists( self ):
 
-        from Products.DCWorkflow.exportimport import TRIGGER_TYPES
-
         WF_ID = 'normal'
         WF_TITLE = 'Normal DCWorkflow'
         WF_INITIAL_STATE = 'closed'
@@ -898,8 +892,6 @@
 
     def test_parseWorkflowXML_normal_permissions( self ):
 
-        from Products.DCWorkflow.exportimport import TRIGGER_TYPES
-
         WF_ID = 'normal'
         WF_TITLE = 'Normal DCWorkflow'
         WF_INITIAL_STATE = 'closed'
@@ -934,8 +926,6 @@
 
     def test_parseWorkflowXML_normal_scripts( self ):
 
-        from Products.DCWorkflow.exportimport import TRIGGER_TYPES
-
         WF_ID = 'normal'
         WF_TITLE = 'Normal DCWorkflow'
         WF_INITIAL_STATE = 'closed'

Modified: CMF/trunk/functest/creator/scaffolding.py
===================================================================
--- CMF/trunk/functest/creator/scaffolding.py	2007-03-15 14:56:17 UTC (rev 73193)
+++ CMF/trunk/functest/creator/scaffolding.py	2007-03-15 16:10:50 UTC (rev 73194)
@@ -15,7 +15,7 @@
     constructing the functional tests.
 """
 
-from Products.CMFCore.PortalFolder import PortalFolder
+import transaction
 
 def submit_news_setup( app, test_vars, result ):
     """
@@ -45,7 +45,7 @@
     if newsitem_id in folder.objectIds():
         folder.manage_delObjects( ids=[newsitem_id] )
     
-    get_transaction().commit()
+    transaction.commit()
 
     return 1
 
@@ -65,7 +65,7 @@
                                 % ( userid, newsitem_id ) )
     assert wf_tool.getInfoFor( newsitem, 'review_state' ) == 'pending'
     
-    get_transaction().commit()
+    transaction.commit()
 
     return 1
 
@@ -81,4 +81,4 @@
     if newsitem_id in folder.objectIds():
         folder.manage_delObjects( ids=[newsitem_id] )
     
-    get_transaction().commit()
+    transaction.commit()

Modified: CMF/trunk/functest/visitor/scaffolding.py
===================================================================
--- CMF/trunk/functest/visitor/scaffolding.py	2007-03-15 14:56:17 UTC (rev 73193)
+++ CMF/trunk/functest/visitor/scaffolding.py	2007-03-15 16:10:50 UTC (rev 73194)
@@ -18,7 +18,6 @@
 import string
 
 from Products.CMFCore.PortalFolder import PortalFolder
-from Products.CMFDefault.NewsItem import NewsItem
 
 #
 #   Fake out security (blech!)
@@ -26,6 +25,7 @@
 from AccessControl.SecurityManagement import newSecurityManager
 from AccessControl.SecurityManagement import noSecurityManager
 import Acquisition
+import transaction
 
 
 class FTUser( Acquisition.Implicit ):
@@ -276,7 +276,7 @@
         Ensure that we have at least the one expected piece of content.
     """
     _setup_test_news( app, test_vars )
-    get_transaction().commit()
+    transaction.commit()
     return 1
 
 def advanced_search_teardown( app, test_vars, result ):
@@ -284,7 +284,7 @@
         Ensure that we scrub any content we created.
     """
     _teardown_test_news( app, test_vars )
-    get_transaction().commit()
+    transaction.commit()
 
 #
 #   become_member.zft
@@ -297,7 +297,7 @@
     site        = app.unrestrictedTraverse( site_path )
 
     _scrubMember( site, userid, 1 )
-    get_transaction().commit()
+    transaction.commit()
     return 1
 
 def become_member_postcondition( app, test_vars, result ):
@@ -322,7 +322,7 @@
     site        = app.unrestrictedTraverse( site_path )
 
     _scrubMember( site, userid )
-    get_transaction().commit()
+    transaction.commit()
 
 #
 #   browse_news.zft
@@ -332,7 +332,7 @@
         Ensure that we have at least the one expected piece of content.
     """
     _setup_test_news( app, test_vars )
-    get_transaction().commit()
+    transaction.commit()
     return 1
 
 def browse_news_teardown( app, test_vars, result ):
@@ -340,7 +340,7 @@
         Ensure that we scrub any content we created.
     """
     _teardown_test_news( app, test_vars )
-    get_transaction().commit()
+    transaction.commit()
 
 #
 #   browse_topic.zft
@@ -352,14 +352,14 @@
     _setup_test_user( app, test_vars )
     _setup_test_news( app, test_vars )
     _setup_test_topic( app, test_vars )
-    get_transaction().commit()
+    transaction.commit()
     return 1
 
 def browse_topic_teardown( app, test_vars, result ):
     _teardown_test_topic( app, test_vars )
     _teardown_test_news( app, test_vars )
     _teardown_test_user( app, test_vars )
-    get_transaction().commit()
+    transaction.commit()
  
 #
 #   log_in.zft
@@ -368,14 +368,14 @@
     """
     """
     _setup_test_user( app, test_vars )
-    get_transaction().commit()
+    transaction.commit()
     return 1
 
 def log_in_teardown( app, test_vars, result ):
     """
     """
     _teardown_test_user( app, test_vars )
-    get_transaction().commit()
+    transaction.commit()
 #
 #   provide_feeback.zft
 #
@@ -394,7 +394,7 @@
 
     _setup_test_news( app, test_vars )
     _setup_test_user( app, test_vars )
-    get_transaction().commit()
+    transaction.commit()
     return 1
 
 def provide_feedback_postcondition( app, test_vars, result ):
@@ -415,7 +415,7 @@
 
     _teardown_test_user( app, test_vars )
     _teardown_test_news( app, test_vars )
-    get_transaction().commit()
+    transaction.commit()
 #
 #   quick_search.zft
 #
@@ -425,10 +425,10 @@
     # results page, merely that we can execute these requests.
     _setup_test_news( app, test_vars )
     _setup_test_user( app, test_vars )
-    get_transaction().commit()
+    transaction.commit()
     return 1
 
 def quick_search_teardown( app, test_vars, result ):
     _teardown_test_user( app, test_vars )
     _teardown_test_news( app, test_vars )
-    get_transaction().commit()
+    transaction.commit()

Modified: CMF/trunk/slurp_release.py
===================================================================
--- CMF/trunk/slurp_release.py	2007-03-15 14:56:17 UTC (rev 73193)
+++ CMF/trunk/slurp_release.py	2007-03-15 16:10:50 UTC (rev 73194)
@@ -196,8 +196,6 @@
 
 if __name__ == '__main__':
 
-    import sys
-
     pkg = ReleasePackage( sys.argv[1:] )
 
     pkg.run()



More information about the CMF-checkins mailing list