[Zope3-checkins] SVN: Zope3/trunk/src/zope/ - uncontained() must
not change __name__ nor __parent__ on broken objects.
Gustavo Niemeyer
niemeyer at conectiva.com
Mon Oct 4 13:52:39 EDT 2004
Log message for revision 27739:
- uncontained() must not change __name__ nor __parent__ on broken objects.
- Broken.__module__ must be accessible by the view.
- IVocabularyTokenized is not a mix-in anymore.
- Small doc fixups.
Changed:
U Zope3/trunk/src/zope/app/broken/configure.zcml
U Zope3/trunk/src/zope/app/catalog/README.txt
U Zope3/trunk/src/zope/app/container/contained.py
U Zope3/trunk/src/zope/app/securitypolicy/principalrole.py
U Zope3/trunk/src/zope/schema/interfaces.py
U Zope3/trunk/src/zope/schema/vocabulary.py
-=-
Modified: Zope3/trunk/src/zope/app/broken/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/broken/configure.zcml 2004-10-04 16:09:13 UTC (rev 27738)
+++ Zope3/trunk/src/zope/app/broken/configure.zcml 2004-10-04 17:52:39 UTC (rev 27739)
@@ -2,6 +2,7 @@
<content class=".broken.Broken">
<allow interface="zope.app.annotation.interfaces.IAnnotations" />
+ <allow attributes="__module__" />
</content>
<subscriber
Modified: Zope3/trunk/src/zope/app/catalog/README.txt
===================================================================
--- Zope3/trunk/src/zope/app/catalog/README.txt 2004-10-04 16:09:13 UTC (rev 27738)
+++ Zope3/trunk/src/zope/app/catalog/README.txt 2004-10-04 17:52:39 UTC (rev 27739)
@@ -356,7 +356,7 @@
Now that we have a catalog with some documents indexed, we can search
-it. The catalog is really meany yo be used from Python:
+it. The catalog is really meant to be used from Python:
>>> root = getRootFolder()
Modified: Zope3/trunk/src/zope/app/container/contained.py
===================================================================
--- Zope3/trunk/src/zope/app/container/contained.py 2004-10-04 16:09:13 UTC (rev 27738)
+++ Zope3/trunk/src/zope/app/container/contained.py 2004-10-04 17:52:39 UTC (rev 27739)
@@ -38,6 +38,7 @@
from zope.app.location.interfaces import ILocation, ISublocations
from zope.app.container._zope_app_container_contained import ContainedProxyBase
from zope.app.container._zope_app_container_contained import getProxiedObject
+from zope.app.broken.broken import IBroken
class Contained(object):
"""Stupid mix-in that defines `__parent__` and `__name__` attributes
@@ -669,8 +670,9 @@
event = ObjectRemovedEvent(object, oldparent, oldname)
notify(event)
- object.__parent__ = None
- object.__name__ = None
+ if not IBroken.providedBy(object):
+ object.__parent__ = None
+ object.__name__ = None
modified(container)
class NameChooser(object):
Modified: Zope3/trunk/src/zope/app/securitypolicy/principalrole.py
===================================================================
--- Zope3/trunk/src/zope/app/securitypolicy/principalrole.py 2004-10-04 16:09:13 UTC (rev 27738)
+++ Zope3/trunk/src/zope/app/securitypolicy/principalrole.py 2004-10-04 17:52:39 UTC (rev 27739)
@@ -79,7 +79,7 @@
''' See the interface IPrincipalRoleManager '''
# Don't check validity intentionally.
- # After all, we certianly want to unset invalid ids.
+ # After all, we certainly want to unset invalid ids.
self.delCell(role_id, principal_id)
Modified: Zope3/trunk/src/zope/schema/interfaces.py
===================================================================
--- Zope3/trunk/src/zope/schema/interfaces.py 2004-10-04 16:09:13 UTC (rev 27738)
+++ Zope3/trunk/src/zope/schema/interfaces.py 2004-10-04 17:52:39 UTC (rev 27739)
@@ -501,8 +501,6 @@
class IVocabularyTokenized(IVocabulary):
"""Vocabulary that provides support for tokenized representation.
- This interface must be used as a mix-in with IBaseVocabulary.
-
Terms returned from getTerm() and provided by iteration must
conform to ITitledTokenizedTerm.
"""
Modified: Zope3/trunk/src/zope/schema/vocabulary.py
===================================================================
--- Zope3/trunk/src/zope/schema/vocabulary.py 2004-10-04 16:09:13 UTC (rev 27738)
+++ Zope3/trunk/src/zope/schema/vocabulary.py 2004-10-04 17:52:39 UTC (rev 27739)
@@ -46,7 +46,7 @@
class SimpleVocabulary(object):
"""Vocabulary that works from a sequence of terms."""
- implements(IVocabulary, IVocabularyTokenized)
+ implements(IVocabularyTokenized)
def __init__(self, terms, *interfaces):
"""Initialize the vocabulary given a list of terms.
More information about the Zope3-Checkins
mailing list