[Zope3-checkins] SVN: Zope3/branches/jim-adapter/src/ Fix up z3checkins, bugtracker, zwiki after moving zope.app.dublincore

Philipp von Weitershausen philikon at philikon.de
Wed Apr 12 16:19:49 EDT 2006


Log message for revision 66905:
  Fix up z3checkins, bugtracker, zwiki after moving zope.app.dublincore
  to zope.dublincore.
  

Changed:
  U   Zope3/branches/jim-adapter/src/bugtracker/browser/bug.py
  U   Zope3/branches/jim-adapter/src/bugtracker/browser/comment.py
  U   Zope3/branches/jim-adapter/src/bugtracker/browser/tracker.py
  U   Zope3/branches/jim-adapter/src/bugtracker/bug.py
  U   Zope3/branches/jim-adapter/src/bugtracker/exportimport.py
  U   Zope3/branches/jim-adapter/src/bugtracker/tests/placelesssetup.py
  U   Zope3/branches/jim-adapter/src/bugtracker/tests/test_mail.py
  U   Zope3/branches/jim-adapter/src/bugtracker/tests/test_tracker.py
  U   Zope3/branches/jim-adapter/src/bugtracker/tests/test_xmlexportimport.py
  U   Zope3/branches/jim-adapter/src/bugtracker/tracker.py
  U   Zope3/branches/jim-adapter/src/z3checkins/browser.py
  U   Zope3/branches/jim-adapter/src/z3checkins/message.py
  U   Zope3/branches/jim-adapter/src/zwiki/browser/wiki.py
  U   Zope3/branches/jim-adapter/src/zwiki/browser/wikipage.py
  U   Zope3/branches/jim-adapter/src/zwiki/comment.py
  U   Zope3/branches/jim-adapter/src/zwiki/tests/test_docstrings.py

-=-
Modified: Zope3/branches/jim-adapter/src/bugtracker/browser/bug.py
===================================================================
--- Zope3/branches/jim-adapter/src/bugtracker/browser/bug.py	2006-04-12 20:18:27 UTC (rev 66904)
+++ Zope3/branches/jim-adapter/src/bugtracker/browser/bug.py	2006-04-12 20:19:48 UTC (rev 66905)
@@ -26,9 +26,9 @@
 from zope.security.checker import getChecker
 from zope.structuredtext.html import HTML
 from zope.size.interfaces import ISized
+from zope.dublincore.interfaces import IZopeDublinCore
 
 from zope.app import zapi
-from zope.app.dublincore.interfaces import IZopeDublinCore
 from zope.app.form import CustomWidgetFactory
 from zope.app.form.browser import TextWidget, TextAreaWidget, DropdownWidget
 from zope.app.pagetemplate.viewpagetemplatefile import ViewPageTemplateFile

Modified: Zope3/branches/jim-adapter/src/bugtracker/browser/comment.py
===================================================================
--- Zope3/branches/jim-adapter/src/bugtracker/browser/comment.py	2006-04-12 20:18:27 UTC (rev 66904)
+++ Zope3/branches/jim-adapter/src/bugtracker/browser/comment.py	2006-04-12 20:19:48 UTC (rev 66905)
@@ -17,15 +17,13 @@
 """
 import re
 
+import zope.component
 from zope.proxy import removeAllProxies
 from zope.schema.vocabulary import getVocabularyRegistry
 from zope.structuredtext.document import Document
 from zope.structuredtext.html import HTML
+from zope.dublincore.interfaces import IZopeDublinCore
 
-from zope.app import zapi
-from zope.app.dublincore.interfaces import IZopeDublinCore
-
-
 class CommentViewBase(object):
 
     def __init__(self, context, request):
@@ -53,9 +51,9 @@
     def body(self):
         ttype = getattr(self.context.body, 'ttype', None)
         if ttype is not None:
-            source = zapi.createObject(self.context.body.ttype,
-                                       self.context.body)
-            view = zapi.getMultiAdapter(
+            source = zope.component.createObject(self.context.body.ttype,
+                                                 self.context.body)
+            view = zope.component.getMultiAdapter(
                 (removeAllProxies(source), self.request))
             html = view.render()
         else:

Modified: Zope3/branches/jim-adapter/src/bugtracker/browser/tracker.py
===================================================================
--- Zope3/branches/jim-adapter/src/bugtracker/browser/tracker.py	2006-04-12 20:18:27 UTC (rev 66904)
+++ Zope3/branches/jim-adapter/src/bugtracker/browser/tracker.py	2006-04-12 20:19:48 UTC (rev 66905)
@@ -15,11 +15,11 @@
 
 $Id$
 """
-from zope.app import zapi
+from zope.dublincore.interfaces import IZopeDublinCore
+from zope.schema.vocabulary import getVocabularyRegistry
+from zope.traversing.api import getName
 from zope.app.container.browser.adding import Adding
