[Zope-Checkins] SVN: Zope/branches/2.9/ Several zope.app packages were forgotten to be included in the

2005-12-12 Thread Philipp von Weitershausen
Log message for revision 40726:
  Several zope.app packages were forgotten to be included in the
  first beta due to the now zpkg-based build and release process.
  

Changed:
  U   Zope/branches/2.9/doc/CHANGES.txt
  U   Zope/branches/2.9/releases/Zope2/DEPENDENCIES.cfg

-=-
Modified: Zope/branches/2.9/doc/CHANGES.txt
===
--- Zope/branches/2.9/doc/CHANGES.txt   2005-12-12 14:18:05 UTC (rev 40725)
+++ Zope/branches/2.9/doc/CHANGES.txt   2005-12-12 14:48:25 UTC (rev 40726)
@@ -27,7 +27,8 @@
 
 Bugs fixed
 
- 
+ - Several zope.app packages were forgotten to be included in the
+   first beta due to the now zpkg-based build and release process.
 
 Features added
 

Modified: Zope/branches/2.9/releases/Zope2/DEPENDENCIES.cfg
===
--- Zope/branches/2.9/releases/Zope2/DEPENDENCIES.cfg   2005-12-12 14:18:05 UTC 
(rev 40725)
+++ Zope/branches/2.9/releases/Zope2/DEPENDENCIES.cfg   2005-12-12 14:48:25 UTC 
(rev 40726)
@@ -53,6 +53,15 @@
 zLOG
 
 zope.app
+zope.app.apidoc
+zope.app.cache
+zope.app.dtmlpage
+zope.app.mail
+zope.app.onlinehelp
+zope.app.rdb
+zope.app.sqlscript
+zope.app.undo
+zope.app.zptpage
 
 # zope.app depends for us on:
 # - ZODB

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


[Zope-Checkins] SVN: Zope/trunk/releases/Zope2/DEPENDENCIES.cfg Merge r40726 from 2.9 branch:

2005-12-12 Thread Philipp von Weitershausen
Log message for revision 40727:
  Merge r40726 from 2.9 branch:
Several zope.app packages were forgotten to be included in the
first beta due to the now zpkg-based build and release process.
  

Changed:
  U   Zope/trunk/releases/Zope2/DEPENDENCIES.cfg

-=-
Modified: Zope/trunk/releases/Zope2/DEPENDENCIES.cfg
===
--- Zope/trunk/releases/Zope2/DEPENDENCIES.cfg  2005-12-12 14:48:25 UTC (rev 
40726)
+++ Zope/trunk/releases/Zope2/DEPENDENCIES.cfg  2005-12-12 14:55:28 UTC (rev 
40727)
@@ -53,6 +53,15 @@
 zLOG
 
 zope.app
+zope.app.apidoc
+zope.app.cache
+zope.app.dtmlpage
+zope.app.mail
+zope.app.onlinehelp
+zope.app.rdb
+zope.app.sqlscript
+zope.app.undo
+zope.app.zptpage
 
 # zope.app depends for us on:
 # - ZODB

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


[Zope-Checkins] SVN: Zope/trunk/doc/INSTALL.txt Trivial typo, WEBSERVER.txt was misspelled.

2005-12-12 Thread Paul Winkler
Log message for revision 40731:
  Trivial typo, WEBSERVER.txt was misspelled.
  

Changed:
  U   Zope/trunk/doc/INSTALL.txt

-=-
Modified: Zope/trunk/doc/INSTALL.txt
===
--- Zope/trunk/doc/INSTALL.txt  2005-12-12 15:56:57 UTC (rev 40730)
+++ Zope/trunk/doc/INSTALL.txt  2005-12-12 16:13:53 UTC (rev 40731)
@@ -181,7 +181,7 @@
 
   Zope doesn't require any existing webserver to run, but you can
   integrate it with other webservers as necessary.  See the
-  WEBSERVERS.txt file for more information about configuring Zope with
+  WEBSERVER.txt file for more information about configuring Zope with
   an existing web server.  There is also information about integrating
   Zope with existing webservers on the Zope.org website.
 

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


[Zope-Checkins] SVN: Zope/branches/2.9/doc/ Trivial doc fixes from trunk.

