[Zope-Annce] Hotfix for Further reST Integration Issue

2006-08-21 Thread Jim Fulton
After reviewing the docutils / reStructuredText integration in Zope  
2, we have discovered that versions 2.7.0 - 2.7.8 and 2.8.0 - 2.8.8  
are vulnerable to a further information disclosure exploit.


Overview

This hotfix removes the exploit by disabling the reStructuredText  
feature which exposes the vulnerability. This vulnerability has been  
fixed on the 2.8 branch, and will thus not be present in any future  
release from that branch (2.8.9 or later).


Zope2 versions from 2.9 and the trunk are not vulnerable to this  
exploit.


Note that this hotfix fixes a problem not attressed by the earlier  
reStructuredText integration hotfix ; that hotfix needs to remain  
installed until after upgrading to a fixed version of Zope.

Hotfix

We have prepared a hot fix for this problem at:

http://www.zope.org/Products/Zope/Hotfix-2006-08-21/Hotfix-20060821/.

This hotfix should be installed as soon as possible.

To install, simply extract the archive into your Products directory  
in your Zope installation.


See: http://www.zope.org/Products/Zope/Hotfix-2006-08-21/ 
Hotfix-20060821/README.txt,


for installation instructions.

It is important to install this hotfix as soon as possible.

This fix will disable the reStructuredText csv-table directive.

Jim

--
Jim Fulton  mailto:[EMAIL PROTECTED]Python 
Powered!
CTO (540) 361-1714  
http://www.python.org
Zope Corporationhttp://www.zope.com http://www.zope.org



___
Zope-Announce maillist  -  Zope-Announce@zope.org
http://mail.zope.org/mailman/listinfo/zope-announce

 Zope-Announce for Announcements only - no discussions

(Related lists - 
Users: http://mail.zope.org/mailman/listinfo/zope

Developers: http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope-Checkins] SVN: Zope/branches/Zope-2_8-branch/lib/python/OFS/tests/testCopySupportHooks.py Added tests to go with http://www.zope.org/Collectors/Zope/2169

2006-08-21 Thread Stefan H. Holek
Log message for revision 69717:
  Added tests to go with http://www.zope.org/Collectors/Zope/2169
  

Changed:
  A   Zope/branches/Zope-2_8-branch/lib/python/OFS/tests/testCopySupportHooks.py

-=-
Added: 
Zope/branches/Zope-2_8-branch/lib/python/OFS/tests/testCopySupportHooks.py
===
--- Zope/branches/Zope-2_8-branch/lib/python/OFS/tests/testCopySupportHooks.py  
2006-08-21 11:59:41 UTC (rev 69716)
+++ Zope/branches/Zope-2_8-branch/lib/python/OFS/tests/testCopySupportHooks.py  
2006-08-21 12:27:33 UTC (rev 69717)
@@ -0,0 +1,244 @@
+import unittest
+import Testing
+import Zope2
+Zope2.startup()
+
+import transaction
+
+from Testing.makerequest import makerequest
+
+from AccessControl.SecurityManagement import newSecurityManager
+from AccessControl.SecurityManagement import noSecurityManager
+
+from OFS.SimpleItem import SimpleItem
+from OFS.Folder import Folder
+
+
+class HookCounter:
+'''Logs calls to old-school hooks'''
+
+def __init__(self):
+self.reset()
+
+def reset(self):
+self.count = 0
+self.afterAdd = [0]
+self.afterClone = [0]
+self.beforeDelete = [0]
+
+def manage_afterAdd(self, item, container):
+self.count = self.count + 1
+self.afterAdd.append(self.count)
+
+def manage_afterClone(self, item):
+self.count = self.count + 1
+self.afterClone.append(self.count)
+
+def manage_beforeDelete(self, item, container):
+self.count = self.count + 1
+self.beforeDelete.append(self.count)
+
+def order(self):
+return self.afterAdd[-1], self.afterClone[-1], self.beforeDelete[-1]
+
+
+class TestItem(HookCounter, SimpleItem):
+
+def __init__(self, id):
+HookCounter.__init__(self)
+self.id = id
+
+
+class TestFolder(HookCounter, Folder):
+
+def __init__(self, id):
+HookCounter.__init__(self)
+self.id = id
+
+def _verifyObjectPaste(self, object, validate_src=1):
+# Don't verify pastes as our test objects don't have
+# factory methods registered.
+pass
+
+def manage_afterAdd(self, item, container):
+HookCounter.manage_afterAdd(self, item, container)
+Folder.manage_afterAdd(self, item, container)
+
+def manage_afterClone(self, item):
+HookCounter.manage_afterClone(self, item)
+Folder.manage_afterClone(self, item)
+
+def manage_beforeDelete(self, item, container):
+HookCounter.manage_beforeDelete(self, item, container)
+Folder.manage_beforeDelete(self, item, container)
+
+
+try:
+from Products.Five.eventconfigure import setDeprecatedManageAddDelete
+setDeprecatedManageAddDelete(HookCounter)
+except ImportError:
+pass
+
+
+class HookTest(unittest.TestCase):
+
+def setUp(self):
+self.app = makerequest(Zope2.app())
+try:
+uf = self.app.acl_users
+uf._doAddUser('manager', 'secret', ['Manager'], [])
+user = uf.getUserById('manager').__of__(uf)
+newSecurityManager(None, user)
+except:
+self.tearDown()
+raise
+
+def tearDown(self):
+noSecurityManager()
+transaction.abort()
+self.app._p_jar.close()
+
+
+class TestCopySupport(HookTest):
+'''Tests the order in which the add/clone/del hooks are called'''
+
+def setUp(self):
+HookTest.setUp(self)
+# A folder
+self.app._setObject('folder', TestFolder('folder'))
+self.folder = self.app['folder']
+# A subfolder we are going to copy/move to
+self.folder._setObject('subfolder', TestFolder('subfolder'))
+self.subfolder = self.folder['subfolder']
+# A document we are going to copy/move
+self.folder._setObject('mydoc', TestItem('mydoc'))
+# Must have _p_jars
+transaction.savepoint(1)
+# Reset counters
+self.folder.mydoc.reset()
+
+def test_1_Clone(self):
+# Test clone
+self.subfolder.manage_clone(self.folder.mydoc, 'yourdoc')
+self.assertEqual(self.subfolder.yourdoc.order(), (1, 2, 0)) # add, 
clone
+
+def test_2_CopyPaste(self):
+# Test copy/paste
+cb = self.folder.manage_copyObjects(['mydoc'])
+self.subfolder.manage_pasteObjects(cb)
+self.assertEqual(self.subfolder.mydoc.order(), (1, 2, 0))   # add, 
clone
+
+def test_3_CutPaste(self):
+# Test cut/paste
+cb = self.folder.manage_cutObjects(['mydoc'])
+self.subfolder.manage_pasteObjects(cb)
+self.assertEqual(self.subfolder.mydoc.order(), (2, 0, 1))   # del, add
+
+def test_4_Rename(self):
+# Test rename
+self.folder.manage_renameObject('mydoc', 'yourdoc')
+self.assertEqual(self.folder.yourdoc.order(), (2, 0, 1))# del, add
+
+def test_5_COPY(self):
+# Test webdav COPY
+req = self.app.REQUEST
+req.environ['HTTP_DEPTH'] = 

