[Zope-Checkins] SVN: Zope/branches/haufe-legacy-integration/ Integration branch for Dieter's Haufe legacy

2009-05-10 Thread Andreas Jung
Log message for revision 99820:
  Integration branch for Dieter's Haufe legacy
  

Changed:
  A   Zope/branches/haufe-legacy-integration/

-=-
___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/branches/haufe-legacy-integration/ - Launchpad #373621: catching and logging exceptions that could cause

2009-05-10 Thread Andreas Jung
Log message for revision 99821:
  - Launchpad #373621: catching and logging exceptions that could cause
leaking of worker threads
  

Changed:
  U   Zope/branches/haufe-legacy-integration/doc/CHANGES.rst
  U   
Zope/branches/haufe-legacy-integration/src/ZServer/PubCore/ZServerPublisher.py

-=-
Modified: Zope/branches/haufe-legacy-integration/doc/CHANGES.rst
===
--- Zope/branches/haufe-legacy-integration/doc/CHANGES.rst  2009-05-10 
15:14:02 UTC (rev 99820)
+++ Zope/branches/haufe-legacy-integration/doc/CHANGES.rst  2009-05-10 
15:22:15 UTC (rev 99821)
@@ -23,6 +23,9 @@
 Features Added
 ++
 
+- Launchpad #373621: catching and logging exceptions that could cause
+  leaking of worker threads
+
 - zExceptions.convertExceptionType:  new API, breaking out conversion of
   exception names to exception types from 'upgradeException'.
 

Modified: 
Zope/branches/haufe-legacy-integration/src/ZServer/PubCore/ZServerPublisher.py
===
--- 
Zope/branches/haufe-legacy-integration/src/ZServer/PubCore/ZServerPublisher.py  
2009-05-10 15:14:02 UTC (rev 99820)
+++ 
Zope/branches/haufe-legacy-integration/src/ZServer/PubCore/ZServerPublisher.py  
2009-05-10 15:22:15 UTC (rev 99821)
@@ -11,11 +11,17 @@
 #
 ##
 
+import logging
+
+LOG = logging.getLogger('ZServerPublisher')
+
 class ZServerPublisher:
 def __init__(self, accept):
+from sys import exc_info
 from ZPublisher import publish_module
 from ZPublisher.WSGIPublisher import publish_module as publish_wsgi
 while 1:
+  try:
 name, a, b=accept()
 if name == Zope2:
 try:
@@ -36,3 +42,5 @@
 # TODO: Support keeping connections open.
 a['wsgi.output']._close = 1
 a['wsgi.output'].close()
+  except:
+LOG.error('exception caught', exc_info=True)

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/trunk/versions.cfg Added zope.principalregistry to the KGS, the package turns up as a dependency somewhere

2009-05-10 Thread Hanno Schlichting
Log message for revision 99822:
  Added zope.principalregistry to the KGS, the package turns up as a dependency 
somewhere
  

Changed:
  U   Zope/trunk/versions.cfg

-=-
Modified: Zope/trunk/versions.cfg
===
--- Zope/trunk/versions.cfg 2009-05-10 15:22:15 UTC (rev 99821)
+++ Zope/trunk/versions.cfg 2009-05-10 15:22:55 UTC (rev 99822)
@@ -109,6 +109,7 @@
 zope.password = 3.5.1
 zope.pagetemplate = 3.4.2
 zope.principalannotation = 3.6.0
+zope.principalregistry = 3.7.0
 zope.proxy = 3.5.0
 zope.publisher = 3.6.4
 zope.schema = 3.5.4

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/branches/haufe-legacy-integration/ - Launchpad #373621: catching and logging exceptions that could cause

2009-05-10 Thread Andreas Jung
Log message for revision 99823:
  
  - Launchpad #373621: catching and logging exceptions that could cause
leaking of worker threads
  

Changed:
  U   Zope/branches/haufe-legacy-integration/doc/CHANGES.rst
  U   Zope/branches/haufe-legacy-integration/src/Zope2/Startup/__init__.py

-=-
Modified: Zope/branches/haufe-legacy-integration/doc/CHANGES.rst
===
--- Zope/branches/haufe-legacy-integration/doc/CHANGES.rst  2009-05-10 
15:22:55 UTC (rev 99822)
+++ Zope/branches/haufe-legacy-integration/doc/CHANGES.rst  2009-05-10 
15:28:15 UTC (rev 99823)
@@ -26,6 +26,9 @@
 - Launchpad #373621: catching and logging exceptions that could cause
   leaking of worker threads
 