2005-12-12 Thread Paul Winkler
Log message for revision 40736:
  Trivial doc fixes from trunk.
  

Changed:
  U   Zope/branches/2.9/doc/FAQ.txt
  U   Zope/branches/2.9/doc/INSTALL.txt

-=-
Modified: Zope/branches/2.9/doc/FAQ.txt
===
--- Zope/branches/2.9/doc/FAQ.txt   2005-12-12 16:31:56 UTC (rev 40735)
+++ Zope/branches/2.9/doc/FAQ.txt   2005-12-12 16:36:13 UTC (rev 40736)
@@ -277,15 +277,11 @@
browser.  Clear your cache and view the HTML source again.
 
 
-2. I'm using Python 2.4 and I'm having a problem ...
+2. I'm using Python 2.x and I'm having a problem ...
 
-   As of the release of Zope 2.8, Python 2.4 has not been approved for 
-   use with any version of Zope yet.  Please use Python 2.3. 
-
The correct version of Python should always be automatically detected
and used when you configure and install Zope. In general, you 
should let the configure script do its job and don't try to 
force an unsupported version of Python!
 
 
-

Modified: Zope/branches/2.9/doc/INSTALL.txt
===
--- Zope/branches/2.9/doc/INSTALL.txt   2005-12-12 16:31:56 UTC (rev 40735)
+++ Zope/branches/2.9/doc/INSTALL.txt   2005-12-12 16:36:13 UTC (rev 40736)
@@ -181,7 +181,7 @@
 
   Zope doesn't require any existing webserver to run, but you can
   integrate it with other webservers as necessary.  See the
-  WEBSERVERS.txt file for more information about configuring Zope with
+  WEBSERVER.txt file for more information about configuring Zope with
   an existing web server.  There is also information about integrating
   Zope with existing webservers on the Zope.org website.
 

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


[Zope-Checkins] SVN: Zope/branches/publication-refactor/lib/python/ZPublisher/ - Implemented traverseName method and changed BaseRequest to use a (singleton) publication object

2005-12-12 Thread Sidnei da Silva
Log message for revision 40746:
  
  - Implemented traverseName method and changed BaseRequest to use a 
(singleton) publication object
  

Changed:
  U   Zope/branches/publication-refactor/lib/python/ZPublisher/BaseRequest.py
  U   Zope/branches/publication-refactor/lib/python/ZPublisher/Publication.py

-=-
Modified: 
Zope/branches/publication-refactor/lib/python/ZPublisher/BaseRequest.py
===
--- Zope/branches/publication-refactor/lib/python/ZPublisher/BaseRequest.py 
2005-12-12 18:50:08 UTC (rev 40745)
+++ Zope/branches/publication-refactor/lib/python/ZPublisher/BaseRequest.py 
2005-12-12 18:50:34 UTC (rev 40746)
@@ -14,13 +14,14 @@
 
 $Id$
 
-from urllib import quote
+
 import xmlrpc
+from urllib import quote
+from zope.publisher.interfaces import NotFound
+
 from zExceptions import Forbidden
+from ZPublisher.Publication import get_publication
 
-from zope.event import notify
-from zope.app.publication.interfaces import EndRequestEvent
-
 UNSPECIFIED_ROLES=''
 
 try:
@@ -81,11 +82,13 @@
 if other is None: other=kw
 else: other.update(kw)
 self.other=other
+self.publication = get_publication()
 
 def close(self):
 self.other.clear()
-self._held=None
-notify(EndRequestEvent(None, self))
+self._held = None
+self.publication = None
+self.publication.endRequest(self, None)
 
 def processInputs(self):
 Do any input processing that could raise errors
@@ -155,7 +158,7 @@
 
 def __contains__(self, key):
 return self.has_key(key)
-
+
 def keys(self):
 keys = {}
 keys.update(self.common)
@@ -231,28 +234,14 @@
 no_acquire_flag=0
 
 URL=request['URL']
-parents=request['PARENTS']
-object=parents[-1]
+parents = request['PARENTS']
 del parents[:]
 
