From 5f072547b1298d1ffd76dba2c1bdb843df041498 Mon Sep 17 00:00:00 2001 From: Helmut Merz Date: Sat, 30 Apr 2011 09:24:45 +0200 Subject: [PATCH] Revert adding request to adapted objects. --- browser/common.py | 2 +- common.py | 6 ++---- interfaces.py | 1 - 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/browser/common.py b/browser/common.py index bb88283..a0c78c1 100644 --- a/browser/common.py +++ b/browser/common.py @@ -312,7 +312,7 @@ class BaseView(GenericView, I18NView): @Lazy def adapted(self): - return adapted(self.context, self.languageInfo, self.request) + return adapted(self.context, self.languageInfo) @Lazy def baseObject(self): diff --git a/common.py b/common.py index 6de6fb3..48dd919 100644 --- a/common.py +++ b/common.py @@ -43,11 +43,10 @@ from loops import util # convenience functions -def adapted(obj, langInfo=None, request=None): +def adapted(obj, langInfo=None): """ Return adapter based on the object type's type interface. """ if isinstance(obj, AdapterBase): - obj.request = request return obj t = IType(obj, None) if t is not None: @@ -58,7 +57,6 @@ def adapted(obj, langInfo=None, request=None): if isinstance(adapted, I18NAdapterBase): adapted.languageInfo = langInfo if adapted is not None: - adapted.request = request return adapted return obj @@ -100,7 +98,7 @@ class AdapterBase(object): adapts(IConcept) - _adapterAttributes = ('context', '__parent__', 'request') + _adapterAttributes = ('context', '__parent__') _contextAttributes = list(IConcept) _noexportAttributes = () _textIndexAttributes = () diff --git a/interfaces.py b/interfaces.py index c9b05a4..85bdefc 100644 --- a/interfaces.py +++ b/interfaces.py @@ -200,7 +200,6 @@ class ILoopsAdapter(IConceptSchema): context = Attribute('The underlying persistent object.') uid = Attribute('Unique id of the context object.') - request = Attribute('A a mapping with current settings, optional.') def getChildren(): """ Return a collection of child objects provided by the context