[Zope-Checkins] SVN: Zope/trunk/ Removed ZMI controls for restarting the process, these no longer apply when managed as a WSGI application.
Hanno Schlichting
hannosch at hannosch.eu
Sun Jul 3 10:58:02 EDT 2011
Log message for revision 122082:
Removed ZMI controls for restarting the process, these no longer apply when managed as a WSGI application.
Changed:
U Zope/trunk/doc/CHANGES.rst
U Zope/trunk/src/App/ApplicationManager.py
D Zope/trunk/src/App/dtml/copyright.dtml
U Zope/trunk/src/App/dtml/cpContents.dtml
U Zope/trunk/src/App/tests/test_ApplicationManager.py
U Zope/trunk/src/Zope2/Startup/zopectl.py
-=-
Modified: Zope/trunk/doc/CHANGES.rst
===================================================================
--- Zope/trunk/doc/CHANGES.rst 2011-07-03 14:36:45 UTC (rev 122081)
+++ Zope/trunk/doc/CHANGES.rst 2011-07-03 14:58:02 UTC (rev 122082)
@@ -41,6 +41,9 @@
Restructuring
+++++++++++++
+- Removed ZMI controls for restarting the process, these no longer apply when
+ managed as a WSGI application.
+
- Removed `bobobase_modification_time` from `Persistence.Persistent`, you can
use `DateTime(object._p_mtime)` instead.
Modified: Zope/trunk/src/App/ApplicationManager.py
===================================================================
--- Zope/trunk/src/App/ApplicationManager.py 2011-07-03 14:36:45 UTC (rev 122081)
+++ Zope/trunk/src/App/ApplicationManager.py 2011-07-03 14:58:02 UTC (rev 122082)
@@ -10,9 +10,7 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
-"""System management components"""
-from cgi import escape
from cStringIO import StringIO
from logging import getLogger
import os
@@ -23,7 +21,6 @@
from AccessControl.class_init import InitializeClass
from AccessControl.requestmethod import requestmethod
-from AccessControl.SecurityManagement import getSecurityManager
from Acquisition import Implicit
from App.CacheManager import CacheManager
from App.config import getConfiguration
@@ -32,7 +29,6 @@
from App.Undo import UndoSupport
from App.version_txt import version_txt
from DateTime.DateTime import DateTime
-from Lifetime import shutdown
from OFS.Folder import Folder
from OFS.SimpleItem import Item
from OFS.SimpleItem import SimpleItem
@@ -338,40 +334,7 @@
return '%.1fM' % (s/1048576.0)
return '%.1fK' % (s/1024.0)
- if 'ZMANAGED' in os.environ:
- manage_restartable = 1
- @requestmethod('POST')
- def manage_restart(self, URL1, REQUEST=None):
- """ Shut down the application for restart.
- """
- try:
- user = '"%s"' % getSecurityManager().getUser().getUserName()
- except:
- user = 'unknown user'
- LOG.info("Restart requested by %s" % user)
- shutdown(1)
- return """<html>
- <head><meta HTTP-EQUIV=REFRESH CONTENT="10; URL=%s/manage_main">
- </head>
- <body>Zope is restarting</body></html>
- """ % escape(URL1, 1)
-
@requestmethod('POST')
- def manage_shutdown(self, REQUEST=None):
- """Shut down the application"""
- try:
- user = '"%s"' % getSecurityManager().getUser().getUserName()
- except:
- user = 'unknown user'
- LOG.info("Shutdown requested by %s" % user)
- shutdown(0)
- return """<html>
- <head>
- </head>
- <body>Zope is shutting down</body></html>
- """
-
- @requestmethod('POST')
def manage_pack(self, days=0, REQUEST=None, _when=None):
"""Pack the database"""
Deleted: Zope/trunk/src/App/dtml/copyright.dtml
===================================================================
--- Zope/trunk/src/App/dtml/copyright.dtml 2011-07-03 14:36:45 UTC (rev 122081)
+++ Zope/trunk/src/App/dtml/copyright.dtml 2011-07-03 14:58:02 UTC (rev 122082)
@@ -1,196 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
-<head>
-<title>Zope Copyright</title>
-</head>
-<body bgcolor="#ffffff" link="#000099" alink="#000099" vlink="#000099">
-
-<p align="center">
-<a href="#ZPL">Zope License</a> |
-<a href="#PYTHON">Python License</a> |
-<a href="#CREDITS">Zope Credits</a>
-</p>
-
-<a name="ZPL" />
-
-<h2>Zope Public License (ZPL) Version 2.1</h2>
-<h3>This software is Copyright ©
-<a href="http://www.zopefoundation.org/" target="_top">Zope Foundation</a> and
-Contributors. All rights reserved.</h3>
-
-<p>
-This license has been certified as open source. It has also
-been designated as GPL compatible by the Free Software
-Foundation (FSF).
-</p>
-
-<p>
-Redistribution and use in source and binary forms, with or
-without modification, are permitted provided that the
-following conditions are met:
-</p>
-
-<ol>
-
-<li>
-Redistributions in source code must retain the
- accompanying copyright notice, this list of conditions,
- and the following disclaimer.
-</li>
-<li>
-Redistributions in binary form must reproduce the accompanying
- copyright notice, this list of conditions, and the
- following disclaimer in the documentation and/or other
- materials provided with the distribution.
-</li>
-<li>
-Names of the copyright holders must not be used to
- endorse or promote products derived from this software
- without prior written permission from the copyright
- holders.
-</li>
-<li>
-The right to distribute this software or to use it for
- any purpose does not give you the right to use
- Servicemarks (sm) or Trademarks (tm) of the copyright
- holders. Use of them is covered by separate agreement
- with the copyright holders.
-</li>
-<li>
-If any files are modified, you must cause the modified
- files to carry prominent notices stating that you changed
- the files and the date of any change.
-</li>
-</ol>
-
-<h3>Disclaimer</h3>
-<p>
-<strong>
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS''
- AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
- NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
- NO EVENT SHALL THE COPYRIGHT HOLDERS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
- DAMAGE.
-</strong>
-</p>
-
-
-<p>
-This software consists of contributions made by Zope
-Corporation and many individuals on behalf of Zope
-Corporation. Specific attributions are listed in the
-accompanying credits file.
-</p>
-
-<hr />
-
-<a name="PYTHON" />
-
-<h3>
-This software is powered by <a href="http://www.python.org/" target="_top">Python</a>!
-</h3>
-<p>Copyright © 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
-The Netherlands.
-<br />All Rights Reserved</p>
-
-<p>Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation, and that the names of Stichting Mathematisch
-Centrum or CWI or Corporation for National Research Initiatives or
-CNRI not be used in advertising or publicity pertaining to
-distribution of the software without specific, written prior
-permission.</p>
-
-<p>While CWI is the initial source for this software, a modified version
-is made available by the Corporation for National Research Initiatives
-(CNRI) at the Internet address
-<a href="ftp://ftp.python.org">ftp://ftp.python.org</a>.</p>
-
-<p><strong>STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH
-REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH
-CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
-DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
-PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
-TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-PERFORMANCE OF THIS SOFTWARE.</strong></p>
-
-<hr />
-
-<a name="CREDITS" />
-
-<h3>Zope Credits</h3>
-
-
-<p>
- The Zope software receives contributions from far and wide. Here's
- the Zope Hall of Fame:
-</p>
-<ul>
-
- <li>Jeff Bauer is Zope Dude Number One. Jeff took over PCGI and
- kept pushing it forward through the years.</li>
-
- <li>Sam Rushing worked with us at Zope Corporation to make Medusa
- the publishing platform for ZServer and the concurrency of Zope2.</li>
-
- <li>A subset of windows guru Mark Hammond's win32 extensions are
- bundled with win32 binary distributions of Zope.</li>
-
- <li>Martijn Pieters and Brian Hooper contributed the DTML 'in' tag reverse
- attribute.</li>
-
- <li>Phillip Eby contributed the DTML <code>let</code> tag and many
- other useful ideas, including the inspiration for the DTML
- <code>call</code>, <code>with</code> and <code>return</code>
- tags.</li>
-
- <li>The DateTime module was based on work from Ted Horst.</li>
-
- <li>Jordan Baker contributed the 'try' tag, something I've wanted
- for a long, long time.</li>
-
- <li>Martijn Pieters chipped in with a safe range function.</li>
-
- <li>Michael Hauser came up with the name "Zope".</li>
-
- <li>Eric Kidd added support for <a href="http://www.xmlrpc.com/">
- XML-RPC</a></li>
-
- <li>Andrew M. Kuchling wrote the initial version of mod_pcgi, making
- him extremely cool in our book.</li>
-
- <li>Jephte CLAIN made some patches to European TimeZope.</li>
-
- <li>All the other Zopistas far and wide that stuck with us during
- the Bobo/Principia days and politely push us to make the best damn
- app server on this or any other planet.</li>
-
- <li>Of course the list of credits would be quite incomplete without
- mentioning Guido van Rossum, benevolent dictator of Python and
- long-time friend of Zope Corporation. Zope Power is Python
- Power.</li>
-
- <li>
- Special thanks to Richard Stallman and the Free Software
- Foundation for their assistance and feedback on the GPL-compatible
- 2.0 version of the Zope Public License.
- </li>
-
-</ul>
- <p>
- Paul Everitt, <a href="mailto:paul at zope.com">paul at zope.com</a>.
-</p>
-</body>
-</html>
Modified: Zope/trunk/src/App/dtml/cpContents.dtml
===================================================================
--- Zope/trunk/src/App/dtml/cpContents.dtml 2011-07-03 14:36:45 UTC (rev 122081)
+++ Zope/trunk/src/App/dtml/cpContents.dtml 2011-07-03 14:58:02 UTC (rev 122082)
@@ -107,19 +107,6 @@
</td>
</tr>
-<tr>
- <td align="left" valign="top">
-
- </td>
- <td align="left" valign="top">
- <div class="form-element">
- <dtml-if manage_restartable>
- <input type="submit" name="manage_restart:action" value="Restart" />
- </dtml-if>
- <input type="submit" name="manage_shutdown:action" value="Shutdown" />
- </div>
- </td>
-</tr>
</table>
</form>
Modified: Zope/trunk/src/App/tests/test_ApplicationManager.py
===================================================================
--- Zope/trunk/src/App/tests/test_ApplicationManager.py 2011-07-03 14:36:45 UTC (rev 122081)
+++ Zope/trunk/src/App/tests/test_ApplicationManager.py 2011-07-03 14:58:02 UTC (rev 122082)
@@ -414,9 +414,6 @@
am = self._makeOne()
self.assertEqual(am.thread_get_ident(), thread.get_ident())
- #def test_manage_restart(self): XXX -- TOO UGLY TO TEST
- #def test_manage_restart(self): XXX -- TOO UGLY TO TEST
-
def test_revert_points(self):
am = self._makeOne()
self.assertEqual(list(am.revert_points()), [])
Modified: Zope/trunk/src/Zope2/Startup/zopectl.py
===================================================================
--- Zope/trunk/src/Zope2/Startup/zopectl.py 2011-07-03 14:36:45 UTC (rev 122081)
+++ Zope/trunk/src/Zope2/Startup/zopectl.py 2011-07-03 14:58:02 UTC (rev 122082)
@@ -229,12 +229,6 @@
args = [opt, svalue]
return args
- def do_start(self, arg):
- # signal to Zope that it is being managed
- # (to indicate it's web-restartable)
- os.putenv('ZMANAGED', '1')
- ZDCmd.do_start(self, arg)
-
## START OF WINDOWS ONLY STUFF
if WIN:
More information about the Zope-Checkins
mailing list