-roles = getRoles(None, None, object, UNSPECIFIED_ROLES)
-
-# if the top object has a __bobo_traverse__ method, then use it
-# to possibly traverse to an alternate top-level object.
-if hasattr(object,'__bobo_traverse__'):
-try:
-object=object.__bobo_traverse__(request)
-roles = getRoles(None, None, object, UNSPECIFIED_ROLES)
-except: pass
-
 if not path and not method:
 return response.forbiddenError(self['URL'])
 
-# Traverse the URL to find the object:
-if hasattr(object, '__of__'):
-# Try to bind the top-level object to the request
-# This is how you get 'self.REQUEST'
-object=object.__of__(RequestContainer(REQUEST=request))
+object = self.publication.getApplication(self)
+roles = getRoles(None, None, object, UNSPECIFIED_ROLES)
 parents.append(object)
 
 steps=self.steps
@@ -270,9 +259,7 @@
 # We build parents in the wrong order, so we
 # need to make sure we reverse it when we're doe.
 while 1:
-bpth = getattr(object, '__before_publishing_traverse__', None)
-if bpth is not None:
-bpth(object, self)
+self.publication.callTraversalHooks(self, object)
 
 path = request.path = request['TraversalRequestNameStack']
 # Check for method:
@@ -318,48 +305,16 @@
   Object name begins with an underscore at: %s % URL)
 else: return response.forbiddenError(entry_name)
 
-if hasattr(object,'__bobo_traverse__'):
-try:
-subobject=object.__bobo_traverse__(request,entry_name)
-if type(subobject) is type(()) and len(subobject)  1:
-# Add additional parents into the path
-parents[-1:] = list(subobject[:-1])
-object, subobject = subobject[-2:]
-except (AttributeError, KeyError):
-if debug_mode:
-return response.debugError(
-Cannot locate object at: %s % URL)
-else:
-return response.notFoundError(URL)
-else:
-try:
-# Note - no_acquire_flag is necessary to support
-# things like DAV.  We have to make sure
-# that the target object is not acquired
-# if the request_method is other than GET
-# or POST. Otherwise, you could never use
-# PUT to add a new object named 'test' if
-# an object 'test' existed above it in the
-# heirarchy -- you'd always get the
-# existing object :(
+try:
+

[Zope-Checkins] SVN: Zope/branches/publication-refactor/lib/python/ZPublisher/ - Make Publish.py use the new IPublication object

2005-12-12 Thread Sidnei da Silva
Log message for revision 40750:
  
  - Make Publish.py use the new IPublication object
  

Changed:
  U   Zope/branches/publication-refactor/lib/python/ZPublisher/BaseRequest.py
  U   Zope/branches/publication-refactor/lib/python/ZPublisher/Publication.py
  U   Zope/branches/publication-refactor/lib/python/ZPublisher/Publish.py

-=-
Modified: 
Zope/branches/publication-refactor/lib/python/ZPublisher/BaseRequest.py
===
--- Zope/branches/publication-refactor/lib/python/ZPublisher/BaseRequest.py 
2005-12-12 18:57:23 UTC (rev 40749)
+++ Zope/branches/publication-refactor/lib/python/ZPublisher/BaseRequest.py 
2005-12-12 19:16:05 UTC (rev 40750)
@@ -20,7 +20,6 @@
 from zope.publisher.interfaces import NotFound
 
 from zExceptions import Forbidden
-from ZPublisher.Publication import get_publication
 
 UNSPECIFIED_ROLES=''
 
@@ -81,9 +80,13 @@
 
 if other is None: other=kw
 else: other.update(kw)
-self.other=other
-self.publication = get_publication()
+self.other = other
+# Publication will be set by ZPublisher.Publish, publish().
+self.publication = None
 
+def setPublication(self, publication):
+self.publication = publication
+
 def close(self):
 self.other.clear()
 self._held = None

Modified: 
Zope/branches/publication-refactor/lib/python/ZPublisher/Publication.py
===
--- Zope/branches/publication-refactor/lib/python/ZPublisher/Publication.py 
2005-12-12 18:57:23 UTC (rev 40749)
+++ Zope/branches/publication-refactor/lib/python/ZPublisher/Publication.py 
2005-12-12 19:16:05 UTC (rev 40750)
@@ -99,12 +99,9 @@
 
 def afterCall(self, request, ob):
 # Last part of ZPublisher.Publish.{publish, publish_module_standard},