+- Launchpad #373577: setting up standard logging earlier within the startup
+  phase for improving the analysis of startup errors
+
 - zExceptions.convertExceptionType:  new API, breaking out conversion of
   exception names to exception types from 'upgradeException'.
 

Modified: Zope/branches/haufe-legacy-integration/src/Zope2/Startup/__init__.py
===
--- Zope/branches/haufe-legacy-integration/src/Zope2/Startup/__init__.py
2009-05-10 15:22:55 UTC (rev 99822)
+++ Zope/branches/haufe-legacy-integration/src/Zope2/Startup/__init__.py
2009-05-10 15:28:15 UTC (rev 99823)
@@ -86,6 +86,7 @@
 self.setupServers()
 # drop privileges after setting up servers
 self.dropPrivileges()
+self.setupFinalLogging()
 self.makeLockFile()
 self.makePidFile()
 self.setupInterpreter()
@@ -100,7 +101,6 @@
 # after it has emitted ZServer messages.
 
 logger.info('Ready to handle requests')
-self.setupFinalLogging()
 self.sendEvents()
 
 def run(self):

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/branches/haufe-legacy-integration/ - Launchpad #373601: abort transaction before connection close in order to

2009-05-10 Thread Andreas Jung
Log message for revision 99824:
  
  - Launchpad #373601: abort transaction before connection close in order to
prevent connection leaks in case of persistent changes after the main
transaction is closed.
  

Changed:
  U   Zope/branches/haufe-legacy-integration/doc/CHANGES.rst
  U   Zope/branches/haufe-legacy-integration/src/App/ZApplication.py

-=-
Modified: Zope/branches/haufe-legacy-integration/doc/CHANGES.rst
===
--- Zope/branches/haufe-legacy-integration/doc/CHANGES.rst  2009-05-10 
15:28:15 UTC (rev 99823)
+++ Zope/branches/haufe-legacy-integration/doc/CHANGES.rst  2009-05-10 
15:33:08 UTC (rev 99824)
@@ -24,11 +24,15 @@
 ++
 
 - Launchpad #373621: catching and logging exceptions that could cause
-  leaking of worker threads
+  leaking of worker threads.
 
 - Launchpad #373577: setting up standard logging earlier within the startup
-  phase for improving the analysis of startup errors
+  phase for improving the analysis of startup errors.
 
+- Launchpad #373601: abort transaction before connection close in order to
+  prevent connection leaks in case of persistent changes after the main
+  transaction is closed.
+
 - zExceptions.convertExceptionType:  new API, breaking out conversion of
   exception names to exception types from 'upgradeException'.
 

Modified: Zope/branches/haufe-legacy-integration/src/App/ZApplication.py
===
--- Zope/branches/haufe-legacy-integration/src/App/ZApplication.py  
2009-05-10 15:28:15 UTC (rev 99823)
+++ Zope/branches/haufe-legacy-integration/src/App/ZApplication.py  
2009-05-10 15:33:08 UTC (rev 99824)
@@ -80,4 +80,5 @@
 self._jar = jar
 
 def __del__(self):
+transaction.abort()
 self._jar.close()

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/branches/haufe-legacy-integration/ - Launchpad #373583: ZODBMountPoint - fixed broken mount support and

2009-05-10 Thread Andreas Jung
Log message for revision 99825:
  - Launchpad #373583: ZODBMountPoint - fixed broken mount support and 
extended the test suite.
  

Changed:
  U   Zope/branches/haufe-legacy-integration/doc/CHANGES.rst
  U   
Zope/branches/haufe-legacy-integration/src/Products/ZODBMountPoint/MountedObject.py
  U   
Zope/branches/haufe-legacy-integration/src/Products/ZODBMountPoint/tests/testMountPoint.py

-=-
Modified: Zope/branches/haufe-legacy-integration/doc/CHANGES.rst
===
--- Zope/branches/haufe-legacy-integration/doc/CHANGES.rst  2009-05-10 
15:33:08 UTC (rev 99824)
+++ Zope/branches/haufe-legacy-integration/doc/CHANGES.rst  2009-05-10 
15:58:44 UTC (rev 99825)
@@ -23,6 +23,9 @@
 Features Added
 ++
 
+- Launchpad #373583: ZODBMountPoint - fixed broken mount support and 
+  extended the test suite.
+
 - Launchpad #373621: catching and logging exceptions that could cause
   leaking of worker threads.
 