[Zope-Checkins] SVN: Zope/branches/2.9/lib/python/OFS/tests/testCopySupportHooks.py Added tests to go with http://www.zope.org/Collectors/Zope/2169

2006-08-21 Thread Stefan H. Holek
Log message for revision 69718:
  Added tests to go with http://www.zope.org/Collectors/Zope/2169
  

Changed:
  A   Zope/branches/2.9/lib/python/OFS/tests/testCopySupportHooks.py

-=-
Added: Zope/branches/2.9/lib/python/OFS/tests/testCopySupportHooks.py
===
--- Zope/branches/2.9/lib/python/OFS/tests/testCopySupportHooks.py  
2006-08-21 12:27:33 UTC (rev 69717)
+++ Zope/branches/2.9/lib/python/OFS/tests/testCopySupportHooks.py  
2006-08-21 12:27:47 UTC (rev 69718)
@@ -0,0 +1,244 @@
+import unittest
+import Testing
+import Zope2
+Zope2.startup()
+
+import transaction
+
+from Testing.makerequest import makerequest
+
+from AccessControl.SecurityManagement import newSecurityManager
+from AccessControl.SecurityManagement import noSecurityManager
+
+from OFS.SimpleItem import SimpleItem
+from OFS.Folder import Folder
+
+
+class HookCounter:
+'''Logs calls to old-school hooks'''
+
+def __init__(self):
+self.reset()
+
+def reset(self):
+self.count = 0
+self.afterAdd = [0]
+self.afterClone = [0]
+self.beforeDelete = [0]
+
+def manage_afterAdd(self, item, container):
+self.count = self.count + 1
+self.afterAdd.append(self.count)
+
+def manage_afterClone(self, item):
+self.count = self.count + 1
+self.afterClone.append(self.count)
+
+def manage_beforeDelete(self, item, container):
+self.count = self.count + 1
+self.beforeDelete.append(self.count)
+
+def order(self):
+return self.afterAdd[-1], self.afterClone[-1], self.beforeDelete[-1]
+
+
+class TestItem(HookCounter, SimpleItem):
+
+def __init__(self, id):
+HookCounter.__init__(self)
+self.id = id
+
+
+class TestFolder(HookCounter, Folder):
+
+def __init__(self, id):
+HookCounter.__init__(self)
+self.id = id
+
+def _verifyObjectPaste(self, object, validate_src=1):
+# Don't verify pastes as our test objects don't have
+# factory methods registered.
+pass
+
+def manage_afterAdd(self, item, container):
+HookCounter.manage_afterAdd(self, item, container)
+Folder.manage_afterAdd(self, item, container)
+
+def manage_afterClone(self, item):
+HookCounter.manage_afterClone(self, item)
+Folder.manage_afterClone(self, item)
+
+def manage_beforeDelete(self, item, container):
+HookCounter.manage_beforeDelete(self, item, container)
+Folder.manage_beforeDelete(self, item, container)
+
+
+try:
+from Products.Five.eventconfigure import setDeprecatedManageAddDelete
+setDeprecatedManageAddDelete(HookCounter)
+except ImportError:
+pass
+
+
+class HookTest(unittest.TestCase):
+
+def setUp(self):
+self.app = makerequest(Zope2.app())
+try:
+uf = self.app.acl_users
+uf._doAddUser('manager', 'secret', ['Manager'], [])
+user = uf.getUserById('manager').__of__(uf)
+newSecurityManager(None, user)
+except:
+self.tearDown()
+raise
+
+def tearDown(self):
+noSecurityManager()
+transaction.abort()
+self.app._p_jar.close()
+
+
+class TestCopySupport(HookTest):
+'''Tests the order in which the add/clone/del hooks are called'''
+
+def setUp(self):
+HookTest.setUp(self)
+# A folder
+self.app._setObject('folder', TestFolder('folder'))
+self.folder = self.app['folder']
+# A subfolder we are going to copy/move to
+self.folder._setObject('subfolder', TestFolder('subfolder'))
+self.subfolder = self.folder['subfolder']
+# A document we are going to copy/move
+self.folder._setObject('mydoc', TestItem('mydoc'))
+# Must have _p_jars
+transaction.savepoint(1)
+# Reset counters
+self.folder.mydoc.reset()
+
+def test_1_Clone(self):
+# Test clone
+self.subfolder.manage_clone(self.folder.mydoc, 'yourdoc')
+self.assertEqual(self.subfolder.yourdoc.order(), (1, 2, 0)) # add, 
clone
+
+def test_2_CopyPaste(self):
+# Test copy/paste
+cb = self.folder.manage_copyObjects(['mydoc'])
+self.subfolder.manage_pasteObjects(cb)
+self.assertEqual(self.subfolder.mydoc.order(), (1, 2, 0))   # add, 
clone
+
+def test_3_CutPaste(self):
+# Test cut/paste
+cb = self.folder.manage_cutObjects(['mydoc'])
+self.subfolder.manage_pasteObjects(cb)
+self.assertEqual(self.subfolder.mydoc.order(), (2, 0, 1))   # del, add
+
+def test_4_Rename(self):
+# Test rename
+self.folder.manage_renameObject('mydoc', 'yourdoc')
+self.assertEqual(self.folder.yourdoc.order(), (2, 0, 1))# del, add
+
+def test_5_COPY(self):
+# Test webdav COPY
+req = self.app.REQUEST
+req.environ['HTTP_DEPTH'] = 'infinity'
+