-from zope.app.dublincore.interfaces import IZopeDublinCore
 from zope.app.pagetemplate.viewpagetemplatefile import ViewPageTemplateFile
-from zope.schema.vocabulary import getVocabularyRegistry
 
 from bugtracker import TrackerMessageID as _
 from bugtracker.batching import Batch
@@ -35,7 +35,7 @@
 
     def add(self, content):
         self.context['dummy'] = content
-        self.contentName = zapi.name(content)
+        self.contentName = getName(content)
         return self.context[name]
 
 
@@ -161,7 +161,7 @@
         return len(filter(IComment.isImplementedBy, self.context.values()))
 
     def name(self):
-        return zapi.name(self.context)
+        return getName(self.context)
 
     def descriptionPreview(self):
         if len(self.context.description) < 200:

Modified: Zope3/branches/jim-adapter/src/bugtracker/bug.py
===================================================================
--- Zope3/branches/jim-adapter/src/bugtracker/bug.py	2006-04-12 20:18:27 UTC (rev 66904)
+++ Zope3/branches/jim-adapter/src/bugtracker/bug.py	2006-04-12 20:19:48 UTC (rev 66905)
@@ -18,11 +18,11 @@
 from zope.interface import implements
 from zope.proxy import removeAllProxies
 from zope.annotation.interfaces import IAnnotations
+from zope.dublincore.interfaces import IZopeDublinCore
 
 from zope.app import zapi
 from zope.app.container.btree import BTreeContainer
 from zope.app.container.contained import contained
-from zope.app.dublincore.interfaces import IZopeDublinCore
 
 from bugtracker.interfaces import IBug, IComment
 from bugtracker.interfaces import IAttachmentContainer

Modified: Zope3/branches/jim-adapter/src/bugtracker/exportimport.py
===================================================================
--- Zope3/branches/jim-adapter/src/bugtracker/exportimport.py	2006-04-12 20:18:27 UTC (rev 66904)
+++ Zope3/branches/jim-adapter/src/bugtracker/exportimport.py	2006-04-12 20:19:48 UTC (rev 66905)
@@ -25,9 +25,8 @@
 from zope.publisher.browser import TestRequest
 from zope.schema.vocabulary import getVocabularyRegistry
 from zope.security.proxy import removeSecurityProxy 
+from zope.dublincore.interfaces import IZopeDublinCore
 
-from zope.app import zapi
-from zope.app.dublincore.interfaces import IZopeDublinCore
 from zope.app.file import File, Image
 from zope.app.pagetemplate.viewpagetemplatefile import ViewPageTemplateFile
 

Modified: Zope3/branches/jim-adapter/src/bugtracker/tests/placelesssetup.py
===================================================================
--- Zope3/branches/jim-adapter/src/bugtracker/tests/placelesssetup.py	2006-04-12 20:18:27 UTC (rev 66904)
+++ Zope3/branches/jim-adapter/src/bugtracker/tests/placelesssetup.py	2006-04-12 20:19:48 UTC (rev 66905)
@@ -34,14 +34,14 @@
 from zope.location.traversing import LocationPhysicallyLocatable
 from zope.annotation.attribute import AttributeAnnotations
 from zope.annotation.interfaces import IAnnotations, IAttributeAnnotatable
+from zope.dublincore.annotatableadapter import ZDCAnnotatableAdapter
+from zope.dublincore.interfaces import IWriteZopeDublinCore
+from zope.dublincore.interfaces import IZopeDublinCore
 
 from zope.app.testing import ztapi
 from zope.app.testing.placelesssetup import PlacelessSetup as SetupBase
 from zope.app.file import File
 from zope.app.container.interfaces import INameChooser
-from zope.app.dublincore.annotatableadapter import ZDCAnnotatableAdapter
-from zope.app.dublincore.interfaces import IWriteZopeDublinCore
-from zope.app.dublincore.interfaces import IZopeDublinCore
 from zope.app.renderer.plaintext import IPlainTextSource
 from zope.app.renderer.plaintext import PlainTextToHTMLRenderer
 from zope.app.renderer.plaintext import PlainTextSourceFactory

Modified: Zope3/branches/jim-adapter/src/bugtracker/tests/test_mail.py
===================================================================
--- Zope3/branches/jim-adapter/src/bugtracker/tests/test_mail.py	2006-04-12 20:18:27 UTC (rev 66904)
+++ Zope3/branches/jim-adapter/src/bugtracker/tests/test_mail.py	2006-04-12 20:19:48 UTC (rev 66905)
@@ -25,10 +25,10 @@
 from zope.annotation.interfaces import IAnnotations, IAttributeAnnotatable
 from zope.annotation.attribute import AttributeAnnotations
 from zope.lifecycleevent import ObjectModifiedEvent