Modified: 
Zope/branches/haufe-legacy-integration/src/Products/ZODBMountPoint/MountedObject.py
===
--- 
Zope/branches/haufe-legacy-integration/src/Products/ZODBMountPoint/MountedObject.py
 2009-05-10 15:33:08 UTC (rev 99824)
+++ 
Zope/branches/haufe-legacy-integration/src/Products/ZODBMountPoint/MountedObject.py
 2009-05-10 15:58:44 UTC (rev 99825)
@@ -59,9 +59,7 @@
 factory = guarded_getattr(dispatcher, 'manage_addFolder')
 factory(id)
 o = context.restrictedTraverse(id)
-# Commit a subtransaction to assign the new object to
-# the correct database.
-transaction.savepoint(optimistic=True)
+context._p_jar.add(o.aq_base)
 return o
 
 def traverseOrConstruct(self, path, omit_final=0):

Modified: 
Zope/branches/haufe-legacy-integration/src/Products/ZODBMountPoint/tests/testMountPoint.py
===
--- 
Zope/branches/haufe-legacy-integration/src/Products/ZODBMountPoint/tests/testMountPoint.py
  2009-05-10 15:33:08 UTC (rev 99824)
+++ 
Zope/branches/haufe-legacy-integration/src/Products/ZODBMountPoint/tests/testMountPoint.py
  2009-05-10 15:58:44 UTC (rev 99825)
@@ -83,6 +83,7 @@
 databases = [TestDBConfig('test_main.fs', ['/']).getDB(),
  TestDBConfig('test_mount1.fs', ['/mount1']).getDB(),
  TestDBConfig('test_mount2.fs', ['/mount2']).getDB(),
+ TestDBConfig('test_mount3.fs', ['/i/mount3']).getDB(),
  ]
 mount_points = {}
 mount_factories = {}
@@ -102,13 +103,21 @@
 root = conn.root()
 root['Application'] = app = Application()
 self.app = app
+install_products(app, 'ZCatalog', 'PluginIndexes', 'OFSP')
+# login
+from AccessControl.User import system
+from AccessControl.SecurityManagement import newSecurityManager
+newSecurityManager(None, system)
 transaction.commit()  # Get app._p_jar set
-manage_addMounts(app, ('/mount1', '/mount2'))
+manage_addMounts(app, ('/mount1', '/mount2', '/i/mount3'))
 transaction.commit()  # Get the mount points ready
 
 
 
 def tearDown(self):
+# logout
+from AccessControl.SecurityManagement import noSecurityManager
+noSecurityManager()
 App.config.setConfiguration(original_config)
 transaction.abort()
 self.app._p_jar.close()
@@ -120,6 +129,7 @@
 def testRead(self):
 self.assertEqual(self.app.mount1.id, 'mount1')
 self.assertEqual(self.app.mount2.id, 'mount2')
+self.assertEqual(self.app.i.mount3.id, 'mount3')
 
 def testWrite(self):
 app = self.app
@@ -144,6 +154,7 @@
 self.assertEqual(getMountPoint(self.app.mount1)._path, '/mount1')
 self.assert_(getMountPoint(self.app.mount2) is not None)
 self.assertEqual(getMountPoint(self.app.mount2)._path, '/mount2')
+self.assertEqual(getMountPoint(self.app.i.mount3)._path, '/i/mount3')
 del self.app.mount2
 self.app.mount2 = Folder()
 self.app.mount2.id = 'mount2'