[Zope-Checkins] SVN: Products.Five/branches/1.4/ Removed awful _zope_app usage which was causing ConnectionStateError problems.

2006-08-21 Thread Rocky Burt
Log message for revision 69719:
  Removed awful _zope_app usage which was causing ConnectionStateError problems.

Changed:
  U   Products.Five/branches/1.4/CHANGES.txt
  U   Products.Five/branches/1.4/fiveconfigure.py
  U   Products.Five/branches/1.4/pythonproducts.py
  U   Products.Five/branches/1.4/tests/test_pythonproducts.py

-=-
Modified: Products.Five/branches/1.4/CHANGES.txt
===
--- Products.Five/branches/1.4/CHANGES.txt  2006-08-21 12:27:47 UTC (rev 
69718)
+++ Products.Five/branches/1.4/CHANGES.txt  2006-08-21 13:53:13 UTC (rev 
69719)
@@ -2,6 +2,16 @@
 Five Changes
 
 
+Five 1.4.x
+==
+
+Bugfixes
+
+
+* Backported Zope 2.10's pythonproducts zope app handling to help resolve
+  an issue with ConnectionStateError's.
+
+
 Five 1.4.1 (2006-08-13)
 ===
 

Modified: Products.Five/branches/1.4/fiveconfigure.py
===
--- Products.Five/branches/1.4/fiveconfigure.py 2006-08-21 12:27:47 UTC (rev 
69718)
+++ Products.Five/branches/1.4/fiveconfigure.py 2006-08-21 13:53:13 UTC (rev 
69719)
@@ -27,6 +27,7 @@
 from App.ProductContext import ProductContext
 import Products
 from zLOG import LOG, ERROR
+import Zope2
 
 from zope.interface import classImplements, classImplementsOnly, implementedBy
 from zope.interface.interface import InterfaceClass
@@ -266,18 +267,25 @@
 raise ValueError(Must be a package and the  \
  package must be filesystem based)
 
-product = initializeProduct(module_, 
-module_.__name__, 
-module_.__path__[0], 
-pythonproducts._zope_app)
+app = Zope2.app()
+try:
+product = initializeProduct(module_, 
+module_.__name__, 
+module_.__path__[0],
+app)
 
-product.package_name = module_.__name__
+product.package_name = module_.__name__
 
-if initFunc is not None:
-newContext = ProductContext(product, pythonproducts._zope_app, module_)
-initFunc(newContext)
+if initFunc is not None:
+newContext = ProductContext(product, app, module_)
+initFunc(newContext)
+finally:
+try:
+import transaction
+transaction.commit()
+finally:
+app._p_jar.close()
 
-
 def registerPackage(_context, package, initialize=None):
 ZCML directive function for registering a python package product
 

Modified: Products.Five/branches/1.4/pythonproducts.py
===
--- Products.Five/branches/1.4/pythonproducts.py2006-08-21 12:27:47 UTC 
(rev 69718)
+++ Products.Five/branches/1.4/pythonproducts.py2006-08-21 13:53:13 UTC 
(rev 69719)
@@ -25,9 +25,8 @@
 from App.Product import initializeProduct
 from App.ProductContext import ProductContext
 from zope.testing import cleanup
+import Zope2
 
-_zope_app = None
-
 def isMonkeyPatched(m):
 return hasattr(m, '__five_method__')  
 
@@ -35,26 +34,18 @@
 Initialize the python-packages-as-products logic
 
 
-from OFS.Application import Application
-
-global _zope_app
-if isinstance(appOrContext, Application):
-_zope_app = appOrContext
-else:
-_zope_app = appOrContext._ProductContext__app
-
-applyPatches(_zope_app)
+applyPatches()
 
 
-def applyPatches(app):
+def applyPatches():
 Apply necessary monkey patches to force Zope 2 to be capable of
 handling products that are not necessarily located under the Products
 package.  Ultimately all functionality provided by these patches should
 be folded into Zope 2 core.
 
 
-patch_ProductDispatcher__bobo_traverse__(app)
-patch_externalmethod(app)
+patch_ProductDispatcher__bobo_traverse__()
+patch_externalmethod()
 
 def removePatches():
 Remove all monkey patches.
@@ -77,11 +68,11 @@
 # Most of these monkey patches were repurposed from the code I 
 # wrote for Basket - Rocky
 
-def product_packages(app):
+def product_packages():
 Returns all product packages including the regularly defined
 zope2 packages and those without the Products namespace package.
 
-
+
 old_product_packages = {}
 for x in dir(Products):
 m = getattr(Products, x)
@@ -89,23 +80,27 @@
 old_product_packages[x] = m
 
 packages = {}
