[Checkins] SVN: grokcore.startup/trunk/ remove zdaemon support. the upgrade notes will be moved to the grok upgrade notes

Jan-Jaap Driessen jdriessen at thehealthagency.com
Wed Apr 14 08:38:50 EDT 2010


Log message for revision 110869:
  remove zdaemon support. the upgrade notes will be moved to the grok upgrade notes

Changed:
  U   grokcore.startup/trunk/CHANGES.txt
  U   grokcore.startup/trunk/src/grokcore/startup/README.txt
  U   grokcore.startup/trunk/src/grokcore/startup/__init__.py
  U   grokcore.startup/trunk/src/grokcore/startup/startup.py

-=-
Modified: grokcore.startup/trunk/CHANGES.txt
===================================================================
--- grokcore.startup/trunk/CHANGES.txt	2010-04-14 12:37:06 UTC (rev 110868)
+++ grokcore.startup/trunk/CHANGES.txt	2010-04-14 12:38:49 UTC (rev 110869)
@@ -4,6 +4,10 @@
 0.5 (unreleased)
 ================
 
+- Remove the zdaemon controller.
+
+- The upgrade notes will be moved to the Grok upgrade notes.
+
 - Define entry points for main and debug application factories in
   grokcore.startup.
 

Modified: grokcore.startup/trunk/src/grokcore/startup/README.txt
===================================================================
--- grokcore.startup/trunk/src/grokcore/startup/README.txt	2010-04-14 12:37:06 UTC (rev 110868)
+++ grokcore.startup/trunk/src/grokcore/startup/README.txt	2010-04-14 12:38:49 UTC (rev 110869)
@@ -271,97 +271,7 @@
 
     >>> from grokcore.startup import interactive_debug_prompt
 
-``zdaemon_controller(zdaemon_conf_path)``
------------------------------------------
 
-  Wrapper function to start a zdaemon.
-
-  Normally used as entry point in projects ``setup.py``.
-
-  The zdaemon is started using the given configuration in
-  `zdaemon_conf_path`.
-
-  We do not start a complete environment here, but we can at least
-  import the wrapper function::
-
-    >>> from grokcore.startup import zdaemon_controller
-
-  Clean up::
-
-    >>> import shutil
-    >>> shutil.rmtree(temp_dir)
-
-
-Update Instructions
-*******************
-
-If you want to update an existing Grok project to make use of
-``grokcore.startup``, then there are several possibilites depending on
-what version of `grokproject_` you used to create the project.
-
-First you have to make sure, that ``grokcore.startup`` is installed
-locally and loaded on startup. This can be done by adding::
-
-  grokcore.startup
-
-to the list of requirements of your project in ``setup.py``.
-
-Upcoming versions of Grok (> 1.0a1) will require ``grokcore.startup``
-anyway, so that if you use `grok`_ > 1.0.a1 then you can skip this
-step.
-
-Projects with a ``startup.py`` file
-===================================
-
-If you can find a file ``startup.py`` in your Grok application
-sources, then chances are good, that your project was already created
-with paster support (and you should be able to find an ``etc/``
-configuration directory in your project root) and you can do an update
-in three steps:
-
-1) In your project's ``setup.py`` add a dependency to
-   ``grokcore.startup``.
-
-2) In your project's ``setup.py`` modify the lines reading::
-
-      [paste.app_factory]
-      main = <myapplication>.startup:application_factory
-
-  to::
-
-      [paste.app_factory]
-      main = grokcore.startup:application_factory
-
-  and rerun buildout::
-
-      $ bin/buildout
-
-2) Remove ``startup.py`` from your application sources.
-
-
-Projects without a ``startup.py`` file
-======================================
-
-Here the situation is more tricky, because you have to generate all
-the configuration files needed py `Paste`_.
-
-You can setup those files manually following the instructions above or
-simply create a new grokproject with the same name and copy all source
-files (i.e. the stuff below your ``src/`` directory) over to the new
-project directory.
-
-If you decide to switch manually, then chances are that you can reuse
-**parts** of your old ``zope.conf`` or ``site.zcml`` files (located
-somewhere in the ``parts/`` directory) but overall it might be faster
-(and less error-prone) to simply create a new project with the same
-name using a recent `grokproject`_ and copying the old sources (inside
-the ``src/`` directory) over.
-
-Afterwards you should also rerun buildout to make all changes active::
-
-  $ bin/buildout
-
-
 .. _grok: http://pypi.python.org/pypi/grok
 .. _grokproject: http://pypi.python.org/pypi/grokproject
 .. _Paste: http://pythonpaste.org/

Modified: grokcore.startup/trunk/src/grokcore/startup/__init__.py
===================================================================
--- grokcore.startup/trunk/src/grokcore/startup/__init__.py	2010-04-14 12:37:06 UTC (rev 110868)
+++ grokcore.startup/trunk/src/grokcore/startup/__init__.py	2010-04-14 12:38:49 UTC (rev 110869)
@@ -14,5 +14,5 @@
 # Make this a package.
 from grokcore.startup.startup import (application_factory,
                                       debug_application_factory,
-                                      interactive_debug_prompt,
-                                      zdaemon_controller)
+                                      interactive_debug_prompt)
+

Modified: grokcore.startup/trunk/src/grokcore/startup/startup.py
===================================================================
--- grokcore.startup/trunk/src/grokcore/startup/startup.py	2010-04-14 12:37:06 UTC (rev 110868)
+++ grokcore.startup/trunk/src/grokcore/startup/startup.py	2010-04-14 12:38:49 UTC (rev 110869)
@@ -1,12 +1,9 @@
 import os.path
-import sys
 import code
-import zdaemon.zdctl
 import zope.app.wsgi
 import zope.app.debug
 
 from zope.component import provideAdapter
-from zope.security.interfaces import IUnauthorized
 from zope.publisher.interfaces import IReRaiseException
 from zope.dottedname.resolve import resolve
 
@@ -48,16 +45,3 @@
                                         'app':      debugger,
                                         'root':     debugger.root()})
 
-class ControllerCommands(zdaemon.zdctl.ZDCmd):
-
-    def do_debug(self, rest):
-        interactive_debug_prompt()
-
-    def help_debug(self):
-        print "debug -- Initialize the application, providing a debugger"
-        print "         object at an interactive Python prompt."
-
-def zdaemon_controller(zdaemon_conf=os.path.join('parts', 'etc',
-                                                 'zdaemon.conf')):
-    args = ['-C', zdaemon_conf] + sys.argv[1:]
-    zdaemon.zdctl.main(args, options=None, cmdclass=ControllerCommands)



More information about the checkins mailing list