@@ -160,8 +171,13 @@
 {'status': 'Ok',
  'path': '/mount2',
  'name': 'test_mount2.fs',
- 'exists': 1}]
-self.assertEqual(expected, status)
+ 'exists': 1},
+{'status': 'Ok',
+ 'path': '/i/mount3',
+ 'name': 'test_mount3.fs',
+ 'exists': 1},
+]
+self.assertEqual(sorted(expected), sorted(status))
 del self.app.mount2
 status = manage_getMountStatus(self.app)
 expected = [{'status': 'Ok',
@@ -171,8 +187,14 @@
 {'status': 'Ready to create',
  'path': '/mount2',
  'name': 'test_mount2.fs',

[Zope-Checkins] SVN: Zope/branches/haufe-legacy-integration/ - Launchpad #373658: traversal using (un)restrictedTraverse

2009-05-10 Thread Andreas Jung
Log message for revision 99829:
  
  - Launchpad #373658: traversal using (un)restrictedTraverse 
no longer depends no the existence of a request 
  
  

Changed:
  U   Zope/branches/haufe-legacy-integration/doc/CHANGES.rst
  U   Zope/branches/haufe-legacy-integration/src/OFS/Traversable.py

-=-
Modified: Zope/branches/haufe-legacy-integration/doc/CHANGES.rst
===
--- Zope/branches/haufe-legacy-integration/doc/CHANGES.rst  2009-05-10 
16:14:42 UTC (rev 99828)
+++ Zope/branches/haufe-legacy-integration/doc/CHANGES.rst  2009-05-10 
19:12:43 UTC (rev 99829)
@@ -23,6 +23,9 @@
 Features Added
 ++
 
+- Launchpad #373658: traversal using (un)restrictedTraverse 
+  no longer depends no the existence of a request 
+
 - Launchpad #373583: ZODBMountPoint - fixed broken mount support and 
   extended the test suite.
 

Modified: Zope/branches/haufe-legacy-integration/src/OFS/Traversable.py
===
--- Zope/branches/haufe-legacy-integration/src/OFS/Traversable.py   
2009-05-10 16:14:42 UTC (rev 99828)
+++ Zope/branches/haufe-legacy-integration/src/OFS/Traversable.py   
2009-05-10 19:12:43 UTC (rev 99829)
@@ -154,6 +154,7 @@
 path = list(path)
 
 REQUEST = {'TraversalRequestNameStack': path}
+web_request = getattr(self, 'REQUEST', None)
 path.reverse()
 path_pop = path.pop
 
@@ -198,7 +199,7 @@
 ns, nm = nsParse(name)
 try:
 next = namespaceLookup(
-ns, nm, obj, aq_acquire(self, 'REQUEST'))
+ns, nm, obj, web_request).__of__(obj)
 if IAcquirer.providedBy(next):
 next = next.__of__(obj)
 if restricted and not validate(
@@ -264,7 +265,7 @@
 
 except (AttributeError, NotFound, KeyError), e:
 # Try to look for a view
-next = queryMultiAdapter((obj, aq_acquire(self, 
'REQUEST')),
+next = queryMultiAdapter((obj, web_request),
  Interface, name)
 
 if next is not None:

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/branches/haufe-legacy-integration/ reverted last checkin (breaking tests)

2009-05-10 Thread Andreas Jung
Log message for revision 99831:
  reverted last checkin (breaking tests) 
  

Changed:
  U   Zope/branches/haufe-legacy-integration/doc/CHANGES.rst
  U   Zope/branches/haufe-legacy-integration/src/OFS/Traversable.py

-=-
Modified: Zope/branches/haufe-legacy-integration/doc/CHANGES.rst
===
--- Zope/branches/haufe-legacy-integration/doc/CHANGES.rst  2009-05-10 
23:52:35 UTC (rev 99830)
+++ Zope/branches/haufe-legacy-integration/doc/CHANGES.rst  2009-05-11 
04:25:37 UTC (rev 99831)
@@ -23,9 +23,6 @@
 Features Added
 ++
 
-- Launchpad #373658: traversal using (un)restrictedTraverse 
-  no longer depends no the existence of a request 
-
 - Launchpad #373583: ZODBMountPoint - fixed broken mount support and 
   extended the test suite.
 

Modified: Zope/branches/haufe-legacy-integration/src/OFS/Traversable.py
===
--- Zope/branches/haufe-legacy-integration/src/OFS/Traversable.py   
2009-05-10 23:52:35 UTC (rev 99830)
+++ Zope/branches/haufe-legacy-integration/src/OFS/Traversable.py   
2009-05-11 04:25:37 UTC (rev 99831)
@@ -154,7 +154,6 @@
 path = list(path)
 
 REQUEST = {'TraversalRequestNameStack': path}
-web_request = getattr(self, 'REQUEST', None)
 path.reverse()
 path_pop = path.pop
 
@@ -199,7 +198,7 @@
 ns, nm = nsParse(name)
 try:
 next = namespaceLookup(
-ns, nm, obj, web_request).__of__(obj)
+ns, nm, obj, aq_acquire(self, 'REQUEST'))
 if IAcquirer.providedBy(next):
 next = next.__of__(obj)
 if restricted and not validate(
@@ -265,7 +264,7 @@
 
 except (AttributeError, NotFound, KeyError), e:
 # Try to look for a view
-next = queryMultiAdapter((obj, web_request),
+next = queryMultiAdapter((obj, aq_acquire(self, 
'REQUEST')),
  Interface, name)
 
 if next is not None:

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins