[Checkins] SVN: Sandbox/philikon/zopeproject/trunk/ Renamed ``application.py`` to ``startup.py`` to make the intent of

Philipp von Weitershausen philikon at philikon.de
Sat Sep 15 07:13:15 EDT 2007


Log message for revision 79669:
  Renamed ``application.py`` to ``startup.py`` to make the intent of
  the module much clearer, and to avoid clashes with e.g. Grok (where
  "application" means something else, and ``app.py`` is commonly used
  for the application object).
  

Changed:
  U   Sandbox/philikon/zopeproject/trunk/README.txt
  U   Sandbox/philikon/zopeproject/trunk/zopeproject/zope_app/setup.py_tmpl
  D   Sandbox/philikon/zopeproject/trunk/zopeproject/zope_app/src/+package+/application.py
  A   Sandbox/philikon/zopeproject/trunk/zopeproject/zope_app/src/+package+/startup.py

-=-
Modified: Sandbox/philikon/zopeproject/trunk/README.txt
===================================================================
--- Sandbox/philikon/zopeproject/trunk/README.txt	2007-09-15 11:07:27 UTC (rev 79668)
+++ Sandbox/philikon/zopeproject/trunk/README.txt	2007-09-15 11:13:15 UTC (rev 79669)
@@ -113,9 +113,9 @@
 ``deploy.ini``
   Configuration file for PasteDeploy_.  It defines which server
   software to launch and which WSGI application to invoke upon each
-  request (which is defined in ``src/myzopeproj/application.py``).
-  You may also define WSGI middlewares here.  Invoke ``bin/paster
-  serve`` with this file as an argument.
+  request (which is defined in ``src/myzopeproj/startup.py``).  You
+  may also define WSGI middlewares here.  Invoke ``bin/paster serve``
+  with this file as an argument.
 
 ``debug.ini``
   Alternate configuration for PasteDeploy_ that configures a
@@ -124,7 +124,7 @@
 
 ``zope.conf``
   This file will be read by the application factory in
-  ``myzopeproj/application.py``.  Here you can define which ZCML file
+  ``src/myzopeproj/startup.py``.  Here you can define which ZCML file
   the application factory should load upon startup, the ZODB database
   instance, an event log as well as whether developer mode is switched
   on or not.
@@ -289,7 +289,7 @@
 * More improvements to the README.txt file.
 
 * Make use of ``zope.app.wsgi.getApplication()`` to reduce the startup
-  boiler-plate in ``application.py``.
+  boiler-plate in ``startup.py`` (formerly ``application.py``).
 
 * Added a debug script that configures the application and drops into
   an interpreter session.
@@ -306,6 +306,11 @@
   ~/.buildout/default.cfg did not contain an eggs-directory option,
   zopeproject failed with a ConfigParser.NoOptionError.
 
+* Renamed ``application.py`` to ``startup.py`` to make the intent of
+  the module much clearer, and to avoid clashes with e.g. Grok (where
+  "application" means something else, and ``app.py`` is commonly used
+  for the application object).
+
 0.3.2 (2007-07-17)
 ------------------
 

Modified: Sandbox/philikon/zopeproject/trunk/zopeproject/zope_app/setup.py_tmpl
===================================================================
--- Sandbox/philikon/zopeproject/trunk/zopeproject/zope_app/setup.py_tmpl	2007-09-15 11:07:27 UTC (rev 79668)
+++ Sandbox/philikon/zopeproject/trunk/zopeproject/zope_app/setup.py_tmpl	2007-09-15 11:13:15 UTC (rev 79669)
@@ -44,8 +44,8 @@
                         ],
       entry_points = """
       [console_scripts]
-      debug-${package} = ${package}.application:interactive_debug_prompt
+      debug-${package} = ${package}.startup:interactive_debug_prompt
       [paste.app_factory]
-      main = ${package}.application:application_factory
+      main = ${package}.startup:application_factory
       """
       )

Deleted: Sandbox/philikon/zopeproject/trunk/zopeproject/zope_app/src/+package+/application.py
===================================================================
--- Sandbox/philikon/zopeproject/trunk/zopeproject/zope_app/src/+package+/application.py	2007-09-15 11:07:27 UTC (rev 79668)
+++ Sandbox/philikon/zopeproject/trunk/zopeproject/zope_app/src/+package+/application.py	2007-09-15 11:13:15 UTC (rev 79669)
@@ -1,20 +0,0 @@
-import os
-import code
-import zope.app.wsgi
-import zope.app.debug
-
-def application_factory(global_conf, conf='zope.conf'):
-    zope_conf = os.path.join(global_conf['here'], conf)
-    return zope.app.wsgi.getWSGIApplication(zope_conf)
-
-def interactive_debug_prompt(zope_conf='zope.conf'):
-    db = zope.app.wsgi.config(zope_conf)
-    debugger = zope.app.debug.Debugger.fromDatabase(db)
-    # Invoke an interactive interpreter shell
-    banner = ("Welcome to the interactive debug prompt.\n"
-              "The 'root' variable contains the ZODB root folder.\n"
-              "The 'app' variable contains the Debugger, 'app.publish(path)' "
-              "simulates a request.")
-    code.interact(banner=banner, local={'debugger': debugger,
-                                        'app':      debugger,
-                                        'root':     debugger.root()})

Copied: Sandbox/philikon/zopeproject/trunk/zopeproject/zope_app/src/+package+/startup.py (from rev 79657, Sandbox/philikon/zopeproject/trunk/zopeproject/zope_app/src/+package+/application.py)
===================================================================
--- Sandbox/philikon/zopeproject/trunk/zopeproject/zope_app/src/+package+/startup.py	                        (rev 0)
+++ Sandbox/philikon/zopeproject/trunk/zopeproject/zope_app/src/+package+/startup.py	2007-09-15 11:13:15 UTC (rev 79669)
@@ -0,0 +1,20 @@
+import os
+import code
+import zope.app.wsgi
+import zope.app.debug
+
+def application_factory(global_conf, conf='zope.conf'):
+    zope_conf = os.path.join(global_conf['here'], conf)
+    return zope.app.wsgi.getWSGIApplication(zope_conf)
+
+def interactive_debug_prompt(zope_conf='zope.conf'):
+    db = zope.app.wsgi.config(zope_conf)
+    debugger = zope.app.debug.Debugger.fromDatabase(db)
+    # Invoke an interactive interpreter shell
+    banner = ("Welcome to the interactive debug prompt.\n"
+              "The 'root' variable contains the ZODB root folder.\n"
+              "The 'app' variable contains the Debugger, 'app.publish(path)' "
+              "simulates a request.")
+    code.interact(banner=banner, local={'debugger': debugger,
+                                        'app':      debugger,
+                                        'root':     debugger.root()})



More information about the Checkins mailing list