[Checkins] SVN: zope.app.container/trunk/ Move ``IAdding`` interface to ``zope.browser.interfaces``
Tres Seaver
tseaver at palladion.com
Wed May 13 17:33:55 EDT 2009
Log message for revision 99932:
Move ``IAdding`` interface to ``zope.browser.interfaces``
o Leave BBB imports.
Changed:
U zope.app.container/trunk/CHANGES.txt
U zope.app.container/trunk/setup.py
U zope.app.container/trunk/src/zope/app/container/interfaces.py
-=-
Modified: zope.app.container/trunk/CHANGES.txt
===================================================================
--- zope.app.container/trunk/CHANGES.txt 2009-05-13 21:19:41 UTC (rev 99931)
+++ zope.app.container/trunk/CHANGES.txt 2009-05-13 21:33:55 UTC (rev 99932)
@@ -2,10 +2,11 @@
CHANGES
=======
-3.7.3 (unreleased)
+3.8.0 (unreleased)
------------------
-- ...
+- Moved ``IAdding`` interface to ``zope.browser.interfaces``, leaving
+ BBB imports.
3.7.2 (2009-03-12)
------------------
@@ -16,8 +17,8 @@
- Don't show the "Add" menu item if there's nothing to add.
- Adapt to the removal of deprecated interfaces from
- zope.component.interfaces. Now IAdding inherits from
- zope.publisher.interfaces.browser.IBrowserView.
+ ``zope.component.interfaces``. Now ``IAdding`` inherits from
+ ``zope.publisher.interfaces.browser.IBrowserView``.
3.7.1 (2009-02-05)
-------------------
@@ -29,7 +30,7 @@
3.7.0 (2009-01-31)
------------------
-- Remove long-time deprecated IContentContainer class.
+- Remove long-time deprecated ``IContentContainer`` class.
- We now rely on a new package called ``zope.container``, which
contains the basic implementation of ``zope.container`` and is
@@ -50,14 +51,14 @@
3.6.1 (2008-10-15)
------------------
-- Reimplemented the BTreeContainer so that it directly accesses the btree
+- Reimplemented the ``BTreeContainer`` so that it directly accesses the btree
methods (removed an old #TODO)
-- Removed usage of deprecated LayerField.
+- Removed usage of deprecated ``LayerField``.
- Made C code compatible with Python 2.5 on 64bit architectures.
-- Fixed bug: Error thrown during __setitem__ for an ordered container
+- Fixed bug: Error thrown during ``__setitem__`` for an ordered container
leaves bad key in order
- Fixed https://bugs.launchpad.net/zope3/+bug/238579,
Modified: zope.app.container/trunk/setup.py
===================================================================
--- zope.app.container/trunk/setup.py 2009-05-13 21:19:41 UTC (rev 99931)
+++ zope.app.container/trunk/setup.py 2009-05-13 21:33:55 UTC (rev 99932)
@@ -22,7 +22,7 @@
return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
setup(name='zope.app.container',
- version = '3.7.3dev',
+ version = '3.8.0dev',
author='Zope Corporation and Contributors',
author_email='zope-dev at zope.org',
description='Zope Container',
@@ -53,6 +53,7 @@
'zope.app.zcmlfiles',
'zope.app.file']),
install_requires=['setuptools',
+ 'zope.browser',
'zope.component',
'zope.container',
'zope.copypastemove',
Modified: zope.app.container/trunk/src/zope/app/container/interfaces.py
===================================================================
--- zope.app.container/trunk/src/zope/app/container/interfaces.py 2009-05-13 21:19:41 UTC (rev 99931)
+++ zope.app.container/trunk/src/zope/app/container/interfaces.py 2009-05-13 21:33:55 UTC (rev 99932)
@@ -18,6 +18,9 @@
__docformat__ = 'restructuredtext'
# BBB
+from zope.browser.interfaces import IAdding
+
+# BBB
from zope.container.interfaces import (
DuplicateIDError,
ContainerError,
@@ -44,54 +47,3 @@
IObjectFindFilter,
IIdFindFilter
)
-
-import zope.publisher.interfaces.browser
-import zope.interface
-
-
-class IAdding(zope.publisher.interfaces.browser.IBrowserView):
- def add(content):
- """Add content object to container.
-
- Add using the name in `contentName`. Returns the added object
- in the context of its container.
-
- If `contentName` is already used in container, raises
- ``DuplicateIDError``.
- """
-
- contentName = zope.interface.Attribute(
- """The content name, as usually set by the Adder traverser.
-
- If the content name hasn't been defined yet, returns ``None``.
-
- Some creation views might use this to optionally display the
- name on forms.
- """
- )
-
- def nextURL():
- """Return the URL that the creation view should redirect to.
-
- This is called by the creation view after calling add.
-
- It is the adder's responsibility, not the creation view's to
- decide what page to display after content is added.
- """
-
- def nameAllowed():
- """Return whether names can be input by the user."""
-
- def addingInfo():
- """Return add menu data as a sequence of mappings.
-
- Each mapping contains 'action', 'title', and possibly other keys.
-
- The result is sorted by title.
- """
-
- def isSingleMenuItem():
- """Return whether there is single menu item or not."""
-
- def hasCustomAddView():
- "This should be called only if there is `singleMenuItem` else return 0"
More information about the Checkins
mailing list