-products = app.Control_Panel.Products
-for product_id in products.objectIds():
-product = products[product_id]
-if hasattr(product, 'package_name'):
-pos = product.package_name.rfind('.')
-if pos  -1:
-packages[product_id] = __import__(product.package_name, 
-   

Re: [Zope-dev] Traversal issue which affects Five

2006-08-21 Thread Lennart Regebro

On 8/20/06, Alec Mitchell [EMAIL PROTECTED] wrote:

On 4/17/06, Dieter Maurer [EMAIL PROTECTED] wrote:
...
 In our local Zope version, I implemented a solution that is
 (in my opinion) superior:

   Define an exception UseTraversalDefault that can be
   used by __bobo_traverse__ to tell the traversal process
   (either URL traversal in the publisher or restricted/unrestricted/CMF
   traversal) to use the default lookup.

 One big advantage is that e.g.
 Archetypes.BaseObject.BaseObject.__bobo_traverse__ no longer
 need this horrible dance to decide whether it should or must
 not create a NullResource.

OK, I'm bringing an old thread back to life to propose implementing
this change for Zope 2.10.  It would be quite nice to get rid of this
horrible dance in the next version of Archetypes, and the change
would generally allow people to make simpler __bobo_traverse__ methods
that don't have to reimplement the traversal machinery themselves,
especially since the traversal machinery is a bit in flux these days.
Of course, if the plan is to make __bobo_traverse__ obsolete in the
near future (provided reasonable alternatives exist), then making it
nicer shouldn't really be too much of a priority.  Thoughts?


Well, as I mentioned in April, i was going to in Zope 2.10 refactor
this and get rid of five:traversable, so I asked for specific usecases
so I could test it. No use cases popped up and the refactoring is now
finished.

What effect that has on your usecase I don't know. However, five
objects no longer have a __bobo_traverse__ by default, which should
make things simpler.

--
Lennart Regebro, Nuxeo http://www.nuxeo.com/
CPS Content Management http://www.cps-project.org/
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] buildbot failure in Zope branches 2.9 2.4 Linux zc-buildbot

2006-08-21 Thread buildbot
The Buildbot has detected a failed build of Zope branches 2.9 2.4 Linux 
zc-buildbot.

Buildbot URL: http://buildbot.zope.org/

Build Reason: changes
Build Source Stamp: 7209
Blamelist: 
andreasjung,benji_york,jens,jim,jukart,poster,rogerineichen,shh,sidnei,whitmo

BUILD FAILED: failed test

sincerely,
 -The Buildbot

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] buildbot failure in Zope branches 2.9 2.4 Windows 2000 zc-bbwin2

2006-08-21 Thread buildbot
The Buildbot has detected a failed build of Zope branches 2.9 2.4 Windows 2000 
zc-bbwin2.

Buildbot URL: http://buildbot.zope.org/

Build Reason: changes
Build Source Stamp: 7209
Blamelist: 
andreasjung,benji_york,jens,jim,jukart,poster,rogerineichen,shh,sidnei,whitmo

BUILD FAILED: failed compile

sincerely,
 -The Buildbot

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Traversal issue which affects Five

2006-08-21 Thread Alec Mitchell

On 8/21/06, Lennart Regebro [EMAIL PROTECTED] wrote:

On 8/20/06, Alec Mitchell [EMAIL PROTECTED] wrote:
 On 4/17/06, Dieter Maurer [EMAIL PROTECTED] wrote:
 ...
  In our local Zope version, I implemented a solution that is
  (in my opinion) superior:
 
Define an exception UseTraversalDefault that can be
used by __bobo_traverse__ to tell the traversal process
(either URL traversal in the publisher or restricted/unrestricted/CMF
traversal) to use the default lookup.
 
  One big advantage is that e.g.
  Archetypes.BaseObject.BaseObject.__bobo_traverse__ no longer
  need this horrible dance to decide whether it should or must
  not create a NullResource.

 OK, I'm bringing an old thread back to life to propose implementing
 this change for Zope 2.10.  It would be quite nice to get rid of this
 horrible dance in the next version of Archetypes, and the change
 would generally allow people to make simpler __bobo_traverse__ methods
 that don't have to reimplement the traversal machinery themselves,
 especially since the traversal machinery is a bit in flux these days.
 Of course, if the plan is to make __bobo_traverse__ obsolete in the
 near future (provided reasonable alternatives exist), then making it
 nicer shouldn't really be too much of a priority.  Thoughts?

Well, as I mentioned in April, i was going to in Zope 2.10 refactor
this and get rid of five:traversable, so I asked for specific usecases
so I could test it. No use cases popped up and the refactoring is now
finished.

What effect that has on your usecase I don't know. However, five
objects no longer have a __bobo_traverse__ by default, which should
make things simpler.


Indeed it does, the issue is that writing __bobo_traverse__ methods
which try to fallback on the normal traversal mechanisms has always
been a pain (you have to reimplement the normal traversal mechanisms
yourself, including some funny WebDAVisms).  If instead the
__bobo_traverse__ mechanism could explicitly tell its caller (via an
exception) to continue with the standard traversal, it would be a nice
improvement.  Of course, the real fix may be for products to stop
using __bobo_traverse__ and start sing BeforeTraverseEvent
subscribers, or IPublshTraverse adapters.  This is something I hope to
look into in the next couple days.

Alec
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Traversal issue which affects Five

2006-08-21 Thread Lennart Regebro

On 8/21/06, Alec Mitchell [EMAIL PROTECTED] wrote:

Indeed it does, the issue is that writing __bobo_traverse__ methods
which try to fallback on the normal traversal mechanisms has always
been a pain (you have to reimplement the normal traversal mechanisms
yourself, including some funny WebDAVisms).  If instead the
__bobo_traverse__ mechanism could explicitly tell its caller (via an
exception) to continue with the standard traversal, it would be a nice
improvement.  Of course, the real fix may be for products to stop
using __bobo_traverse__ and start sing BeforeTraverseEvent
subscribers, or IPublshTraverse adapters.  This is something I hope to
look into in the next couple days.


Yeah, that's probably a solution that doesn't require us to increse
the complexity of the already overly complex traversal. :)

--
Lennart Regebro, Nuxeo http://www.nuxeo.com/
CPS Content Management http://www.cps-project.org/
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


[Zope] Nice video

2006-08-21 Thread Pascal Peregrina
Hi,

I guess most of you might have seen this:
http://oodt.jpl.nasa.gov/better-web-app.mov

Not sure that Zope3 would get the same grade though (because of xml config
files).

Pascal



**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Zope 2.9 Product Refreshing

2006-08-21 Thread Peter Bengtsson



Dieter Maurer wrote:

Peter Bengtsson wrote at 2006-8-18 18:53 +0100:

...
One last odd clue, when I refresh my product (eg. MyProduct) in zope
2.9.4, actual something happens. My product is very very simple and
it's one main class has a method called index_html() that looks like
this:


from DateTime import DateTime
   def index_html(self, REQUEST, RESPONSE):
 doc str 
return str(DateTime())

