[Zope-Checkins] SVN: zdaemon/trunk/CHANGES.txt Fixed indentation to be equal, use list everywhere
Log message for revision 99305: Fixed indentation to be equal, use list everywhere Changed: U zdaemon/trunk/CHANGES.txt -=- Modified: zdaemon/trunk/CHANGES.txt === --- zdaemon/trunk/CHANGES.txt 2009-04-20 07:21:38 UTC (rev 99304) +++ zdaemon/trunk/CHANGES.txt 2009-04-20 07:24:18 UTC (rev 99305) @@ -34,7 +34,7 @@ Bugs Fixed -- -Fixed backwards incompatible change in handling of environment option. +- Fixed backwards incompatible change in handling of environment option. 2.0.1 (2007-10-31) == @@ -42,13 +42,13 @@ Bugs Fixed -- -Fixed test renormalizer that did not work in certain cases where the -environment was complex. +- Fixed test renormalizer that did not work in certain cases where the + environment was complex. 2.0.0 (2007-07-19) == -Final release for 2.0.0. +- Final release for 2.0.0. 2.0a6 (2007-01-11) == @@ -118,52 +118,52 @@ 1.4a1 (2005-11-21) == -Fixed a bug in the distribution setup file. +- Fixed a bug in the distribution setup file. 1.4a1 (2005-11-05) == -First semi-formal release. +- First semi-formal release. After some unknown release(???) === - - Made 'zdaemon.zdoptions' not fail for --help when __main__.__doc__ - is None. +- Made 'zdaemon.zdoptions' not fail for --help when __main__.__doc__ + is None. After 1.1 = - - Updated test 'testRunIgnoresParentSignals': +- Updated test 'testRunIgnoresParentSignals': - o Use 'mkdtemp' to create a temporary directory to hold the test socket -rather than creating the test socket in the test directory. -Hopefully this will be more robust. Sometimes the test directory -has a path so long that the test socket can't be created. + o Use 'mkdtemp' to create a temporary directory to hold the test socket + rather than creating the test socket in the test directory. + Hopefully this will be more robust. Sometimes the test directory + has a path so long that the test socket can't be created. - o Changed management of 'donothing.sh'. This script is now created by -the test in the temporarary directory with the necessary -permissions. This is to avoids possible mangling of permissions -leading to spurious test failures. It also avoids management of a -file in the source tree, which is a bonus. + o Changed management of 'donothing.sh'. This script is now created by + the test in the temporarary directory with the necessary + permissions. This is to avoids possible mangling of permissions + leading to spurious test failures. It also avoids management of a + file in the source tree, which is a bonus. - - Rearranged source tree to conform to more usual zpkg-based layout: +- Rearranged source tree to conform to more usual zpkg-based layout: - o Python package lives under 'src'. + o Python package lives under 'src'. - o Dependencies added to 'src' as 'svn:externals'. + o Dependencies added to 'src' as 'svn:externals'. - o Unit tests can now be run from a checkout. + o Unit tests can now be run from a checkout. - - Made umask-based test failures due to running as root emit a more +- Made umask-based test failures due to running as root emit a more forceful warning. 1.1 (2005-06-09) - - SVN tag: svn://svn.zope.org/repos/main/zdaemon/tags/zdaemon-1.1 +- SVN tag: svn://svn.zope.org/repos/main/zdaemon/tags/zdaemon-1.1 - - Tagged to make better 'svn:externals' linkage possible. +- Tagged to make better 'svn:externals' linkage possible. To-Dos == @@ -174,6 +174,6 @@ - working directory -Bugs +Bugs: - help command ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: zdaemon/trunk/ Removed zpkg stuff.
Log message for revision 99306: Removed zpkg stuff. Changed: U zdaemon/trunk/CHANGES.txt D zdaemon/trunk/src/zdaemon/DEPENDENCIES.cfg D zdaemon/trunk/src/zdaemon/SETUP.cfg -=- Modified: zdaemon/trunk/CHANGES.txt === --- zdaemon/trunk/CHANGES.txt 2009-04-20 07:24:18 UTC (rev 99305) +++ zdaemon/trunk/CHANGES.txt 2009-04-20 07:25:23 UTC (rev 99306) @@ -8,7 +8,9 @@ - Fixed change log format, made table of contents nicer. +- Removed zpkg stuff. + 2.0.3 (2009-04-11) == @@ -156,7 +158,7 @@ o Unit tests can now be run from a checkout. - Made umask-based test failures due to running as root emit a more - forceful warning. + forceful warning. 1.1 (2005-06-09) Deleted: zdaemon/trunk/src/zdaemon/DEPENDENCIES.cfg === --- zdaemon/trunk/src/zdaemon/DEPENDENCIES.cfg 2009-04-20 07:24:18 UTC (rev 99305) +++ zdaemon/trunk/src/zdaemon/DEPENDENCIES.cfg 2009-04-20 07:25:23 UTC (rev 99306) @@ -1 +0,0 @@ -ZConfig Deleted: zdaemon/trunk/src/zdaemon/SETUP.cfg === --- zdaemon/trunk/src/zdaemon/SETUP.cfg 2009-04-20 07:24:18 UTC (rev 99305) +++ zdaemon/trunk/src/zdaemon/SETUP.cfg 2009-04-20 07:25:23 UTC (rev 99306) @@ -1,2 +0,0 @@ -script zdctl.py -script zdrun.py ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: zdaemon/trunk/src/zdaemon/ Version 2.0.3 broke support for relative paths to the socket (``-s`` option and ``socket-name`` parameter), now relative paths work again as in version
Log message for revision 99307: Version 2.0.3 broke support for relative paths to the socket (``-s`` option and ``socket-name`` parameter), now relative paths work again as in version 2.0.2. Changed: U zdaemon/trunk/src/zdaemon/tests/testzdoptions.py U zdaemon/trunk/src/zdaemon/tests/testzdrun.py U zdaemon/trunk/src/zdaemon/zdoptions.py -=- Modified: zdaemon/trunk/src/zdaemon/tests/testzdoptions.py === --- zdaemon/trunk/src/zdaemon/tests/testzdoptions.py2009-04-20 07:25:23 UTC (rev 99306) +++ zdaemon/trunk/src/zdaemon/tests/testzdoptions.py2009-04-20 07:33:20 UTC (rev 99307) @@ -102,7 +102,7 @@ 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 if OptionsClass is used directly. # Not sure this ever happens :-S @@ -113,7 +113,7 @@ # with __doc__ class SubClass(self.OptionsClass): pass -# __doc__ isn't inherited :-( +# __doc__ isn't inherited :-( self.help_test_helper(SubClass,{},'No help available.') def test_default_help_with_doc_kw(self): @@ -126,7 +126,7 @@ 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__, # but doc is supplied to realize @@ -139,7 +139,7 @@ class HasHelp(self.OptionsClass): __doc__ = 'Some help' self.help_test_helper(HasHelp,{},'Some help') - + def test_no_help_with_doc_kw(self): # test what happens when the subclass has None for __doc__, # but doc is supplied to realize @@ -389,6 +389,8 @@ os.path.join(self.root, 'sock'))) self.assertTrue(existing_parent_dirpath( os.path.join(self.root, 'not-there', 'sock'))) +self.assertTrue(existing_parent_dirpath( +os.path.join('not-there', 'sock'))) self.assertRaises( ValueError, existing_parent_dirpath, os.path.join(self.root, 'not-there', 'this-also-not', 'sock')) Modified: zdaemon/trunk/src/zdaemon/tests/testzdrun.py === --- zdaemon/trunk/src/zdaemon/tests/testzdrun.py2009-04-20 07:25:23 UTC (rev 99306) +++ zdaemon/trunk/src/zdaemon/tests/testzdrun.py2009-04-20 07:33:20 UTC (rev 99307) @@ -261,7 +261,7 @@ I am root! Do not run the tests as root. Testing proper umask handling cannot be done as root. -Furthermore, it is not a good idea and strongly discouraged to run zope, the +Furthermore, it is not a good idea and strongly discouraged to run zope, the build system (configure, make) or the tests as root. In general do not run anything as root unless absolutely necessary. ) @@ -344,6 +344,12 @@ self.run_ctl(['-s', path, '-p', self.cmd]) self.assert_(os.path.exists(os.path.dirname(path))) +def testCtlSocketDirectoryCreationRelativePath(self): +path = os.path.join('rundir', 'sock') +self.run_ctl(['-s', path, '-p', self.cmd]) +self.assert_(os.path.exists(os.path.dirname(os.path.join(os.getcwd(), + path + def testCtlSocketDirectoryCreationOnlyOne(self): path = os.path.join(self.root, 'rundir', 'not-created', 'sock') self.assertRaises(SystemExit, @@ -362,6 +368,15 @@ self.run_ctl(['-C', config]) self.assert_(os.path.exists(path)) +def testCtlSocketDirectoryCreationFromConfigFileRelativePath(self): +path = 'rel-rundir' +options = ['socket-name %s/sock' % path, + 'program ' + self.cmd] +config = self.writeConfig( +'runner\n%s\n/runner' % '\n'.join(options)) +self.run_ctl(['-C', config]) +self.assert_(os.path.exists(os.path.join(os.getcwd(), path))) + def writeConfig(self, config): config_file = os.path.join(self.root, 'config') open(config_file, 'w').write(config) Modified: zdaemon/trunk/src/zdaemon/zdoptions.py === --- zdaemon/trunk/src/zdaemon/zdoptions.py 2009-04-20 07:25:23 UTC (rev 99306) +++ zdaemon/trunk/src/zdaemon/zdoptions.py 2009-04-20 07:33:20 UTC (rev 99307) @@ -35,7 +35,7 @@ configuration option default_to_interactive is set to false). Use the action help to find out about available actions. - + doc = None progname = None configfile = None @@ -450,10 +450,10 @@ def existing_parent_dirpath(arg): path = os.path.expanduser(arg) dir = os.path.dirname(path) -if not dir: -
[Zope-Checkins] SVN: zdaemon/trunk/ - added coverage analysis tools to buildout
Log message for revision 99308: - added coverage analysis tools to buildout - added missing changlog entry for last checkin - fixed author's email address - show description what zdaemon is above table of contents - fixed typo in short description Changed: U zdaemon/trunk/CHANGES.txt U zdaemon/trunk/README.txt U zdaemon/trunk/buildout.cfg U zdaemon/trunk/setup.py -=- Modified: zdaemon/trunk/CHANGES.txt === --- zdaemon/trunk/CHANGES.txt 2009-04-20 07:33:20 UTC (rev 99307) +++ zdaemon/trunk/CHANGES.txt 2009-04-20 07:35:49 UTC (rev 99308) @@ -6,8 +6,14 @@ 2.0.4 (unreleased) == +- Version 2.0.3 broke support for relative paths to the socket (``-s`` + option and ``socket-name`` parameter), now relative paths work again + as in version 2.0.2. + - Fixed change log format, made table of contents nicer. +- Fixed author's email address. + - Removed zpkg stuff. Modified: zdaemon/trunk/README.txt === --- zdaemon/trunk/README.txt2009-04-20 07:33:20 UTC (rev 99307) +++ zdaemon/trunk/README.txt2009-04-20 07:35:49 UTC (rev 99308) @@ -2,10 +2,10 @@ ``zdaemon`` process controller for Unix-based systems * -.. contents:: - -'zdaemon' is a Python package which provides APIs for managing applications +`zdaemon` is a Python package which provides APIs for managing applications run as daemons. Its principal use to date has been to manage the application server and storage server daemons for Zope / ZEO, although it is not limited to running Python-based applications (for instance, it has been used to manage the 'spread' daemon). + +.. contents:: Modified: zdaemon/trunk/buildout.cfg === --- zdaemon/trunk/buildout.cfg 2009-04-20 07:33:20 UTC (rev 99307) +++ zdaemon/trunk/buildout.cfg 2009-04-20 07:35:49 UTC (rev 99308) @@ -1,12 +1,23 @@ [buildout] develop = . -parts = test scripts +parts = test scripts coverage-test coverage-report find-links = http://download.zope.org/distribution/ [test] recipe = zc.recipe.testrunner eggs = zdaemon +[coverage-test] +recipe = zc.recipe.testrunner +eggs = ${test:eggs} +defaults = ['--coverage', '../../coverage'] + +[coverage-report] +recipe = zc.recipe.egg +eggs = z3c.coverage +scripts = coverage=coverage-report +arguments = ('coverage', 'coverage/report') + [scripts] recipe = zc.recipe.egg eggs = zdaemon Modified: zdaemon/trunk/setup.py === --- zdaemon/trunk/setup.py 2009-04-20 07:33:20 UTC (rev 99307) +++ zdaemon/trunk/setup.py 2009-04-20 07:35:49 UTC (rev 99308) @@ -1,6 +1,6 @@ ## # -# Copyright (c) 2006 Zope Corporation and Contributors. +# Copyright (c) 2006-2009 Zope Corporation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, @@ -37,13 +37,13 @@ name = zdaemon setup( name=name, -version=2.0.3, +version=2.0.4dev, url=http://www.python.org/pypi/zdaemon;, license=ZPL 2.1, description= -Daemon process control library and tools for Unix-bases systems, +Daemon process control library and tools for Unix-based systems, author=Zope Corporation and Contributors, -author_email=zope3-...@zope.org, +author_email=zope-...@zope.org, long_description=( read('README.txt') + '\n' + @@ -55,7 +55,6 @@ 'Download\n' + '\n' ), - packages=[zdaemon, zdaemon.tests], package_dir={: src}, classifiers = [ ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: zdaemon/trunk/ Preparing release 2.0.4
Log message for revision 99309: Preparing release 2.0.4 Changed: U zdaemon/trunk/CHANGES.txt U zdaemon/trunk/setup.py -=- Modified: zdaemon/trunk/CHANGES.txt === --- zdaemon/trunk/CHANGES.txt 2009-04-20 07:35:49 UTC (rev 99308) +++ zdaemon/trunk/CHANGES.txt 2009-04-20 07:43:35 UTC (rev 99309) @@ -3,7 +3,7 @@ === -2.0.4 (unreleased) +2.0.4 (2009-04-20) == - Version 2.0.3 broke support for relative paths to the socket (``-s`` Modified: zdaemon/trunk/setup.py === --- zdaemon/trunk/setup.py 2009-04-20 07:35:49 UTC (rev 99308) +++ zdaemon/trunk/setup.py 2009-04-20 07:43:35 UTC (rev 99309) @@ -37,7 +37,7 @@ name = zdaemon setup( name=name, -version=2.0.4dev, +version = '2.0.4', url=http://www.python.org/pypi/zdaemon;, license=ZPL 2.1, description= ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: zdaemon/tags/2.0.4/ Tagging 2.0.4
Log message for revision 99310: Tagging 2.0.4 Changed: A zdaemon/tags/2.0.4/ -=- ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/branches/2.13/ - Removed HTML tags from exception text of ``Unauthorized`` exception
Log message for revision 124165: - Removed HTML tags from exception text of ``Unauthorized`` exception because these tags get escaped since CVE-2010-1104 (see 2.13.12) got fixed. Changed: U Zope/branches/2.13/doc/CHANGES.rst U Zope/branches/2.13/src/ZPublisher/HTTPResponse.py U Zope/branches/2.13/src/ZPublisher/tests/exception_handling.txt U Zope/branches/2.13/src/ZPublisher/tests/testHTTPResponse.py -=- Modified: Zope/branches/2.13/doc/CHANGES.rst === --- Zope/branches/2.13/doc/CHANGES.rst 2012-01-24 23:25:16 UTC (rev 124164) +++ Zope/branches/2.13/doc/CHANGES.rst 2012-01-25 12:46:18 UTC (rev 124165) @@ -8,7 +8,9 @@ 2.13.13 (unreleased) -- TBD +- Removed HTML tags from exception text of ``Unauthorized`` exception + because these tags get escaped since CVE-2010-1104 (see 2.13.12) got + fixed. 2.13.12 (2012-01-18) Modified: Zope/branches/2.13/src/ZPublisher/HTTPResponse.py === --- Zope/branches/2.13/src/ZPublisher/HTTPResponse.py 2012-01-24 23:25:16 UTC (rev 124164) +++ Zope/branches/2.13/src/ZPublisher/HTTPResponse.py 2012-01-25 12:46:18 UTC (rev 124165) @@ -203,7 +203,7 @@ def setStatus(self, status, reason=None, lock=None): Set the HTTP status code of the response - + o The argument may either be an integer or a string from the 'status_reasons' dict values: status messages will be converted to the correct integer value. @@ -244,7 +244,7 @@ The response will include an HTTP header that sets a cookie on cookie-enabled browsers with a key name and value value. - + This value overwrites any previously set value for the cookie in the Response object. @@ -263,7 +263,7 @@ def appendCookie(self, name, value): Set an HTTP cookie. - + Returns an HTTP header that sets a cookie on cookie-enabled browsers with a key name and value value. If a value for the cookie has previously been set in the response object, the new @@ -309,7 +309,7 @@ Return the value associated with a HTTP return header, or None if no such header has been set in the response yet. - + If the 'literal' flag is true, preserve the case of the header name; otherwise lower-case the header name before looking up the value. @@ -318,9 +318,9 @@ def setHeader(self, name, value, literal=0, scrubbed=False): Set an HTTP return header on the response. - + Replay any existing value set for the header. - + If the 'literal' flag is true, preserve the case of the header name; otherwise the header name will be lowercased. @@ -332,7 +332,7 @@ key = name.lower() # The following is crazy, given that we have APIs for cookies. # Special behavior will go away in Zope 2.13 -if key == 'set-cookie': +if key == 'set-cookie': self.accumulated_headers.append((name, value)) else: name = literal and name or key @@ -360,7 +360,7 @@ def addHeader(self, name, value): Set a new HTTP return header with the given value, - + Retain any previously set headers with the same name. Note that this API appneds to the 'accumulated_headers' attribute; @@ -455,7 +455,7 @@ return elif lock: self._locked_body = 1 - + if not body: return self @@ -546,7 +546,7 @@ # vary on it. Otherwise if not forced, cache should # respect Accept-Encoding client header vary = self.getHeader('Vary') -if vary is None or 'Accept-Encoding' not in vary: +if vary is None or 'Accept-Encoding' not in vary: self.appendHeader('Vary', 'Accept-Encoding') return self @@ -747,12 +747,12 @@ self.setHeader('WWW-Authenticate', 'basic realm=%s' % realm, 1) def unauthorized(self): -m = strongYou are not authorized to access this resource./strong +m = You are not authorized to access this resource. if self.debug_mode: if self._auth: -m = m + 'p\nUsername and password are not correct./p' +m = m + '\nUsername and password are not correct.' else: -m = m + 'p\nNo Authorization header found./p' +m = m + '\nNo Authorization header found.' raise Unauthorized, m def _setBCIHeaders(self, t, tb): @@ -913,7 +913,7 @@ Set headers required by various parts of protocol. body = self.body -if (not
[Zope-Checkins] SVN: Zope/trunk/ Removed HTML tags from exception text of ``Unauthorized`` exception
Log message for revision 124166: Removed HTML tags from exception text of ``Unauthorized`` exception because these tags get escaped since CVE-2010-1104 (see 2.13.12) got fixed. (Merged r124165 from 2.13 branch here.) Changed: U Zope/trunk/doc/CHANGES.rst U Zope/trunk/src/ZPublisher/HTTPResponse.py U Zope/trunk/src/ZPublisher/tests/exception_handling.txt U Zope/trunk/src/ZPublisher/tests/testHTTPResponse.py -=- Modified: Zope/trunk/doc/CHANGES.rst === --- Zope/trunk/doc/CHANGES.rst 2012-01-25 12:46:18 UTC (rev 124165) +++ Zope/trunk/doc/CHANGES.rst 2012-01-25 12:50:14 UTC (rev 124166) @@ -11,6 +11,10 @@ Bugs Fixed ++ +- Removed HTML tags from exception text of ``Unauthorized`` exception + because these tags get escaped since CVE-2010-1104 (see 2.13.12) got + fixed. + - Use ``in`` operator instead of deprecated ``has_key`` method (which is not implemented by ``OFS.ObjectManager``). This fixes an issue with WebDAV requests for skin objects. Modified: Zope/trunk/src/ZPublisher/HTTPResponse.py === --- Zope/trunk/src/ZPublisher/HTTPResponse.py 2012-01-25 12:46:18 UTC (rev 124165) +++ Zope/trunk/src/ZPublisher/HTTPResponse.py 2012-01-25 12:50:14 UTC (rev 124166) @@ -203,7 +203,7 @@ def setStatus(self, status, reason=None, lock=None): Set the HTTP status code of the response - + o The argument may either be an integer or a string from the 'status_reasons' dict values: status messages will be converted to the correct integer value. @@ -244,7 +244,7 @@ The response will include an HTTP header that sets a cookie on cookie-enabled browsers with a key name and value value. - + This value overwrites any previously set value for the cookie in the Response object. @@ -263,7 +263,7 @@ def appendCookie(self, name, value): Set an HTTP cookie. - + Returns an HTTP header that sets a cookie on cookie-enabled browsers with a key name and value value. If a value for the cookie has previously been set in the response object, the new @@ -309,7 +309,7 @@ Return the value associated with a HTTP return header, or None if no such header has been set in the response yet. - + If the 'literal' flag is true, preserve the case of the header name; otherwise lower-case the header name before looking up the value. @@ -318,9 +318,9 @@ def setHeader(self, name, value, literal=0, scrubbed=False): Set an HTTP return header on the response. - + Replay any existing value set for the header. - + If the 'literal' flag is true, preserve the case of the header name; otherwise the header name will be lowercased. @@ -355,7 +355,7 @@ def addHeader(self, name, value): Set a new HTTP return header with the given value, - + Retain any previously set headers with the same name. Note that this API appneds to the 'accumulated_headers' attribute; @@ -450,7 +450,7 @@ return elif lock: self._locked_body = 1 - + if not body: return self @@ -540,7 +540,7 @@ # vary on it. Otherwise if not forced, cache should # respect Accept-Encoding client header vary = self.getHeader('Vary') -if vary is None or 'Accept-Encoding' not in vary: +if vary is None or 'Accept-Encoding' not in vary: self.appendHeader('Vary', 'Accept-Encoding') return self @@ -737,12 +737,12 @@ self.setHeader('WWW-Authenticate', 'basic realm=%s' % realm, 1) def unauthorized(self): -m = strongYou are not authorized to access this resource./strong +m = You are not authorized to access this resource. if self.debug_mode: if self._auth: -m = m + 'p\nUsername and password are not correct./p' +m = m + '\nUsername and password are not correct.' else: -m = m + 'p\nNo Authorization header found./p' +m = m + '\nNo Authorization header found.' raise Unauthorized(m) def _setBCIHeaders(self, t, tb): @@ -903,7 +903,7 @@ Set headers required by various parts of protocol. body = self.body -if (not 'content-length' in self.headers and +if (not 'content-length' in self.headers and not 'transfer-encoding' in self.headers): self.setHeader('content-length', len(body)) return %d %s % (self.status, self.errmsg), self.listHeaders() @@ -946,7 +946,7 @@