work around for importing zexp into zope2.8.1?
Hello Group, Has anyone come across a work around for the problem of importing zexp into zope 2.8.1? I want to utilize iungo which requires zexp imports but I'd rather not ask my hosting provider for an update to zope. Thanks Tim BTW, thanks for the input on using zope as a standard application server.
--On 6. Februar 2006 11:34:10 -0800 Tim Nash <thedagdae@gmail.com> wrote:
Hello Group, Has anyone come across a work around for the problem of importing zexp into zope 2.8.1?
What is "the problem of importing...."? If you don't have the permission to files to be imported into the filesystem of your Zope instance then you can't import it...just easy...and there is no workaround. -aj
Tim Nash wrote at 2006-2-6 11:34 -0800:
Has anyone come across a work around for the problem of importing zexp into zope 2.8.1?
As others already pointed out: the easiest solution would be to use a fixed Zope 2.8.x version. Alternatively, you could fix Zope 2.8.1 yourself. For this, I added (in our local copy) in ".../Products/PluggableIndexes/common/UnIndex.py": # DM 2005-08-25: compatibility from ComputedAttribute import ComputedAttribute ... # DM 2005-08-25: backward compatibility -- overridden at instance level def _length(self): length = self._length = BTrees.Length.Length(len(self._index)) return length _length = ComputedAttribute(_length) The second hunk can go (e.g.) after the definition of "__len__". -- Dieter
Dieter, Thanks again. It worked like a charm! Tim On 2/7/06, Dieter Maurer <dieter@handshake.de> wrote:
Tim Nash wrote at 2006-2-6 11:34 -0800:
Has anyone come across a work around for the problem of importing zexp into zope 2.8.1?
As others already pointed out: the easiest solution would be to use a fixed Zope 2.8.x version.
Alternatively, you could fix Zope 2.8.1 yourself. For this, I added (in our local copy) in ".../Products/PluggableIndexes/common/UnIndex.py":
# DM 2005-08-25: compatibility from ComputedAttribute import ComputedAttribute ... # DM 2005-08-25: backward compatibility -- overridden at instance level def _length(self): length = self._length = BTrees.Length.Length(len(self._index)) return length _length = ComputedAttribute(_length)
The second hunk can go (e.g.) after the definition of "__len__".
-- Dieter
participants (3)
-
Andreas Jung -
Dieter Maurer -
Tim Nash