It works fine. After I manually refresh the product through the
Control_Panel, I get an error in index_html() because now 'DateTime'
has become None and thus can't be called with DateTime().
Does that help you help me?


Global variables apparently becoming None is a sign
that you are using an old (pre refresh) version of a function
(index_html in your case).

  When a module is released, some Python magic arranges that
  all its variables are rebound to None.

  When the function accesses one of its globals, it then appears as None.


If you have accessed the index_html via a persistent instance,
then the resetCaches seems not to have done what we expect
(it should have caused the connection cache to be dropped and
a new instance loaded from the storage with the new class definition).

The function resetCaches() and self._resetCache() in ZODB.Connection 
hasn't changed from zope 2.8 to zope 2.9.

 the code =
global_reset_counter = 0

def resetCaches():
Causes all connection caches to be reset as connections are 
reopened.


Zope's refresh feature uses this.  When you reload Python modules,
instances of classes continue to use the old class definitions.
To use the new code immediately, the refresh feature asks ZODB to
clear caches by calling resetCaches().  When the instances are
loaded by subsequent connections, they will use the new class
definitions.

global global_reset_counter
global_reset_counter += 1

class Connection(ExportImport, object):

def _resetCache(self):
Creates a new cache, discarding the old one.

See the docstring for the resetCaches() function.

self._reset_counter = global_reset_counter
self._invalidated.clear()
cache_size = self._cache.cache_size
self._cache = cache = PickleCache(self, cache_size)






--
Peter Bengtsson,
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.com
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] how to convert object id into string values?

2006-08-21 Thread Peter Bengtsson

All Zope object's have an id string attribute or a method called 'id'.
In the case of Zope File and Image objects, 'id' is a function which 
means you have to do this::


file_id = context.some_file_object.id()
assert same_type(file_id, 'str')

Why it is so I have absolutely no idea.

Allen Huang wrote:
I using a python program that create thumbnails that I upload into zope. 
But the problem is that my program wants to recieve string values and 
apparently zope object id is not.
 
can anyone help with this? How do I convert zope object id into string 
values?



Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail Beta. 
http://us.rd.yahoo.com/evt=42297/*http://advision.webevents.yahoo.com/handraisers 






___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce

 http://mail.zope.org/mailman/listinfo/zope-dev )


--
Peter Bengtsson,
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.com
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] how to convert object id into string values?

2006-08-21 Thread Andreas Jung



--On 21. August 2006 11:12:38 +0100 Peter Bengtsson [EMAIL PROTECTED] 
wrote:



All Zope object's have an id string attribute or a method called 'id'.


You should *always* use the *official* API method: getId() - nothing else!

-aj

pgpu0NqNUYqqy.pgp
Description: PGP signature
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Limiting access

2006-08-21 Thread David

Hi

We are running a site for a local government providing local  
information. Over the past few months, the site has been spidered  
daily and the information appears to be used for unwanted marketing  
campaigns.


We have been asked if we could somehow block this access. We tried  
blocking the originating IP on the server (using route to blackhole),  
but the spider is rotating IPs within a day of us putting in a block.


Is there some mechanism in Zope or can be added to a Zope instance  
that would limit the number of requests that are served per IP  
address within a certain period of time? We are aware that this would  
also affect Google and other search engine spiders, but as they  
usually come from a known IP range, it would be nice if we could  
exempt these from the throttling.


Any ideas or suggestions?

DR
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Limiting access

2006-08-21 Thread Andreas Jung



--On 21. August 2006 13:17:03 +0100 David [EMAIL PROTECTED] wrote:


Hi

We are running a site for a local government providing local
information. Over the past few months, the site has been spidered  daily
and the information appears to be used for unwanted marketing  campaigns.

We have been asked if we could somehow block this access. We tried
blocking the originating IP on the server (using route to blackhole),
but the spider is rotating IPs within a day of us putting in a block.

Is there some mechanism in Zope or can be added to a Zope instance  that
would limit the number of requests that are served per IP  address within
a certain period of time? We are aware that this would  also affect
Google and other search engine spiders, but as they  usually come from a
known IP range, it would be nice if we could  exempt these from the
throttling.



You should solve this inside your front-end Apache (hope you have one!).
You might check mod_throttle for Apache and check your robots.txt file.

-aj

pgp898iP6yRQa.pgp
Description: PGP signature
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Pack problem with zeo

2006-08-21 Thread Jonathan
I have encountered a problem caused by packing Data.fs (pack done via ZMI - 
Control Panel - Database Management - main - Pack).  After Data.fs is 
packed, the ZODBmount point for the zeo server is missing.


I have the following folder set-up:

Root
  |Coz
 |---ZeoServer1

After the pack operation, folder 'ZeoServer1' is missing.


In zope.conf I have:

zodb_db main
   # Main FileStorage database
   filestorage
 path $INSTANCE/var/Data.fs
   /filestorage
   mount-point /
/zodb_db

zodb_db zeo1
  mount-point /Coz/ZeoServer1
  # ZODB cache, in number of objects
  cache-size 5000
  zeoclient
server 192.168.123.1:8100
storage 1
name zeostorage
var /apps/zeo1/var
# ZEO client cache, in bytes
cache-size 20MB
# Uncomment to have a persistent disk cache
#client zeo1
  /zeoclient
/zodb_db


I am packing the main Data.fs (running on an application server - the zeo 
client) not the zeo Data.fs. (zeo server is running on a different machine). 
I am running Zope 2.9.2 on RedHat linux.


Any ideas as to how to resolve this issue would be greatly appreciated!

Jonathan




___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Pack problem with zeo

2006-08-21 Thread Gaël Le Mignot
Hello Jonathan!

Mon, 21 Aug 2006 11:41:42 -0400, you wrote: 

  I have encountered a problem caused by packing Data.fs (pack done via
  ZMI -
  Control Panel - Database Management - main - Pack).  After Data.fs is
  packed, the ZODBmount point for the zeo server is missing.

There is zeopack.py script to pack ZEO databases.
It should be located on:
/usr/lib/zope2.9/bin/zeopack.py
if you  installed with your  distribution package, or  else, somewhere
alongside with mkzeoinstance.py and mkzopeinstance.py

