[Zope3-checkins] CVS: Products3/zwiki - configure.zcml:1.21 metaconfigure.py:1.4 sourcetype.py:1.3 traversal.py:1.3 wiki.py:1.5 wikipage.py:1.6
Stephan Richter
srichter@cbu.edu
Thu, 5 Jun 2003 09:34:55 -0400
Update of /cvs-repository/Products3/zwiki
In directory cvs.zope.org:/tmp/cvs-serv27908/src/zopeproducts/zwiki
Modified Files:
configure.zcml metaconfigure.py sourcetype.py traversal.py
wiki.py wikipage.py
Log Message:
Updated the Zwiki Product to reflect recent API changes:
- Moved all __implements__ statements to implements()
- Moved zope.context.ContextWrapper to zope.app.context.ContextWrapper
- Moved zope.proxy.introspection.removeAllProxies to
zope.proxy.removeAllProxies
- Added a few comments
- Fixed tests
XXX: We still do not have a method for __used_for__; what should I use in
this case?
=== Products3/zwiki/configure.zcml 1.20 => 1.21 ===
--- Products3/zwiki/configure.zcml:1.20 Thu Apr 10 21:37:45 2003
+++ Products3/zwiki/configure.zcml Thu Jun 5 09:34:24 2003
@@ -135,6 +135,9 @@
<content class=".wikipage.WikiPage">
+ <implements
+ interface="zope.app.interfaces.annotation.IAttributeAnnotatable" />
+
<factory
id="WikiPage"
permission="zopeproducts.zwiki.AddWikiPage"
@@ -145,10 +148,6 @@
permission="zopeproducts.zwiki.AddWikiPage"
interface=".interfaces.IWikiPage"
set_schema=".interfaces.IWikiPage" />
-
- <implements
- interface="zope.app.interfaces.annotation.IAttributeAnnotatable"
- />
</content>
=== Products3/zwiki/metaconfigure.py 1.3 => 1.4 ===
--- Products3/zwiki/metaconfigure.py:1.3 Mon May 5 21:36:06 2003
+++ Products3/zwiki/metaconfigure.py Thu Jun 5 09:34:24 2003
@@ -28,7 +28,7 @@
class sourcetype:
classProvides(INonEmptyDirective)
- __implements__ = ISubdirectiveHandler
+ implements(ISubdirectiveHandler)
def __init__(self, _context, interface, class_, title=u''):
self.iface = _context.resolve(interface)
=== Products3/zwiki/sourcetype.py 1.2 => 1.3 ===
--- Products3/zwiki/sourcetype.py:1.2 Sat Apr 12 19:05:34 2003
+++ Products3/zwiki/sourcetype.py Thu Jun 5 09:34:24 2003
@@ -17,12 +17,13 @@
$Id$
"""
+from zope.interface import implements
from zopeproducts.zwiki.interfaces import IGlobalWikiSourceTypeService
class GlobalWikiSourceTypeService:
__doc__ = IGlobalWikiSourceTypeService.__doc__
- __implements__ = IGlobalWikiSourceTypeService
+ implements(IGlobalWikiSourceTypeService)
def __init__(self):
self.__types = {}
=== Products3/zwiki/traversal.py 1.2 => 1.3 ===
--- Products3/zwiki/traversal.py:1.2 Wed May 28 02:53:47 2003
+++ Products3/zwiki/traversal.py Thu Jun 5 09:34:24 2003
@@ -13,6 +13,7 @@
$Id$
"""
+from zope.interface import implements
from zope.component import getDefaultViewName, queryView
from zope.publisher.interfaces import IPublishTraverse
from zopeproducts.zwiki.interfaces import IWikiPage
@@ -20,15 +21,15 @@
from zope.exceptions import NotFoundError
from zope.app.traversing import getParent
-from zope.proxy.introspection import removeAllProxies
-from zope.context import ContextWrapper
+from zope.proxy import removeAllProxies
+from zope.app.context import ContextWrapper
from zope.app.interfaces.traversing import ITraversable
from zope.app.traversing.namespace import UnexpectedParameters
class WikiPageTraverser:
- __implements__ = IPublishTraverse
+ implements(IPublishTraverse)
__used_for__ = IWikiPage
def __init__(self, page, request):
@@ -64,7 +65,7 @@
"""Traverses wikipages via wiki itself and getattr.
"""
- __implements__ = ITraversable
+ implements(ITraversable)
__used_for__ = IWikiPage
def __init__(self, page):
=== Products3/zwiki/wiki.py 1.4 => 1.5 ===
--- Products3/zwiki/wiki.py:1.4 Thu Apr 10 21:37:45 2003
+++ Products3/zwiki/wiki.py Thu Jun 5 09:34:24 2003
@@ -15,6 +15,7 @@
$Id$
"""
+from zope.interface import implements
from zope.app.content.folder import Folder
from zopeproducts.zwiki.interfaces import IWiki
@@ -22,4 +23,4 @@
class Wiki(Folder):
__doc__ = IWiki.__doc__
- __implements__ = (IWiki, Folder.__implements__)
+ implements(IWiki)
=== Products3/zwiki/wikipage.py 1.5 => 1.6 ===
--- Products3/zwiki/wikipage.py:1.5 Wed May 28 02:53:47 2003
+++ Products3/zwiki/wikipage.py Thu Jun 5 09:34:24 2003
@@ -18,8 +18,9 @@
import smtplib
from persistence import Persistent
+from zope.interface import implements
from zope.component import getAdapter
-from zope.context import ContextWrapper
+from zope.app.context import ContextWrapper
from zope.app.traversing import getParent, objectName
from zope.app.interfaces.index.text import ISearchableText
@@ -42,7 +43,7 @@
class WikiPage(Persistent):
__doc__ = IWikiPage.__doc__
- __implements__ = IWikiPage
+ implements(IWikiPage)
# See zopeproducts.zwiki.interfaces.IWikiPage
source = u''
@@ -50,7 +51,6 @@
# See zopeproducts.zwiki.interfaces.IWikiPage
type = u'Plain Text'
-
def __init__(self):
self.__comments = 1
@@ -71,7 +71,7 @@
class WikiPageHierarchyAdapter:
__doc__ = IWikiPageHierarchy.__doc__
- __implements__ = IWikiPageHierarchy
+ implements(IWikiPageHierarchy)
__used_for__ = IWikiPage
def __init__(self, context):
@@ -126,7 +126,7 @@
class WikiPageReadFile:
"""Adapter for letting a Wiki Page look like a regular readable file."""
- __implements__ = IReadFile
+ implements(IReadFile)
__used_for__ = IWikiPage
def __init__(self, context):
@@ -144,7 +144,7 @@
class WikiPageWriteFile:
"""Adapter for letting a Wiki Page look like a regular writable file."""
- __implements__ = IWriteFile
+ implements(IWriteFile)
__used_for__ = IWikiPage
def __init__(self, context):
@@ -161,7 +161,7 @@
"""This adapter provides an API that allows the Wiki Pages to be indexed
by the Text Index."""
- __implements__ = ISearchableText
+ implements(ISearchableText)
__used_for__ = IWikiPage
def __init__(self, page):
@@ -177,7 +177,7 @@
"""An adapter for WikiPages to provide an interface for collecting E-mails
for sending out change notices."""
- __implements__ = IMailSubscriptions
+ implements(IMailSubscriptions)
__used_for__ = IWikiPage, IWiki
def __init__(self, context):
@@ -212,7 +212,7 @@
class WikiMailer:
"""Class to handle all outgoing mail."""
- __implements__ = ISubscriber
+ implements(ISubscriber)
def __init__(self, host="localhost", port="25"):
"""Initialize the the object."""