[Zope3-checkins] SVN: Zope3/trunk/ Merged from 3.2 branch:

Jim Fulton jim at zope.com
Sat Dec 24 11:33:29 EST 2005


Log message for revision 41016:
  Merged from 3.2 branch:
  
  ------------------------------------------------------------------------
    r40831 | jim | 2005-12-16 16:05:41 -0500 (Fri, 16 Dec 2005) | 1 line
    r40828 | jim | 2005-12-16 15:09:54 -0500 (Fri, 16 Dec 2005) | 3 lines
  
  Added a --zserver option to mkzopeinstance to create a server that
    uses the older ZServer network server.
  

Changed:
  U   Zope3/trunk/doc/CHANGES.txt
  U   Zope3/trunk/src/zope/app/server/mkzopeinstance.py
  U   Zope3/trunk/src/zope/app/server/tests/test_mkzopeinstance.py
  A   Zope3/trunk/src/zope/app/server/zopeskel/

-=-
Modified: Zope3/trunk/doc/CHANGES.txt
===================================================================
--- Zope3/trunk/doc/CHANGES.txt	2005-12-24 04:55:14 UTC (rev 41015)
+++ Zope3/trunk/doc/CHANGES.txt	2005-12-24 16:33:28 UTC (rev 41016)
@@ -10,6 +10,8 @@
 
     Restructuring
 
+    Bug Fixes
+
       - zope.app.content_types is now the package zope.app.contenttypes
         (code backported from Zope 2)
 
@@ -24,8 +26,22 @@
 
   Zope 3.2.0b2
 
+    New features
+
+      - Added an option to mkzopeinstance to create instances that use
+        ZServer, rather than Twisted.  The Twisted integration needs
+        some more work and testing before it's ready for production
+        use.
+
     Bug Fixes
 
+      - Uodated to a new version of twisted that fixes a bug in
+        calling request bidy stream read methods without passing
+        arguments. http://www.zope.org/Collectors/Zope3-dev/521.
+
+      - In zopeskel/etc/zope.conf.in, use the same default port number
+        as the one in ZEO/mkzeoinst.py.
+
       - Fixed a nasty bug that was hiding ``INotFoundError`` exceptions behind
         an empty page.
 

Modified: Zope3/trunk/src/zope/app/server/mkzopeinstance.py
===================================================================
--- Zope3/trunk/src/zope/app/server/mkzopeinstance.py	2005-12-24 04:55:14 UTC (rev 41015)
+++ Zope3/trunk/src/zope/app/server/mkzopeinstance.py	2005-12-24 16:33:28 UTC (rev 41016)
@@ -33,8 +33,8 @@
 
 from zope.app.authentication import password
 from zope.app.applicationcontrol import zopeversion
+import zope.app.server
 
-
 def main(argv=None, from_checkout=False):
     """Top-level script function to create a new Zope instance."""
     if argv is None:
@@ -224,6 +224,13 @@
             ("<<SOFTWARE_HOME>>", software_home),
             ]
         self.copytree(self.options.skeleton, self.options.destination)
+        if options.zserver:
+            self.copytree(
+                os.path.join(os.path.dirname(zope.app.server.__file__),
+                             'zopeskel'),
+                self.options.destination,
+                )
+            
 
     def copytree(self, src, dst):
         # Similar to shutil.copytree(), but doesn't care about
@@ -300,6 +307,17 @@
                  help="set the user name and password of the initial user")
     p.add_option("--non-interactive", dest="interactive", action="store_false",
                  default=True, help="do no interactive prompting")
+    p.add_option("--zserver", dest="zserver", action="store_true",
+                 help="""\
+Use the older ZServer network server rather than the default Twisted
+server.  The Twisted integration with Zope is experimental and not
+recommended for use in production sites.  We do encourage it's
+use in development or in sites that can stand a little uncertianty, so
+that we can gain more experience with it.
+""",
+                 )
+
+    
     options, args = p.parse_args(argv[1:])
     if options.skeleton is None:
         options.add_package_includes = from_checkout

Modified: Zope3/trunk/src/zope/app/server/tests/test_mkzopeinstance.py
===================================================================
--- Zope3/trunk/src/zope/app/server/tests/test_mkzopeinstance.py	2005-12-24 04:55:14 UTC (rev 41015)
+++ Zope3/trunk/src/zope/app/server/tests/test_mkzopeinstance.py	2005-12-24 16:33:28 UTC (rev 41016)
@@ -20,6 +20,7 @@
 import sys
 import tempfile
 import unittest
+import zope.app.server
 
 from StringIO import StringIO
 
@@ -187,6 +188,35 @@
         self.assertEqual(input, [])
         self.failUnless(app.all_input_consumed())
 
+    def test_zserver_support(self):
+
+        # test the zserver option.  We should get zserver versions of
+        # runzope, zopectl, debugzope and zope.conf.  Any of these
+        # that we provide in put skeleton should be overritten.
+
+        # privide a dummy runzope
+        os.mkdir(os.path.join(self.skeleton, 'bin'))
+        f = open(os.path.join(self.skeleton, 'bin', 'runzope.in'), 'w')
+        f.write('runzope')
+        f.close()
+        
+        options = self.createOptions()
+        options.destination = self.instance
+        options.interactive = False
+        app = ControlledInputApplication(options, [])
+        self.assertEqual(app.process(), 0)
+
+        self.assert_('from zope.app.server.main import main' in
+                     open(os.path.join(self.instance, 'bin', 'runzope'))
+                     )
+        self.assert_('from zope.app.server.main import debug' in
+                     open(os.path.join(self.instance, 'bin', 'debugzope'))
+                     )
+        self.assert_(os.path.exists(
+            os.path.join(self.instance, 'etc', 'zope.conf')
+            ))
+
+
     def test_process_aborts_on_file_destination(self):
         options = self.createOptions()
         options.destination = self.instance

Copied: Zope3/trunk/src/zope/app/server/zopeskel (from rev 40828, Zope3/branches/3.2/src/zope/app/server/zopeskel)



More information about the Zope3-Checkins mailing list