-- 
Gaël Le Mignot - [EMAIL PROTECTED]
Pilot Systems - 9, rue Desargues - 75011 Paris
Tel : +33 1 44 53 05 55 - http://www.pilotsystems.net
Hébergement Zope et Plone gratuit - http://www.objectis.org
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Pack problem with zeo

2006-08-21 Thread Jonathan


- Original Message - 
From: Gaël Le Mignot [EMAIL PROTECTED]

To: Jonathan [EMAIL PROTECTED]
Cc: zope@zope.org
Sent: Monday, August 21, 2006 11:50 AM
Subject: Re: [Zope] Pack problem with zeo



Hello Jonathan!

Mon, 21 Aug 2006 11:41:42 -0400, you wrote:

 I have encountered a problem caused by packing Data.fs (pack done via
 ZMI -
 Control Panel - Database Management - main - Pack).  After Data.fs is
 packed, the ZODBmount point for the zeo server is missing.

There is zeopack.py script to pack ZEO databases.
It should be located on:
/usr/lib/zope2.9/bin/zeopack.py
if you  installed with your  distribution package, or  else, somewhere
alongside with mkzeoinstance.py and mkzopeinstance.py


How can I pack just the the main Data.fs (running under plain zope, not 
zeo)?  I don't want to pack the zeo Data.fs (yet, but thanks for the info on 
how to pack with zeo!).


Thanks,

Jonathan


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Zope 2.9 Product Refreshing

2006-08-21 Thread Dieter Maurer
Peter Bengtsson wrote at 2006-8-21 10:13 +0100:
 ... global variables turn to 'None' after refresh ...

 If you have accessed the index_html via a persistent instance,
 then the resetCaches seems not to have done what we expect
 (it should have caused the connection cache to be dropped and
 a new instance loaded from the storage with the new class definition).
 
The function resetCaches() and self._resetCache() in ZODB.Connection 
hasn't changed from zope 2.8 to zope 2.9.

Nevertheless, your index_html seems to be old.

Apparently, the old module instance was dropped (this dropping caused
the global variable to get 'None'). You should now have
a new module instance in its place in sys.modules (reflecting your
code change). If the ZODB connection cache was replaced by a new
one, then the self of your index_html is newly loaded from the storage.
This should give it the new class definition (where index_html
references the new module instance).

Something along this line appears to be wrong.
You need to investigate what it is.



-- 
Dieter
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Limiting access

2006-08-21 Thread Dieter Maurer
David wrote at 2006-8-21 13:17 +0100:
 ...
We have been asked if we could somehow block this access. We tried  
blocking the originating IP on the server (using route to blackhole),  
but the spider is rotating IPs within a day of us putting in a block.

Is there some mechanism in Zope or can be added to a Zope instance  
that would limit the number of requests that are served per IP  
address within a certain period of time? We are aware that this would  
also affect Google and other search engine spiders, but as they  
usually come from a known IP range, it would be nice if we could  
exempt these from the throttling.

We have extended VHM (Virtual Host Monster) to give it
additional functionality (such as recognizing and handling spiders).
We do not have your specific functionality, though...



-- 
Dieter
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Problem report] pack discards reachable object (was: [Zope] Pack problem with zeo)

2006-08-21 Thread Dieter Maurer
Jonathan wrote at 2006-8-21 11:41 -0400:
I have encountered a problem caused by packing Data.fs (pack done via ZMI - 
Control Panel - Database Management - main - Pack).  After Data.fs is 
packed, the ZODBmount point for the zeo server is missing.

I have the following folder set-up:

Root
   |Coz
  |---ZeoServer1

After the pack operation, folder 'ZeoServer1' is missing.

That would be a severe bug in FileStorage -- and it is almost
unbelievable...

   A mount point is nothing special for a FileStorage. It is
   treated like any other object.

   What you tell us is that a reachable object can be discarded
   by packing. As a mount point is nothing special, it could
   happen with any object.

   But it is now years back that we got the last packing problem report.



-- 
Dieter
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Problem report] pack discards reachable object (was: [Zope] Pack problem with zeo)

2006-08-21 Thread Jonathan


- Original Message - 
From: Dieter Maurer [EMAIL PROTECTED]

To: Jonathan [EMAIL PROTECTED]
Cc: zope@zope.org; zodb-dev@zope.org
Sent: Monday, August 21, 2006 1:32 PM
Subject: [Problem report] pack discards reachable object (was: [Zope] Pack 
problem with zeo)




Jonathan wrote at 2006-8-21 11:41 -0400:
I have encountered a problem caused by packing Data.fs (pack done via 
ZMI -

Control Panel - Database Management - main - Pack).  After Data.fs is
packed, the ZODBmount point for the zeo server is missing.

I have the following folder set-up:

Root
  |Coz
 |---ZeoServer1

After the pack operation, folder 'ZeoServer1' is missing.


That would be a severe bug in FileStorage -- and it is almost
unbelievable...

  A mount point is nothing special for a FileStorage. It is
  treated like any other object.

  What you tell us is that a reachable object can be discarded
  by packing. As a mount point is nothing special, it could
  happen with any object.

  But it is now years back that we got the last packing problem report.


I can reproduce the behaviour very easily... after I pack and the 
'ZeoServer1' folder disappears i do the following:


- stop zope
- delete Data.fs
- rename Data.fs.old to Data.fs
- start zope

And the ZeoServer1 folder is back.  I then pack zope and the ZeoServer1 
folder disappears again.  I can do this again and again and again.



Jonathan

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Problem report] pack discards reachable object (was: [Zope] Pack problem with zeo)

2006-08-21 Thread Jonathan


- Original Message - 
From: Dieter Maurer [EMAIL PROTECTED]

To: Jonathan [EMAIL PROTECTED]
Cc: zope@zope.org; zodb-dev@zope.org
Sent: Monday, August 21, 2006 1:32 PM
Subject: [Problem report] pack discards reachable object (was: [Zope] Pack 
problem with zeo)




Jonathan wrote at 2006-8-21 11:41 -0400:
I have encountered a problem caused by packing Data.fs (pack done via 
ZMI -

Control Panel - Database Management - main - Pack).  After Data.fs is
packed, the ZODBmount point for the zeo server is missing.