-# commit the transaction and call 'bobo_after' hook if one was
-# provided.
+# commit the transaction.
 if self.transactions_manager:
 self.transactions_manager.commit()
-if self.bobo_after is not None:
-self.bobo_after()
 
 def endRequest(self, request, ob):
 # End the request the Zope 3-way, by firing an event.
@@ -122,11 +119,14 @@
 if self.transactions_manager:
 self.transactions_manager.recordMetaData(ob, request)
 
+def _abort(self):
+if self.transactions_manager:
+self.transactions_manager.abort()
+
 def handleException(self, object, request, exc_info, retry_allowed=True):
 # Some exception handling from ZPublisher.Publish.publish().
 if self.err_hook is None:
-if transactions_manager:
-transactions_manager.abort()
+self._abort()
 raise
 
 # If an err_hook was registered, use it.
@@ -145,8 +145,7 @@
  exc_info[2],
  )
 finally:
-if self.transactions_manager:
-self.transactions_manager.abort()
+self._abort()
 
 # XXX After this code, in ZPublisher.Publish.publish(), Zope 2
 # does a 'Retry' if a 'Retry' exception happens and the
@@ -199,8 +198,10 @@
 raise NotFound(ob, name)
 
 _publication = None
-def get_publication(module_name):
+def get_publication(module_name=None):
 global _publication
+if module_name is None:
+module_name = Zope2
 if _publication is None:
-_publication = ZopePublication(db=None, module_name=Zope2)
+_publication = ZopePublication(db=None, module_name=module_name)
 return _publication

Modified: Zope/branches/publication-refactor/lib/python/ZPublisher/Publish.py
===
--- Zope/branches/publication-refactor/lib/python/ZPublisher/Publish.py 
2005-12-12 18:57:23 UTC (rev 40749)
+++ Zope/branches/publication-refactor/lib/python/ZPublisher/Publish.py 
2005-12-12 19:16:05 UTC (rev 40750)
@@ -59,67 +59,70 @@
 _default_realm = realm
 
 def publish(request, module_name, after_list, debug=0,
-# Optimize:
+# Optimize (now unused).
 call_object=call_object,
 missing_name=missing_name,
 dont_publish_class=dont_publish_class,
 mapply=mapply,
 ):
 
-(bobo_before, bobo_after, object, realm, debug_mode, err_hook,
- validated_hook, transactions_manager)= get_module_info(module_name)
+# We assume the publication object returned is the one in
+# ZPublisher.Publication here so we don't bother using accessors
+# and poke directly into the variables.
+from ZPublisher.Publication import get_publication
+publication = get_publication(module_name)
+request.setPublication(publication)
 
-parents=None
-response=None
+# BBB: bobo_after hooks are called from 

[Zope-Checkins] SVN: Zope/branches/2.9/ OFS ObjectManager: Fixed list_imports() to tolerate missing

2005-12-12 Thread Paul Winkler
Log message for revision 40756:
  OFS ObjectManager: Fixed list_imports() to tolerate missing
  import directories. (Merged from trunk.)
  

Changed:
  U   Zope/branches/2.9/doc/CHANGES.txt
  U   Zope/branches/2.9/lib/python/OFS/ObjectManager.py
  U   Zope/branches/2.9/lib/python/OFS/tests/testObjectManager.py

-=-
Modified: Zope/branches/2.9/doc/CHANGES.txt
===
--- Zope/branches/2.9/doc/CHANGES.txt   2005-12-12 21:05:33 UTC (rev 40755)
+++ Zope/branches/2.9/doc/CHANGES.txt   2005-12-12 21:07:07 UTC (rev 40756)
@@ -27,6 +27,9 @@
 
 Bugs fixed
 
+ - OFS ObjectManager: Fixed list_imports() to tolerate missing
+   import directories.
+
  - Collector #1965: 'get_transaction' missing from builtins without
sufficient deprecation notice (ZODB 3.6 properly removed it, but
Zope needs to keep it for another release).

