[Zope-Checkins] SVN: Zope/trunk/versions-zope3.cfg Use zope.tal 3.5.1.

2009-04-09 Thread Tres Seaver
Log message for revision 99037:
  Use zope.tal 3.5.1.

Changed:
  U   Zope/trunk/versions-zope3.cfg

-=-
Modified: Zope/trunk/versions-zope3.cfg
===
--- Zope/trunk/versions-zope3.cfg   2009-04-09 15:43:39 UTC (rev 99036)
+++ Zope/trunk/versions-zope3.cfg   2009-04-09 15:44:50 UTC (rev 99037)
@@ -175,7 +175,7 @@
 zope.site = 3.6.1
 zope.size = 3.4.1
 zope.structuredtext = 3.4.0
-zope.tal = 3.5.0
+zope.tal = 3.5.1
 zope.tales = 3.4.0
 zope.testbrowser = 3.6.0a2
 zope.testing = 3.7.1

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


[Zope-Checkins] SVN: zdaemon/trunk/setup.py remove development status trove category

2009-04-09 Thread Chris Withers
Log message for revision 99050:
  remove development status trove category

Changed:
  U   zdaemon/trunk/setup.py

-=-
Modified: zdaemon/trunk/setup.py
===
--- zdaemon/trunk/setup.py  2009-04-09 16:35:15 UTC (rev 99049)
+++ zdaemon/trunk/setup.py  2009-04-09 16:44:56 UTC (rev 99050)
@@ -61,7 +61,6 @@
 packages=[zdaemon, zdaemon.tests],
 package_dir={: src},
 classifiers = [
-   'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'License :: OSI Approved :: Zope Public License',

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


[Zope-Checkins] SVN: zdaemon/trunk/src/zdaemon/tests/testzdrun.py these tests have been commented out for 5 years, I think it's safe to say they can go.

2009-04-09 Thread Chris Withers
Log message for revision 99063:
  these tests have been commented out for 5 years, I think it's safe to say 
they can go.

Changed:
  U   zdaemon/trunk/src/zdaemon/tests/testzdrun.py

-=-
Modified: zdaemon/trunk/src/zdaemon/tests/testzdrun.py
===
--- zdaemon/trunk/src/zdaemon/tests/testzdrun.py2009-04-09 21:56:51 UTC 
(rev 99062)
+++ zdaemon/trunk/src/zdaemon/tests/testzdrun.py2009-04-09 22:03:10 UTC 
(rev 99063)
@@ -110,26 +110,6 @@
 self.rundaemon([echo, -n])
 self.expect = 
 
-## def testInvoke(self):
-## self._run(echo -n)
-## self.expect = 
-
-## def testControl(self):
-## self.rundaemon([sleep, 1000])
-## time.sleep(1)
-## self._run(stop)
-## time.sleep(1)
-## self._run(exit)
-## self.expect = Sent SIGTERM\nExiting now\n
-
-## def testStop(self):
-## self.rundaemon([self.python, self.nokill])
-## time.sleep(1)
-## self._run(stop)
-## time.sleep(1)
-## self._run(exit)
-## self.expect = Sent SIGTERM\nSent SIGTERM; will exit later\n
-
 def testHelp(self):
 # XXX We shouldn't mutate and leave our change in!
 import __main__

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


[Zope-Checkins] SVN: zdaemon/trunk/src/zdaemon/ Sort out where help docs come from.

2009-04-09 Thread Chris Withers
Log message for revision 99067:
  Sort out where help docs come from.
  The original intent was that the __doc__ of the __main__ module was used in 
no overridden by passing doc as a keyword argument to realize.
  However, as buildout generates scripts, the __doc__ of __main__ will always 
be blank.
  So, changed the mechanism to use __doc__ of the options class and set the 
__doc__ of all the options classes to the __doc__ of their containing module, 
giving the original intended effect.

Changed:
  U   zdaemon/trunk/src/zdaemon/tests/testzdoptions.py
  U   zdaemon/trunk/src/zdaemon/tests/testzdrun.py
  U   zdaemon/trunk/src/zdaemon/zdctl.py
  U   zdaemon/trunk/src/zdaemon/zdoptions.py
  U   zdaemon/trunk/src/zdaemon/zdrun.py

-=-
Modified: zdaemon/trunk/src/zdaemon/tests/testzdoptions.py
===
--- zdaemon/trunk/src/zdaemon/tests/testzdoptions.py2009-04-09 22:36:51 UTC 
(rev 99066)
+++ zdaemon/trunk/src/zdaemon/tests/testzdoptions.py2009-04-10 00:30:16 UTC 
(rev 99067)
@@ -81,58 +81,64 @@
 options.realize([arg, configfile])
 self.assertEqual(options.configfile, configfile)
 
-def test_help(self):
-# __main__.__doc__ is used as the default source of the help
-# text; specific text can also be provided in the `doc`
-# keyword arg to `realize()`.
-import __main__
-old_doc = __main__.__doc__
-__main__.__doc__ = Example help text 1.
-try:
-for arg in -h, --h, --help:
-for doc in (None, Example help text 2.):
-options = self.OptionsClass()
-try:
-self.save_streams()
-try:
-if doc:
-options.realize([arg], doc=doc)
-else:
-options.realize([arg])
-finally:
-self.restore_streams()
-except SystemExit, err:
-self.assertEqual(err.code, 0)
-else:
-self.fail(%s didn't call sys.exit() % repr(arg))
-helptext = self.stdout.getvalue()
-self.assertEqual(helptext, doc or __main__.__doc__)
-finally:
-__main__.__doc__ = old_doc
+# The original intent was that the docstring of whatever module is
+# __main__ would be used as help documentation.
+# Because of the way buildout generates scripts, this will always
+# be an empty string.
+# So, we now use the __doc__ of the options class being used.
 
-def test_no_help(self):
-# Test that zdoptions doesn't die when __main__.__doc__ is None.
-import __main__
-old_doc = __main__.__doc__
-__main__.__doc__ = None
-try:
-for arg in -h, --h, --help:
-options = self.OptionsClass()
+def help_test_helper(self,optionsclass,kw,expected):
+for arg in -h, --h, --help:
+options = optionsclass()
+try:
+self.save_streams()
 try:
-self.save_streams()
-try:
-options.realize([arg])
-finally:
-self.restore_streams()
-except SystemExit, err:
-self.assertEqual(err.code, 0)
-else:
-self.fail(%s didn't call sys.exit() % repr(arg))
-helptext = self.stdout.getvalue()
-self.assertEqual(helptext, No help available.)
-finally:
-__main__.__doc__ = old_doc
+options.realize([arg],**kw)
+finally:
+self.restore_streams()
+except SystemExit, err:
+self.assertEqual(err.code, 0)
+else:
+self.fail(%s didn't call sys.exit() % repr(arg))
+helptext = self.stdout.getvalue()
+self.assertEqual(helptext, expected)
+
+def test_default_help(self):
+# test what happens when the subclass doesn't do anything
+# with __doc__
+self.help_test_helper(self.OptionsClass,{},'No help available.')
 
+def test_default_help_with_doc_kw(self):
+# test what happens when the subclass doesn't do anything
+# with __doc__, but doc is supplied to realize
+self.help_test_helper(self.OptionsClass,{'doc':'Example 
help'},'Example help')
+
+def test_no_help(self):
+# test what happens when the subclass has None for __doc__
+class NoHelp(self.OptionsClass):
+__doc__ = None
+self.help_test_helper(NoHelp,{},'No help available.')
+
+def test_no_help_with_doc_kw(self):
+# test what happens when the subclass has None for __doc__,
+# 

[Zope-Checkins] SVN: Zope/trunk/src/Zope2/Startup/zopectl.py make zopectl -h work once the new zdaemon release is used.

2009-04-09 Thread Chris Withers
Log message for revision 99068:
  make zopectl -h work once the new zdaemon release is used.

Changed:
  U   Zope/trunk/src/Zope2/Startup/zopectl.py

-=-
Modified: Zope/trunk/src/Zope2/Startup/zopectl.py
===
--- Zope/trunk/src/Zope2/Startup/zopectl.py 2009-04-10 00:30:16 UTC (rev 
99067)
+++ Zope/trunk/src/Zope2/Startup/zopectl.py 2009-04-10 01:00:10 UTC (rev 
99068)
@@ -56,12 +56,14 @@
 return arg.split()
 
 class ZopeCtlOptions(ZDOptions):
-Zope controller options.
+# Zope controller options.
+# 
+# After initialization, this should look very much like a
+# zdaemon.zdctl.ZDCtlOptions instance.  Many of the attributes are
+# initialized from different sources, however.
 
-After initialization, this should look very much like a
-zdaemon.zdctl.ZDCtlOptions instance.  Many of the attributes are
-initialized from different sources, however.
-
+__doc__ = __doc__
+
 
 positional_args_allowed = 1
 program = zopectl
@@ -73,7 +75,7 @@
 # same logging for zdctl as for the Zope appserver.  There still
 # needs to be a way to set a logfile for zdctl.
 logsectionname = None
-
+
 def __init__(self):
 ZDOptions.__init__(self)
 self.add(program, runner.program, p:, program=,

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