I have the following folder set-up:

Root
  |Coz
 |---ZeoServer1

After the pack operation, folder 'ZeoServer1' is missing.


That would be a severe bug in FileStorage -- and it is almost
unbelievable...

  A mount point is nothing special for a FileStorage. It is
  treated like any other object.

  What you tell us is that a reachable object can be discarded
  by packing. As a mount point is nothing special, it could
  happen with any object.

  But it is now years back that we got the last packing problem report.



I can reproduce the behaviour very easily... after I pack and the 
'ZeoServer1' folder disappears i do the following:


- stop zope
- delete Data.fs
- rename Data.fs.old to Data.fs
- start zope

And the ZeoServer1 folder is back.  I then pack zope and the ZeoServer1 
folder disappears again.  I can do this again and again and again.



Jonathan

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: [Setup] Re: Can't Get Products To Show Up!

2006-08-21 Thread beno

René Pijlman wrote:

beno wrote:

$ln -s /path_to_products/ /path_to_zope_instance/Prodcuts/

^^
There's your problem.
But I did not write that! Someone else wrote/suggested that!! My 
symlinks were fine. I ripped them all out :) I emptied the Plone-2.5.0 
dir and dropped it all in the main Products dir. Then I stopped Zope and 
used runzope to track errors. I got a number of them, one quoted 
below. Here are the packages I had to take out of the Products dir to 
get Zope to boot:


ATContentTypes  CMFPloneMarshall
ATReferenceBrowserWidgetCMFQuickInstallerTool   
MimetypesRegistry
Archetypes  CMFSetup
PasswordResetTool
CMFActionIcons  CMFTopic
PloneLanguageTool

CMFCalendar CMFUid  PlonePAS
CMFCore DCWorkflow  
PluggableAuthService

CMFDefault  PortalTransforms
CMFDynamicViewFTI   Five
ResourceRegistries

CMFFormController   GenericSetup
CMFPlacefulWorkflow GroupUserFolder

In other words, almost everything! (The other prods have showed up in 
the Zope.) Here's a typical error message from trying to load one of them:


2006-08-21T17:43:03 ERROR(200) Zope Could not import Products.ATContentTypes
Traceback (most recent call last):
 File /usr/local/zope/278/lib/python/OFS/Application.py, line 673, in 
import_product

   product=__import__(pname, global_dict, global_dict, silly)
 File /usr/local/zope/instance2/Products/ATContentTypes/__init__.py, 
line 35, in ?

   from Products.ATContentTypes.config import HAS_LINGUA_PLONE
 File /usr/local/zope/instance2/Products/ATContentTypes/config.py, 
line 30, in ?

   from Products.ATContentTypes.configuration import zconf
 File 
/usr/local/zope/instance2/Products/ATContentTypes/configuration/__init__.py, 
line 25, in ?

   from Products.ATContentTypes.configuration.config import zconf
 File 
/usr/local/zope/instance2/Products/ATContentTypes/configuration/config.py, 
line 29, in ?

   from Products.ATContentTypes.configuration.schema import atctSchema
 File 
/usr/local/zope/instance2/Products/ATContentTypes/configuration/schema.py, 
line 29, in ?

   from Products.ATContentTypes.configuration import datatype
 File 
/usr/local/zope/instance2/Products/ATContentTypes/configuration/datatype.py, 
line 25, in ?

   from Products.CMFCore import permissions as CMFCorePermissions
ImportError: cannot import name permissions
Traceback (most recent call last):
 File /usr/local/zope/278/lib/python/Zope/Startup/run.py, line 50, in ?
   run()
 File /usr/local/zope/278/lib/python/Zope/Startup/run.py, line 19, in run
   start_zope(opts.configroot)
 File /usr/local/zope/278/lib/python/Zope/Startup/__init__.py, line 
52, in start_zope

   starter.startZope()
 File /usr/local/zope/278/lib/python/Zope/Startup/__init__.py, line 
231, in startZope

   Zope.startup()
 File /usr/local/zope/278/lib/python/Zope/__init__.py, line 47, in 
startup

   _startup()
 File /usr/local/zope/278/lib/python/Zope/App/startup.py, line 45, in 
startup

   OFS.Application.import_products()
 File /usr/local/zope/278/lib/python/OFS/Application.py, line 650, in 
import_products

   import_product(product_dir, product_name, raise_exc=debug_mode)
 File /usr/local/zope/278/lib/python/OFS/Application.py, line 673, in 
import_product

   product=__import__(pname, global_dict, global_dict, silly)
 File /usr/local/zope/instance2/Products/ATContentTypes/__init__.py, 
line 35, in ?

   from Products.ATContentTypes.config import HAS_LINGUA_PLONE
 File /usr/local/zope/instance2/Products/ATContentTypes/config.py, 
line 30, in ?

   from Products.ATContentTypes.configuration import zconf
 File 
/usr/local/zope/instance2/Products/ATContentTypes/configuration/__init__.py, 
line 25, in ?

   from Products.ATContentTypes.configuration.config import zconf
 File 
/usr/local/zope/instance2/Products/ATContentTypes/configuration/config.py, 
line 29, in ?

   from Products.ATContentTypes.configuration.schema import atctSchema
 File 
/usr/local/zope/instance2/Products/ATContentTypes/configuration/schema.py, 
line 29, in ?

   from Products.ATContentTypes.configuration import datatype
 File 
/usr/local/zope/instance2/Products/ATContentTypes/configuration/datatype.py, 
line 25, in ?

   from Products.CMFCore import permissions as CMFCorePermissions
ImportError: cannot import name permissions


TIA,
beno
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Problem report] pack discards reachable object (was: [Zope] Pack problem with zeo)

2006-08-21 Thread Dieter Maurer
Jonathan wrote at 2006-8-21 13:38 -0400:
 ...
I can reproduce the behaviour very easily... after I pack and the 
'ZeoServer1' folder disappears i do the following:

- stop zope
- delete Data.fs
- rename Data.fs.old to Data.fs
- start zope