Modified: Zope/branches/2.9/lib/python/OFS/ObjectManager.py
===
--- Zope/branches/2.9/lib/python/OFS/ObjectManager.py   2005-12-12 21:05:33 UTC 
(rev 40755)
+++ Zope/branches/2.9/lib/python/OFS/ObjectManager.py   2005-12-12 21:07:07 UTC 
(rev 40756)
@@ -619,6 +619,8 @@
 paths.append(cfg.instancehome)
 for impath in paths:
 directory = os.path.join(impath, 'import')
+if not os.path.isdir(directory):
+continue
 listing += [f for f in os.listdir(directory)
 if f.endswith('.zexp') or f.endswith('.xml')]
 return listing

Modified: Zope/branches/2.9/lib/python/OFS/tests/testObjectManager.py
===
--- Zope/branches/2.9/lib/python/OFS/tests/testObjectManager.py 2005-12-12 
21:05:33 UTC (rev 40755)
+++ Zope/branches/2.9/lib/python/OFS/tests/testObjectManager.py 2005-12-12 
21:07:07 UTC (rev 40756)
@@ -108,7 +108,6 @@
 self.assertEqual( si.__ac_local_roles__, None )
 
 def test_setObject_set_owner_with_emergency_user( self ):
-
 om = self._makeOne()
 
 newSecurityManager( None, emergency_user )
@@ -380,6 +379,16 @@
 self.assertRaises(BadRequest, om._setObject, 'REQUEST', si)
 self.assertRaises(BadRequest, om._setObject, '/', si)
 
+def test_list_imports(self):
+om = self._makeOne()
+# This must work whether we've done make instance or not.
+# So list_imports() may return an empty list, or whatever's
+# in skel/import. Tolerate both cases.
+self.failUnless(isinstance(om.list_imports(), list))
+for filename in om.list_imports():
+self.failUnless(filename.endswith('.zexp') or
+filename.endswith('.xml'))
+
 def test_suite():
 suite = unittest.TestSuite()
 suite.addTest( unittest.makeSuite( ObjectManagerTests ) )

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


[Zope-Checkins] SVN: Zope/branches/publication-refactor/lib/python/ZPublisher/Publication.py - Inline before_publishing_traverse handling and then fire the event

2005-12-12 Thread Sidnei da Silva
Log message for revision 40757:
  
  - Inline before_publishing_traverse handling and then fire the event
  

Changed:
  U   Zope/branches/publication-refactor/lib/python/ZPublisher/Publication.py

-=-
Modified: 
Zope/branches/publication-refactor/lib/python/ZPublisher/Publication.py
===
--- Zope/branches/publication-refactor/lib/python/ZPublisher/Publication.py 
2005-12-12 21:07:07 UTC (rev 40756)
+++ Zope/branches/publication-refactor/lib/python/ZPublisher/Publication.py 
2005-12-12 21:23:59 UTC (rev 40757)
@@ -20,8 +20,6 @@
 from zope.publisher.interfaces import NotFound, IPublicationRequest
 from zope.app.publication.interfaces import EndRequestEvent
 from zope.app.publication.interfaces import BeforeTraverseEvent
-from zope.app.publication.interfaces import IBeforeTraverseEvent
-from zope.app.testing import ztapi
 
 from ZPublisher.Publish import Retry
 from ZPublisher.Publish import get_module_info, call_object
@@ -59,8 +57,12 @@
 self.transactions_manager.begin()
 
 def callTraversalHooks(self, request, ob):
-# Call __before_publishing_traverse__ hooks the Zope 3-way by
-# firing an event.
+# Call __before_publishing_traverse__ hooks
+bpth = getattr(ob, '__before_publishing_traverse__', None)
+if bpth is not None:
+bpth(ob, request)
+
+# And then fire an event
 notify(BeforeTraverseEvent(ob, request))
 
 def afterTraversal(self, request, ob):
@@ -219,14 +221,3 @@
 _publications[module_name] = ZopePublication(db=None,
  module_name=module_name)
 return _publications[module_name]
-
-def bptSubscriber(event):
-ob = event.object
-request = event.request
-bpth = getattr(ob, '__before_publishing_traverse__', None)
-if bpth is not None:
-bpth(ob, request)
-
-# XXX Move to zcml.
-ztapi.subscribe([IBeforeTraverseEvent], None, bptSubscriber)
-

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