+from zope.dublincore.interfaces import IWriteZopeDublinCore
+from zope.dublincore.annotatableadapter import ZDCAnnotatableAdapter
 
 from zope.app.testing import ztapi
-from zope.app.dublincore.interfaces import IWriteZopeDublinCore
-from zope.app.dublincore.annotatableadapter import ZDCAnnotatableAdapter
 from zope.app.mail.interfaces import IMailDelivery
 
 from bugtracker.bug import Bug

Modified: Zope3/branches/jim-adapter/src/bugtracker/tests/test_tracker.py
===================================================================
--- Zope3/branches/jim-adapter/src/bugtracker/tests/test_tracker.py	2006-04-12 20:18:27 UTC (rev 66904)
+++ Zope3/branches/jim-adapter/src/bugtracker/tests/test_tracker.py	2006-04-12 20:19:48 UTC (rev 66905)
@@ -17,8 +17,8 @@
 """
 import unittest
 
-from zope.app.dublincore.annotatableadapter import ZDCAnnotatableAdapter
-from zope.app.dublincore.interfaces import IWriteZopeDublinCore
+from zope.dublincore.annotatableadapter import ZDCAnnotatableAdapter
+from zope.dublincore.interfaces import IWriteZopeDublinCore
 from zope.app.container.tests.test_btree import TestBTreeContainer
 
 from bugtracker.tests.placelesssetup import PlacelessSetup

Modified: Zope3/branches/jim-adapter/src/bugtracker/tests/test_xmlexportimport.py
===================================================================
--- Zope3/branches/jim-adapter/src/bugtracker/tests/test_xmlexportimport.py	2006-04-12 20:18:27 UTC (rev 66904)
+++ Zope3/branches/jim-adapter/src/bugtracker/tests/test_xmlexportimport.py	2006-04-12 20:19:48 UTC (rev 66905)
@@ -19,8 +19,8 @@
 from datetime import datetime
 
 from zope.datetime import parseDatetimetz
+from zope.dublincore.interfaces import IZopeDublinCore
 from zope.app.file import File
-from zope.app.dublincore.interfaces import IZopeDublinCore
 
 from bugtracker import tests
 from bugtracker.bug import Bug, BugDependencyAdapter

Modified: Zope3/branches/jim-adapter/src/bugtracker/tracker.py
===================================================================
--- Zope3/branches/jim-adapter/src/bugtracker/tracker.py	2006-04-12 20:18:27 UTC (rev 66904)
+++ Zope3/branches/jim-adapter/src/bugtracker/tracker.py	2006-04-12 20:19:48 UTC (rev 66905)
@@ -19,8 +19,8 @@
 from persistent import Persistent
 
 from zope.interface import implements
+from zope.dublincore.interfaces import IZopeDublinCore
 
-from zope.app.dublincore.interfaces import IZopeDublinCore
 from zope.app.container.btree import BTreeContainer
 from zope.app.container.interfaces import INameChooser
 

Modified: Zope3/branches/jim-adapter/src/z3checkins/browser.py
===================================================================
--- Zope3/branches/jim-adapter/src/z3checkins/browser.py	2006-04-12 20:18:27 UTC (rev 66904)
+++ Zope3/branches/jim-adapter/src/z3checkins/browser.py	2006-04-12 20:19:48 UTC (rev 66905)
@@ -7,16 +7,16 @@
 import mailbox
 from StringIO import StringIO
 
+import zope.component
 from zope.interface import implements
 from zope.exceptions import DuplicationError
 from zope.proxy import removeAllProxies
 from zope.datetime import parseDatetimetz, DateTimeError
 from zope.publisher.browser import BrowserView
+from zope.dublincore.interfaces import IZopeDublinCore
 
-from zope.app import zapi
 from zope.app.form import CustomWidgetFactory
 from zope.app.form.browser import FileWidget
-from zope.app.dublincore.interfaces import IZopeDublinCore
 from zope.app.pagetemplate import ViewPageTemplateFile
 
 from z3checkins.message import Bookmark
@@ -35,7 +35,7 @@
     def createAndAdd(self, data):
         if data.has_key('data'): # TODO should we bark if no data is given?
             msg_raw = data['data']
-            parser = zapi.getUtility(IMessageParser)
+            parser = zope.component.getUtility(IMessageParser)
             if msg_raw.startswith("From "):
                 # detected an mbox file
                 mbox = StringIO(msg_raw)
@@ -165,7 +165,8 @@
                 previous_message = item.log_message
             else:
                 same_as_previous = None
-            view = zapi.getMultiAdapter((item, self.request), name='html')
+            view = zope.component.getMultiAdapter((item, self.request),
+                                                  name='html')
             output = view(same_as_previous=same_as_previous)
             html.append(output)
         return "".join(html)

Modified: Zope3/branches/jim-adapter/src/z3checkins/message.py
===================================================================
--- Zope3/branches/jim-adapter/src/z3checkins/message.py	2006-04-12 20:18:27 UTC (rev 66904)
+++ Zope3/branches/jim-adapter/src/z3checkins/message.py	2006-04-12 20:19:48 UTC (rev 66905)
@@ -29,11 +29,10 @@
 from zope.proxy import removeAllProxies
 from zope.datetime import parseDatetimetz, DateTimeError
 from zope.publisher.browser import BrowserView
+from zope.dublincore.interfaces import IZopeDublinCore
 
-from zope.app import zapi
 from zope.app.container.contained import Contained
 from zope.app.container.interfaces import IReadContainer
-from zope.app.dublincore.interfaces import IZopeDublinCore
 from zope.app.form import CustomWidgetFactory
 from zope.app.form.browser import FileWidget
 from zope.app.pagetemplate import ViewPageTemplateFile

Modified: Zope3/branches/jim-adapter/src/zwiki/browser/wiki.py
===================================================================
--- Zope3/branches/jim-adapter/src/zwiki/browser/wiki.py	2006-04-12 20:18:27 UTC (rev 66904)
+++ Zope3/branches/jim-adapter/src/zwiki/browser/wiki.py	2006-04-12 20:19:48 UTC (rev 66905)
@@ -20,7 +20,7 @@
 import zope.component
 from zope.proxy import removeAllProxies
 from zope.traversing.api import getName, getPath
-from zope.app.dublincore.interfaces import ICMFDublinCore
+from zope.dublincore.interfaces import ICMFDublinCore
 from zope.app.container.browser.adding import Adding
 
 from zwiki.interfaces import IWikiPageHierarchy

Modified: Zope3/branches/jim-adapter/src/zwiki/browser/wikipage.py
===================================================================
--- Zope3/branches/jim-adapter/src/zwiki/browser/wikipage.py	2006-04-12 20:18:27 UTC (rev 66904)
+++ Zope3/branches/jim-adapter/src/zwiki/browser/wikipage.py	2006-04-12 20:19:48 UTC (rev 66905)
@@ -22,9 +22,8 @@
 from zope.proxy import removeAllProxies
 from zope.traversing.api import getParent, getName
 from zope.publisher.browser import BrowserView
-
+from zope.dublincore.interfaces import ICMFDublinCore
 from zope.app.form.browser.submit import Update
-from zope.app.dublincore.interfaces import ICMFDublinCore
 
 from zwiki.interfaces import IWikiPageHierarchy, IMailSubscriptions
 

Modified: Zope3/branches/jim-adapter/src/zwiki/comment.py
===================================================================
--- Zope3/branches/jim-adapter/src/zwiki/comment.py	2006-04-12 20:18:27 UTC (rev 66904)
+++ Zope3/branches/jim-adapter/src/zwiki/comment.py	2006-04-12 20:19:48 UTC (rev 66905)
@@ -21,8 +21,8 @@
 
 from zope.interface import implements
 from zope.schema.vocabulary import getVocabularyRegistry
+from zope.dublincore.interfaces import ICMFDublinCore
 from zope.app.container.contained import Contained
-from zope.app.dublincore.interfaces import ICMFDublinCore
 from zope.app.filerepresentation.interfaces import IReadFile, IWriteFile
 
 from zwiki.interfaces import IComment

Modified: Zope3/branches/jim-adapter/src/zwiki/tests/test_docstrings.py
===================================================================
--- Zope3/branches/jim-adapter/src/zwiki/tests/test_docstrings.py	2006-04-12 20:18:27 UTC (rev 66904)
+++ Zope3/branches/jim-adapter/src/zwiki/tests/test_docstrings.py	2006-04-12 20:19:48 UTC (rev 66905)
@@ -16,15 +16,15 @@
 $Id$
 """
 import unittest
+import zope.component
 from zope.schema.vocabulary import SimpleVocabulary
 from zope.schema.vocabulary import VocabularyRegistry, _clear
 from zope.schema.vocabulary import getVocabularyRegistry
 from zope.schema.vocabulary import setVocabularyRegistry
 from zope.testing.doctestunit import DocTestSuite
+from zope.dublincore.interfaces import ICMFDublinCore
 
-from zope.app import zapi
-from zope.app.dublincore.interfaces import ICMFDublinCore
-from zope.app.testing import placelesssetup, ztapi
+from zope.app.testing import placelesssetup
 
 from zwiki.interfaces import IComment
 
@@ -48,7 +48,7 @@
 
 def setUp(test):
     placelesssetup.setUp()
-    ztapi.provideAdapter(IComment, ICMFDublinCore, DCStub)
+    zope.component.provideAdapter(DCStub, (IComment,), ICMFDublinCore)
 
     _clear()
     registry = VocabularyRegistry()



More information about the Zope3-Checkins mailing list