And the ZeoServer1 folder is back.  I then pack zope and the ZeoServer1 
folder disappears again.  I can do this again and again and again.

If your Data.fs.old is not too large (not larger than 1 MB)
and on the path to the ZeoServer1 are only standard Zope objects, you
could send it to me for investigation ([bg]zip it, to make it smaller).



-- 
Dieter
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Problem report] pack discards reachable object (was: [Zope]Pack problem with zeo)

2006-08-21 Thread Jonathan


- Original Message - 
From: Jonathan [EMAIL PROTECTED]

To: Dieter Maurer [EMAIL PROTECTED]
Cc: zope@zope.org; zodb-dev@zope.org
Sent: Monday, August 21, 2006 2:05 PM
Subject: Re: [Problem report] pack discards reachable object (was: 
[Zope]Pack problem with zeo)





- Original Message - 
From: Dieter Maurer [EMAIL PROTECTED]

To: Jonathan [EMAIL PROTECTED]
Cc: zope@zope.org; zodb-dev@zope.org
Sent: Monday, August 21, 2006 1:58 PM
Subject: Re: [Problem report] pack discards reachable object (was: 
[Zope] Pack problem with zeo)




Jonathan wrote at 2006-8-21 13:38 -0400:

...
I can reproduce the behaviour very easily... after I pack and the
'ZeoServer1' folder disappears i do the following:

- stop zope
- delete Data.fs
- rename Data.fs.old to Data.fs
- start zope

And the ZeoServer1 folder is back.  I then pack zope and the ZeoServer1
folder disappears again.  I can do this again and again and again.


If your Data.fs.old is not too large (not larger than 1 MB)
and on the path to the ZeoServer1 are only standard Zope objects, you
could send it to me for investigation ([bg]zip it, to make it smaller).


Thanks for the very kind offer but the Data.fs file is 53Mb before packing 
and 7.8Mb after packing. I tried tar/gzip but the 53Mb only dropped down 
to 8.9Mb.


I have found a work-around:

- delete the ZeoServer1 folder (via the ZMI)
- pack the main Data.fs and specify only to pack items older than 1 day
- after the pack (Data.fs down to 7.8Mb from 53Mb) undo the ZeoServer1 
folder deletion


Everything seems to be ok, but a bit of an ugly work-around.


Jonathan

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Problem report] pack discards reachable object (was: [Zope] Pack problem with zeo) - Resolved

2006-08-21 Thread Jonathan


- Original Message - 
From: Dieter Maurer [EMAIL PROTECTED]

To: Jonathan [EMAIL PROTECTED]
Cc: zope@zope.org; zodb-dev@zope.org
Sent: Monday, August 21, 2006 2:53 PM
Subject: Re: [Problem report] pack discards reachable object (was: [Zope] 
Pack problem with zeo)




Jonathan wrote at 2006-8-21 14:05 -0400:

...

And the ZeoServer1 folder is back.  I then pack zope and the ZeoServer1
folder disappears again.  I can do this again and again and again.


If your Data.fs.old is not too large (not larger than 1 MB)
and on the path to the ZeoServer1 are only standard Zope objects, you
could send it to me for investigation ([bg]zip it, to make it smaller).


Thanks for the very kind offer but the Data.fs file is 53Mb before packing
and 7.8Mb after packing. I tried tar/gzip but the 53Mb only dropped down 
to

8.9Mb.


Then you may try the following:

 Manually add the mount point after packing.
 Pack again and see whether the mount point will still vanish.
 If it does, gzip and sent it to me (privately).


Using the work-around I mentioned earlier (delete the ZeoServer1 folder, 
pack  1 day, after pack undo ZeoServer1 deletion) seems to have resolved 
the issue.  I tried packing the Data.fs again and the ZeoServer1 folder did 
not disappear this time!


The only thing I can think of this that there must have been some entry in 
the original Data.fs file that was causing the problem, and the pack removed 
that problem entry, but everything 'appears' to be ok now.


Thanks again for all the help!

Jonathan





___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Problem report] pack discards reachable object (was: [Zope] Pack problem with zeo)

2006-08-21 Thread Jonathan


- Original Message - 
From: Dieter Maurer [EMAIL PROTECTED]

To: Jonathan [EMAIL PROTECTED]
Cc: zope@zope.org; zodb-dev@zope.org
Sent: Monday, August 21, 2006 1:58 PM
Subject: Re: [Problem report] pack discards reachable object (was: [Zope] 
Pack problem with zeo)




Jonathan wrote at 2006-8-21 13:38 -0400:

...
I can reproduce the behaviour very easily... after I pack and the
'ZeoServer1' folder disappears i do the following:

- stop zope
- delete Data.fs
- rename Data.fs.old to Data.fs
- start zope

And the ZeoServer1 folder is back.  I then pack zope and the ZeoServer1
folder disappears again.  I can do this again and again and again.


If your Data.fs.old is not too large (not larger than 1 MB)
and on the path to the ZeoServer1 are only standard Zope objects, you
could send it to me for investigation ([bg]zip it, to make it smaller).


Thanks for the very kind offer but the Data.fs file is 53Mb before packing 
and 7.8Mb after packing. I tried tar/gzip but the 53Mb only dropped down to 
8.9Mb.


Thanks again for the offer.

Jonathan

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Problem report] pack discards reachable object (was: [Zope] Pack problem with zeo)

2006-08-21 Thread Dieter Maurer
Jonathan wrote at 2006-8-21 14:05 -0400:
 ...
And the ZeoServer1 folder is back.  I then pack zope and the ZeoServer1
folder disappears again.  I can do this again and again and again.

 If your Data.fs.old is not too large (not larger than 1 MB)
 and on the path to the ZeoServer1 are only standard Zope objects, you
 could send it to me for investigation ([bg]zip it, to make it smaller).

Thanks for the very kind offer but the Data.fs file is 53Mb before packing 
and 7.8Mb after packing. I tried tar/gzip but the 53Mb only dropped down to 
8.9Mb.

Then you may try the following:

  Manually add the mount point after packing.
  Pack again and see whether the mount point will still vanish.
  If it does, gzip and sent it to me (privately).



-- 
Dieter
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )