[Zope-Checkins] SVN: Zope/branches/2.9/lib/python/Testing/ZopeTestCase/zopedoctest/functional.py Increased frame depth to account for decorator.
Log message for revision 69927: Increased frame depth to account for decorator. Changed: U Zope/branches/2.9/lib/python/Testing/ZopeTestCase/zopedoctest/functional.py -=- Modified: Zope/branches/2.9/lib/python/Testing/ZopeTestCase/zopedoctest/functional.py === --- Zope/branches/2.9/lib/python/Testing/ZopeTestCase/zopedoctest/functional.py 2006-09-02 05:38:49 UTC (rev 69926) +++ Zope/branches/2.9/lib/python/Testing/ZopeTestCase/zopedoctest/functional.py 2006-09-02 13:02:35 UTC (rev 69927) @@ -194,6 +194,7 @@ return DocResponseWrapper(response, outstream, path, header_output) + def extractLayer(func): def wrap(*args, **kw): suite = func(*args, **kw) @@ -203,6 +204,7 @@ return suite return wrap + class ZopeSuiteFactory: def __init__(self, *args, **kw): @@ -306,26 +308,27 @@ | doctest.REPORT_NDIFF | doctest.NORMALIZE_WHITESPACE) + @extractLayer def ZopeDocTestSuite(module=None, **kw): -module = doctest._normalize_module(module) +module = doctest._normalize_module(module, depth=3) return ZopeSuiteFactory(module, **kw).doctestsuite() @extractLayer def ZopeDocFileSuite(*paths, **kw): if kw.get('module_relative', True): -kw['package'] = doctest._normalize_module(kw.get('package')) +kw['package'] = doctest._normalize_module(kw.get('package'), depth=3) return ZopeSuiteFactory(*paths, **kw).docfilesuite() @extractLayer def FunctionalDocTestSuite(module=None, **kw): -module = doctest._normalize_module(module) +module = doctest._normalize_module(module, depth=3) return FunctionalSuiteFactory(module, **kw).doctestsuite() @extractLayer def FunctionalDocFileSuite(*paths, **kw): if kw.get('module_relative', True): -kw['package'] = doctest._normalize_module(kw.get('package')) +kw['package'] = doctest._normalize_module(kw.get('package'), depth=3) return FunctionalSuiteFactory(*paths, **kw).docfilesuite() ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/branches/2.10/lib/python/Testing/ZopeTestCase/zopedoctest/functional.py Merged r69926:69927 from 2.9 branch.
Log message for revision 69928: Merged r69926:69927 from 2.9 branch. Increased frame depth to account for decorator. Changed: U Zope/branches/2.10/lib/python/Testing/ZopeTestCase/zopedoctest/functional.py -=- Modified: Zope/branches/2.10/lib/python/Testing/ZopeTestCase/zopedoctest/functional.py === --- Zope/branches/2.10/lib/python/Testing/ZopeTestCase/zopedoctest/functional.py 2006-09-02 13:02:35 UTC (rev 69927) +++ Zope/branches/2.10/lib/python/Testing/ZopeTestCase/zopedoctest/functional.py 2006-09-02 13:11:25 UTC (rev 69928) @@ -311,27 +311,27 @@ @extractLayer def ZopeDocTestSuite(module=None, **kw): -module = doctest._normalize_module(module) +module = doctest._normalize_module(module, depth=3) return ZopeSuiteFactory(module, **kw).doctestsuite() @extractLayer def ZopeDocFileSuite(*paths, **kw): if kw.get('module_relative', True): -kw['package'] = doctest._normalize_module(kw.get('package')) +kw['package'] = doctest._normalize_module(kw.get('package'), depth=3) return ZopeSuiteFactory(*paths, **kw).docfilesuite() @extractLayer def FunctionalDocTestSuite(module=None, **kw): -module = doctest._normalize_module(module) +module = doctest._normalize_module(module, depth=3) return FunctionalSuiteFactory(module, **kw).doctestsuite() @extractLayer def FunctionalDocFileSuite(*paths, **kw): if kw.get('module_relative', True): -kw['package'] = doctest._normalize_module(kw.get('package')) +kw['package'] = doctest._normalize_module(kw.get('package'), depth=3) return FunctionalSuiteFactory(*paths, **kw).docfilesuite() ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/branches/2.9/lib/python/Testing/ZopeTestCase/ Made runalltests skip 'tests.py' when running ZTC tests.
Log message for revision 69930: Made runalltests skip 'tests.py' when running ZTC tests. Changed: U Zope/branches/2.9/lib/python/Testing/ZopeTestCase/runalltests.py U Zope/branches/2.9/lib/python/Testing/ZopeTestCase/zopedoctest/runalltests.py -=- Modified: Zope/branches/2.9/lib/python/Testing/ZopeTestCase/runalltests.py === --- Zope/branches/2.9/lib/python/Testing/ZopeTestCase/runalltests.py 2006-09-02 14:38:10 UTC (rev 69929) +++ Zope/branches/2.9/lib/python/Testing/ZopeTestCase/runalltests.py 2006-09-02 14:40:19 UTC (rev 69930) @@ -27,12 +27,16 @@ import unittest TestRunner = unittest.TextTestRunner suite = unittest.TestSuite() +cwd = os.getcwd() def test_finder(recurse, dir, names): if dir == os.curdir or '__init__.py' in names: parts = [x for x in dir[len(os.curdir):].split(os.sep) if x] tests = [x for x in names if x.startswith('test') and x.endswith('.py')] for test in tests: +if test == 'tests.py' and 'ZopeTestCase' in cwd: +# Skip tests.py when running ZTC tests +continue modpath = parts + [test[:-3]] m = __import__('.'.join(modpath)) for part in modpath[1:]: Modified: Zope/branches/2.9/lib/python/Testing/ZopeTestCase/zopedoctest/runalltests.py === --- Zope/branches/2.9/lib/python/Testing/ZopeTestCase/zopedoctest/runalltests.py 2006-09-02 14:38:10 UTC (rev 69929) +++ Zope/branches/2.9/lib/python/Testing/ZopeTestCase/zopedoctest/runalltests.py 2006-09-02 14:40:19 UTC (rev 69930) @@ -27,12 +27,16 @@ import unittest TestRunner = unittest.TextTestRunner suite = unittest.TestSuite() +cwd = os.getcwd() def test_finder(recurse, dir, names): if dir == os.curdir or '__init__.py' in names: parts = [x for x in dir[len(os.curdir):].split(os.sep) if x] tests = [x for x in names if x.startswith('test') and x.endswith('.py')] for test in tests: +if test == 'tests.py' and 'ZopeTestCase' in cwd: +# Skip tests.py when running ZTC tests +continue modpath = parts + [test[:-3]] m = __import__('.'.join(modpath)) for part in modpath[1:]: ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/branches/2.10/lib/python/Testing/ZopeTestCase/ Merged r69928:69931 from 2.9 branch.
Log message for revision 69932: Merged r69928:69931 from 2.9 branch. - Nuked the decorator and moved its functionality to the suite factory proper. - Made runalltests skip 'tests.py' when running ZTC tests. - Don't run testWebserver.py as part of the Zope2 test suite. Changed: U Zope/branches/2.10/lib/python/Testing/ZopeTestCase/runalltests.py U Zope/branches/2.10/lib/python/Testing/ZopeTestCase/tests.py U Zope/branches/2.10/lib/python/Testing/ZopeTestCase/zopedoctest/functional.py U Zope/branches/2.10/lib/python/Testing/ZopeTestCase/zopedoctest/runalltests.py U Zope/branches/2.10/lib/python/Testing/ZopeTestCase/zopedoctest/tests.py -=- Modified: Zope/branches/2.10/lib/python/Testing/ZopeTestCase/runalltests.py === --- Zope/branches/2.10/lib/python/Testing/ZopeTestCase/runalltests.py 2006-09-02 14:42:31 UTC (rev 69931) +++ Zope/branches/2.10/lib/python/Testing/ZopeTestCase/runalltests.py 2006-09-02 14:49:12 UTC (rev 69932) @@ -27,12 +27,16 @@ import unittest TestRunner = unittest.TextTestRunner suite = unittest.TestSuite() +cwd = os.getcwd() def test_finder(recurse, dir, names): if dir == os.curdir or '__init__.py' in names: parts = [x for x in dir[len(os.curdir):].split(os.sep) if x] tests = [x for x in names if x.startswith('test') and x.endswith('.py')] for test in tests: +if test == 'tests.py' and 'ZopeTestCase' in cwd: +# Skip tests.py when running ZTC tests +continue modpath = parts + [test[:-3]] m = __import__('.'.join(modpath)) for part in modpath[1:]: Modified: Zope/branches/2.10/lib/python/Testing/ZopeTestCase/tests.py === --- Zope/branches/2.10/lib/python/Testing/ZopeTestCase/tests.py 2006-09-02 14:42:31 UTC (rev 69931) +++ Zope/branches/2.10/lib/python/Testing/ZopeTestCase/tests.py 2006-09-02 14:49:12 UTC (rev 69932) @@ -1,19 +1,20 @@ -test runner that works with zope.testing.testrunner +Test runner that works with zope.testing.testrunner + import unittest -import os, sys +import os +import Testing.ZopeTestCase -import os, sys - suite = unittest.TestSuite() names = os.listdir(os.path.dirname(__file__)) -tests = [x[:-3] for x in names \ - if x.startswith('test') and x.endswith('.py') \ - and not x == 'tests.py'] +tests = [x[:-3] for x in names + if x.startswith('test') and x.endswith('.py') + and x != 'tests.py' + # Don't run this module as part of the Zope2 suite + and x != 'testWebserver.py'] -import Testing.ZopeTestCase for test in tests: -m = __import__(Testing.ZopeTestCase.%s %test) +m = __import__('Testing.ZopeTestCase.%s' % test) m = getattr(Testing.ZopeTestCase, test) if hasattr(m, 'test_suite'): suite.addTest(m.test_suite()) Modified: Zope/branches/2.10/lib/python/Testing/ZopeTestCase/zopedoctest/functional.py === --- Zope/branches/2.10/lib/python/Testing/ZopeTestCase/zopedoctest/functional.py 2006-09-02 14:42:31 UTC (rev 69931) +++ Zope/branches/2.10/lib/python/Testing/ZopeTestCase/zopedoctest/functional.py 2006-09-02 14:49:12 UTC (rev 69932) @@ -200,15 +200,22 @@ def __init__(self, *args, **kw): self._args = args self._kw = kw +self._layer = None self.setup_globs() self.setup_test_class() self.setup_optionflags() def doctestsuite(self): -return doctest.DocTestSuite(*self._args, **self._kw) +suite = doctest.DocTestSuite(*self._args, **self._kw) +if self._layer is not None: +suite.layer = self._layer +return suite def docfilesuite(self): -return doctest.DocFileSuite(*self._args, **self._kw) +suite = doctest.DocFileSuite(*self._args, **self._kw) +if self._layer is not None: +suite.layer = self._layer +return suite def setup_globs(self): globs = self._kw.setdefault('globs', {}) @@ -224,6 +231,10 @@ if 'test_class' in self._kw: del self._kw['test_class'] +# Fix for http://zope.org/Collectors/Zope/2178 +if hasattr(test_class, 'layer'): +self._layer = test_class.layer + # If the test_class does not have a runTest method, we add # a dummy attribute so that TestCase construction works. if not hasattr(test_class, 'runTest'): @@ -299,39 +310,22 @@ | doctest.NORMALIZE_WHITESPACE) -def extractLayer(func): -def wrap(*args, **kw): -suite = func(*args, **kw) -tc = kw.get('test_class', None) -if tc and hasattr(tc, 'layer'): -suite.layer = tc.layer -return suite -return wrap - - [EMAIL PROTECTED]
[Zope-Checkins] SVN: Zope/branches/Zope-2_8-branch/lib/python/Testing/ZopeTestCase/ Fixed functional.http to only pass the request body (no headers) to
Log message for revision 69933: Fixed functional.http to only pass the request body (no headers) to publish_module. Thanks to Andreas Zeidler. Changed: U Zope/branches/Zope-2_8-branch/lib/python/Testing/ZopeTestCase/doc/CHANGES.txt U Zope/branches/Zope-2_8-branch/lib/python/Testing/ZopeTestCase/zopedoctest/functional.py -=- Modified: Zope/branches/Zope-2_8-branch/lib/python/Testing/ZopeTestCase/doc/CHANGES.txt === --- Zope/branches/Zope-2_8-branch/lib/python/Testing/ZopeTestCase/doc/CHANGES.txt 2006-09-02 14:49:12 UTC (rev 69932) +++ Zope/branches/Zope-2_8-branch/lib/python/Testing/ZopeTestCase/doc/CHANGES.txt 2006-09-02 15:43:55 UTC (rev 69933) @@ -9,6 +9,8 @@ - Made sure logging is configured. Read $INSTANCE_HOME/log.ini if it exists. - Made base.TestCase a new-style class. - Added placeless.py for Z3-style setup. Thanks to Whit Morriss. +- Fixed functional.http to only pass the request body (no headers) to + publish_module. Thanks to Andreas Zeidler. 0.9.8 (Zope 2.8 edition) - Renamed 'doctest' package to 'zopedoctest' because of name-shadowing Modified: Zope/branches/Zope-2_8-branch/lib/python/Testing/ZopeTestCase/zopedoctest/functional.py === --- Zope/branches/Zope-2_8-branch/lib/python/Testing/ZopeTestCase/zopedoctest/functional.py 2006-09-02 14:49:12 UTC (rev 69932) +++ Zope/branches/Zope-2_8-branch/lib/python/Testing/ZopeTestCase/zopedoctest/functional.py 2006-09-02 15:43:55 UTC (rev 69933) @@ -132,7 +132,7 @@ # Discard leading white space to make call layout simpler request_string = request_string.lstrip() -# split off and parse the command line +# Split off and parse the command line l = request_string.find('\n') command_line = request_string[:l].rstrip() request_string = request_string[l+1:] @@ -162,6 +162,10 @@ headers = [split_header(header) for header in rfc822.Message(instream).headers] + +# Store request body without headers +instream = StringIO(instream.read()) + for name, value in headers: name = ('_'.join(name.upper().split('-'))) if name not in ('CONTENT_TYPE', 'CONTENT_LENGTH'): ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/branches/2.9/lib/python/Testing/ZopeTestCase/ Merged r69932:69933 from 2.8 branch.
Log message for revision 69934: Merged r69932:69933 from 2.8 branch. Fixed functional.http to only pass the request body (no headers) to publish_module. Thanks to Andreas Zeidler. Changed: U Zope/branches/2.9/lib/python/Testing/ZopeTestCase/doc/CHANGES.txt U Zope/branches/2.9/lib/python/Testing/ZopeTestCase/zopedoctest/functional.py -=- Modified: Zope/branches/2.9/lib/python/Testing/ZopeTestCase/doc/CHANGES.txt === --- Zope/branches/2.9/lib/python/Testing/ZopeTestCase/doc/CHANGES.txt 2006-09-02 15:43:55 UTC (rev 69933) +++ Zope/branches/2.9/lib/python/Testing/ZopeTestCase/doc/CHANGES.txt 2006-09-02 15:48:28 UTC (rev 69934) @@ -1,5 +1,5 @@ -2.9 edition -- transaction.commit(1) is deprecated in favor of transaction.savepoint(). +0.9.9 (Zope 2.9 edition) +- transaction.commit(1) is deprecated in favor of transaction.savepoint(1). - Don't break if Python distros ship without profile support (Debian, Ubuntu). - Functional.publish() would hang if it got a request_method argument other than GET or HEAD while omitting the stdin argument. @@ -10,6 +10,8 @@ - Made sure logging is configured. Read $INSTANCE_HOME/log.ini if it exists. - Made base.TestCase a new-style class. - Added placeless.py for Z3-style setup. Thanks to Whit Morriss. +- Fixed functional.http to only pass the request body (no headers) to + publish_module. Thanks to Andreas Zeidler. 0.9.8 (Zope 2.8 edition) - Renamed 'doctest' package to 'zopedoctest' because of name-shadowing Modified: Zope/branches/2.9/lib/python/Testing/ZopeTestCase/zopedoctest/functional.py === --- Zope/branches/2.9/lib/python/Testing/ZopeTestCase/zopedoctest/functional.py 2006-09-02 15:43:55 UTC (rev 69933) +++ Zope/branches/2.9/lib/python/Testing/ZopeTestCase/zopedoctest/functional.py 2006-09-02 15:48:28 UTC (rev 69934) @@ -132,7 +132,7 @@ # Discard leading white space to make call layout simpler request_string = request_string.lstrip() -# split off and parse the command line +# Split off and parse the command line l = request_string.find('\n') command_line = request_string[:l].rstrip() request_string = request_string[l+1:] @@ -162,6 +162,10 @@ headers = [split_header(header) for header in rfc822.Message(instream).headers] + +# Store request body without headers +instream = StringIO(instream.read()) + for name, value in headers: name = ('_'.join(name.upper().split('-'))) if name not in ('CONTENT_TYPE', 'CONTENT_LENGTH'): ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/trunk/lib/python/ZServer/datatypes.py Provide a default for fast_listen, if not available
Log message for revision 69937: Provide a default for fast_listen, if not available Changed: U Zope/trunk/lib/python/ZServer/datatypes.py -=- Modified: Zope/trunk/lib/python/ZServer/datatypes.py === --- Zope/trunk/lib/python/ZServer/datatypes.py 2006-09-02 15:52:40 UTC (rev 69936) +++ Zope/trunk/lib/python/ZServer/datatypes.py 2006-09-02 16:04:48 UTC (rev 69937) @@ -70,7 +70,7 @@ self.force_connection_close = section.force_connection_close # webdav-source-server sections won't have webdav_source_clients: webdav_clients = getattr(section, webdav_source_clients, None) -self.fast_listen = getattr(section, 'fast_listen') +self.fast_listen = getattr(section, 'fast_listen', True) self.webdav_source_clients = webdav_clients self.use_wsgi = section.use_wsgi ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[ZWeb] Re: website design discussion
http://www.modscape.com/zope Please let me know of any bugs and what your browsers/os setup is. Zope Foundation Design 1, Version 1 * Try the nav. * Updated the colors of the nav to make it stand out more. * Added the extras box to the top right hand side of the main column. * Not going to make a fluid layout because: o Trading in having the space on the sides for less control over all page layouts. I'm going for functional control in this case over a prettier layout. o The current page is laid out to work on 800 x 600 and above. Most people will view the site at 1024 x 786 or 800 x 600 and not see large gaps on the side. o The simple nature of the site means a thinner page is more appropriate. Most of the content will be text that is easier to read the less wide the page is. This is not some multi column news site that has multiple content boxes. * Not going to add a top navigation because: o Its inconsistent. The navigation should be in one place. period. I find Plone to be confusing and annoying in it's use of seperate nav areas. 2 Navs will cause confusion on the front and back end of things. Im sticking with a standard left hand navigation based on an unordered list that will make sense normally, without a stylesheet, on text readers, mobile browsers... On Aug 28, 2006, at 7:09 AM, Martijn Faassen wrote: Tom Von Lahndorff wrote: http://modscape.com/zope New Foundation page. Try the nav. Only tested on Firefox/Mac so far. Looks nice. Some comments: * I get text flowing into each other in the sidebar. About The Foundation overlaps whatever is on the next line, with the word Foundation on the next line. There's another such instance lower down, where it says Foundation..Projects? (can't read). This is on firefox 1.5 on linux. Here's my feedback. Some of it is echoing Chris' feedback except I am being more constructive about it. Please don't give up! My main aim is to try to get some aspects of what I liked in version 3, which I think is good for a homepage design, into the sub-page design. * I think it would be nicer with the margins somewhat smaller. I also liked version 3's smaller marging and background color. You changed the texture here but with a small marging I like the other. * It would be nice to have optional sidebar boxes on the right, like they are in design 3. Could you create a page with such a box in it? * I think a list of links on the top, layouted much like the menu in version 3, but without dropdowns, would be useful to have. We could use it to navigate between major sections on a site. * I'm wondering whether we can do something slightly more exciting with the colors of the navigation sidebar on the left. I liked the use of blue in version 3, but now the blue has mostly gone into the margins. More functional blue, perhaps? Regards, Martijn ___ Zope-web maillist - Zope-web@zope.org http://mail.zope.org/mailman/listinfo/zope-web
Re: [ZWeb] Re: website design discussion
Perfect! (on windows, tested with firefox and ie) ___ Zope-web maillist - Zope-web@zope.org http://mail.zope.org/mailman/listinfo/zope-web
[Zope] Problems starting ZEO with zeoctl
I am receiving error messages when attempting to start ZEO in daemon mode. I have setup ZEO according to: http://plone.org/documentation/tutorial/robust-installation I have tried the Plone setup list, but their suggestions (changing the permissions on zeo/log/ and related files) did not lead to a resolution. I receive an error message and a progressive series of dots when I attempt to start ZEO: [EMAIL PROTECTED] zope]$ zeo/bin/zeoctl start . Traceback (most recent call last): File /opt/zope/zope/lib/python/zdaemon/zdrun.py, line 719, in ? main() File /opt/zope/zope/lib/python/zdaemon/zdrun.py, line 716, in main d.main(args) File /opt/zope/zope/lib/python/zdaemon/zdrun.py, line 243, in main self.run() File /opt/zope/zope/lib/python/zdaemon/zdrun.py, line 256, in run self.opensocket() File /opt/zope/zope/lib/python/zdaemon/zdrun.py, line 278, in opensocket sock.bind(tempname) File string, line 1, in bind socket.error: (13, 'Permission denied') . . . . . . . . [dots continue to appear at a regular interval] If I start ZEO using: zeo/bin/runzeo then all is fine, the Zope clients connect, etc. but it logs to the console and I want to run in daemon mode. I am using: Plone 2.5 Zope 2.9.4 Python 2.4.3 CentOS 3.7 TIA, Ben ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] iterating dictionaries with dtml-in
Hi, I know it's a silly question. But I was not able to find an example for this: I have a list of dicts like [ {'name':'John','age':27}, {'name':'Marc','age':17}, {'name':'Susanne','age':19} ] Now I want to iterate each 'name' like select optionJohn/option optionMarc/option optionSusanne/option /select I want to do this with DTML. select dtml-in getDicts option HOW CAN I PUT the keys 'name' HERE /option /dtml-in /select (getDicts returns the above list of dictionaries) Thanks and greets, Ferhat __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Problems starting ZEO with zeoctl
- Original Message - From: Ben [EMAIL PROTECTED] To: zope@zope.org Sent: Saturday, September 02, 2006 2:13 AM Subject: [Zope] Problems starting ZEO with zeoctl I am receiving error messages when attempting to start ZEO in daemon mode. I have setup ZEO according to: http://plone.org/documentation/tutorial/robust-installation I have tried the Plone setup list, but their suggestions (changing the permissions on zeo/log/ and related files) did not lead to a resolution. I receive an error message and a progressive series of dots when I attempt to start ZEO: [EMAIL PROTECTED] zope]$ zeo/bin/zeoctl start . Traceback (most recent call last): File /opt/zope/zope/lib/python/zdaemon/zdrun.py, line 719, in ? main() File /opt/zope/zope/lib/python/zdaemon/zdrun.py, line 716, in main d.main(args) File /opt/zope/zope/lib/python/zdaemon/zdrun.py, line 243, in main self.run() File /opt/zope/zope/lib/python/zdaemon/zdrun.py, line 256, in run self.opensocket() File /opt/zope/zope/lib/python/zdaemon/zdrun.py, line 278, in opensocket sock.bind(tempname) File string, line 1, in bind socket.error: (13, 'Permission denied') . . . . . . . . [dots continue to appear at a regular interval] If I start ZEO using: zeo/bin/runzeo then all is fine, the Zope clients connect, etc. but it logs to the console and I want to run in daemon mode. I am using: Plone 2.5 Zope 2.9.4 Python 2.4.3 CentOS 3.7 What port is zeo configured to use and what 'user' are you running as when you run zeoctl? Jonathan ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Problems starting ZEO with zeoctl
On 9/2/06, Jonathan [EMAIL PROTECTED] wrote: What port is zeo configured to use and what 'user' are you running as when you run zeoctl? ZEO is configured to use port 8100 (the default, I believe). I run 'zeoctl start' as user 'zope' unsucessfully, but I can run 'runzeo' as user 'zope' without any hassles. I'm not sure what permissions are involved, but it occurred to me that Red Hat's user private group system might be what's messing things up for me (and why it works for users of other distros), but I don't know enough about Zope or ZEO to check if this is the case. Ben ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] iterating dictionaries with dtml-in
- Original Message - From: Ferhat Ayaz [EMAIL PROTECTED] To: zope@zope.org Sent: Saturday, September 02, 2006 7:40 AM Subject: [Zope] iterating dictionaries with dtml-in Hi, I know it's a silly question. But I was not able to find an example for this: I have a list of dicts like [ {'name':'John','age':27}, {'name':'Marc','age':17}, {'name':'Susanne','age':19} ] Now I want to iterate each 'name' like select optionJohn/option optionMarc/option optionSusanne/option /select I want to do this with DTML. select dtml-in getDicts option HOW CAN I PUT the keys 'name' HERE /option /dtml-in /select (getDicts returns the above list of dictionaries) If getDicts returns a list of python dictionaries then you are going to require an outer loop (to run thru the list) and an inner loop (to run thru the keys of the current dictionary). Something like this will get you going in the right direction: dtml-let dictList=getDicts dtml-in dictList prefix=aDict dtml-in aDict_item.keys() dtml-var sequence-item, dtml-var aDict_item[_['sequence-item']] /dtml-in /dtml-in /dtml-let However, it would be much easier to change your getDicts routine to format the data you need for your OPTION statements, instead of extracting this information via dtml. hth Jonathan ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Problems starting ZEO with zeoctl
- Original Message - From: Ben [EMAIL PROTECTED] To: Jonathan [EMAIL PROTECTED] Cc: zope@zope.org Sent: Saturday, September 02, 2006 8:49 AM Subject: Re: [Zope] Problems starting ZEO with zeoctl On 9/2/06, Jonathan [EMAIL PROTECTED] wrote: As an experiment, can you try running zeoctl as the root user? If this works, then it is definitely a problem with the permissions that your 'zope' user has (the error you described is normally a permissions related error). Running 'zeoctl start' as root does not help, however if I edit zeo.conf and change: user zope to: user root and then run zeoctl start, it works. so it seems it certainly is permission related, but I'm not sure where to go from here, as the .py files related to zeoctl and runzeo are beyond my level of understanding. The zeo.conf that I am running (Zope 2.9.2) has the 'user' entry commented out: runner program $INSTANCE/bin/runzeo socket-name $INSTANCE/etc/zeo.zdsock daemon true forever false backoff-limit 10 exit-codes 0, 2 directory $INSTANCE default-to-interactive true # user zope python /usr/local/bin/python zdrun /usr/local/Zope-2.9.2/lib/python/zdaemon/zdrun.py # This logfile should match the one in the zeo.conf file. # It is used by zdctl's logtail command, zdrun/zdctl doesn't write it. logfile $INSTANCE/log/zeo.log /runner I don't usually run zeoctl manually (my CentOS 4.3 system starts it at boot time), but when I do I am running as 'root' and it works fine. Jonathan ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] ZEO Problem
Hi; I'm reading the Plone book. It states that for Zope 2.7 (I have 2.78) ZEO is built in by default but must be instantiated thus: cd /opt/Zope-2/7/bin ./mkzeoinstance /var/zeo or some such code. So I tried this: cd /usr/local/zope/278/bin ./mkzeoinstance.py ../../instance2/var/zeo where 278 is my installation, instance2 is a Zope instance (I have 3), and mkzeoinstance.py is the command that works (mkzeoinstance by itself doesn't print anything to screen other than a command failed message). The Plone book then states that I must move Data.fs into the new /zeo/var dir, which I did. Everything seems to go well. If I start Zope using runzope I get this output at the tail end: -- 2006-09-02T13:15:35 INFO(0) Zope Ready to handle requests However, if I try to log into the ZMI my passwords don't work. I even tried creating an emergencyuser and that didn't work, either. What to do? Also, should I move these other files into the new zeo/var dir? Data.fs.index Data.fs.lock Data.fs.old Data.fs.tmp I tried that, also, with negative results, but it seems to me that if I'm moving Data.fs I should move these others as well. TIA, beno ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] ZEO Problem
- Original Message - From: beno [EMAIL PROTECTED] To: zope@zope.org Sent: Saturday, September 02, 2006 9:24 AM Subject: [Zope] ZEO Problem Hi; I'm reading the Plone book. It states that for Zope 2.7 (I have 2.78) ZEO is built in by default but must be instantiated thus: cd /opt/Zope-2/7/bin ./mkzeoinstance /var/zeo or some such code. So I tried this: cd /usr/local/zope/278/bin ./mkzeoinstance.py ../../instance2/var/zeo where 278 is my installation, instance2 is a Zope instance (I have 3), and mkzeoinstance.py is the command that works (mkzeoinstance by itself doesn't print anything to screen other than a command failed message). The Plone book then states that I must move Data.fs into the new /zeo/var dir, which I did. Everything seems to go well. If I start Zope using runzope I get this output at the tail end: -- 2006-09-02T13:15:35 INFO(0) Zope Ready to handle requests In your .../log/events.log file you should see some zeo connection activity, like: 2006-09-02T08:11:17 INFO Zope Ready to handle requests -- 2006-09-02T08:11:44 INFO ZEO.ClientStorage (3196) ClientStorage (pid=3196) created RW/normal for storage: '1' -- 2006-09-02T08:11:44 INFO ZEO.cache created temporary cache file 'fdopen' -- 2006-09-02T08:11:44 INFO ZEO.ClientStorage (3196) Testing connection ManagedClientConnection ('194.164.124.4', 8100) -- 2006-09-02T08:11:44 INFO ZEO.zrpc.Connection(C) (194.164.124.4:8100) received handshake 'Z303' -- 2006-09-02T08:11:44 INFO ZEO.ClientStorage (3196) Server authentication protocol None -- 2006-09-02T08:11:44 INFO ZEO.ClientStorage (3196) Connected to storage: ('sparrow.conetra.com', 8100) -- 2006-09-02T08:11:44 INFO ZEO.ClientStorage (3196) Verifying cache -- 2006-09-02T08:11:44 INFO ZEO.ClientStorage (3196) Waiting for cache verification to finish -- 2006-09-02T08:11:44 INFO ZEO.ClientStorage (3196) Waiting for cache verification to finish -- 2006-09-02T08:11:44 INFO ZEO.ClientStorage (3196) endVerify finishing -- 2006-09-02T08:11:44 INFO ZEO.ClientStorage (3196) endVerify finished -- This will tell you that your zeo client is connected to the zeo server However, if I try to log into the ZMI my passwords don't work. I even tried creating an emergencyuser and that didn't work, either. What to do? Also, should I move these other files into the new zeo/var dir? Data.fs.index Data.fs.lockData.fs.old Data.fs.tmp All you need is Data.fs. Data.fs.index will be recreated if it is not found when zope starts Data.fs.old is created when you pack your zodb You can safely ignore the .lock and .tmp files (they are created by Zope as needed) Jonathan ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Problems starting ZEO with zeoctl
- Original Message - From: Ben [EMAIL PROTECTED] To: Jonathan [EMAIL PROTECTED] Sent: Saturday, September 02, 2006 10:02 AM Subject: Re: [Zope] Problems starting ZEO with zeoctl On 9/2/06, Jonathan [EMAIL PROTECTED] wrote: The zeo.conf that I am running (Zope 2.9.2) has the 'user' entry commented out: [...] I don't usually run zeoctl manually (my CentOS 4.3 system starts it at boot time), but when I do I am running as 'root' and it works fine. What is the security risk with doing this? If you're running behind a firewall you could set your firewall so that port 8100 is blocked from outside access (ie. only your zeo client and zeo server, running behind the firewall, can communicate on port 8100 - or whatever port you have zeo configured to use) ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] ZEO Problem
I got this working by changing the following in zope.conf: server localhost:7080 to server 202.71.106.119: Apparently, it needs its own port? TIA, beno Jonathan wrote: - Original Message - From: beno [EMAIL PROTECTED] To: zope@zope.org Sent: Saturday, September 02, 2006 9:24 AM Subject: [Zope] ZEO Problem Hi; I'm reading the Plone book. It states that for Zope 2.7 (I have 2.78) ZEO is built in by default but must be instantiated thus: cd /opt/Zope-2/7/bin ./mkzeoinstance /var/zeo or some such code. So I tried this: cd /usr/local/zope/278/bin ./mkzeoinstance.py ../../instance2/var/zeo where 278 is my installation, instance2 is a Zope instance (I have 3), and mkzeoinstance.py is the command that works (mkzeoinstance by itself doesn't print anything to screen other than a command failed message). The Plone book then states that I must move Data.fs into the new /zeo/var dir, which I did. Everything seems to go well. If I start Zope using runzope I get this output at the tail end: -- 2006-09-02T13:15:35 INFO(0) Zope Ready to handle requests In your .../log/events.log file you should see some zeo connection activity, like: 2006-09-02T08:11:17 INFO Zope Ready to handle requests -- 2006-09-02T08:11:44 INFO ZEO.ClientStorage (3196) ClientStorage (pid=3196) created RW/normal for storage: '1' -- 2006-09-02T08:11:44 INFO ZEO.cache created temporary cache file 'fdopen' -- 2006-09-02T08:11:44 INFO ZEO.ClientStorage (3196) Testing connection ManagedClientConnection ('194.164.124.4', 8100) -- 2006-09-02T08:11:44 INFO ZEO.zrpc.Connection(C) (194.164.124.4:8100) received handshake 'Z303' -- 2006-09-02T08:11:44 INFO ZEO.ClientStorage (3196) Server authentication protocol None -- 2006-09-02T08:11:44 INFO ZEO.ClientStorage (3196) Connected to storage: ('sparrow.conetra.com', 8100) -- 2006-09-02T08:11:44 INFO ZEO.ClientStorage (3196) Verifying cache -- 2006-09-02T08:11:44 INFO ZEO.ClientStorage (3196) Waiting for cache verification to finish -- 2006-09-02T08:11:44 INFO ZEO.ClientStorage (3196) Waiting for cache verification to finish -- 2006-09-02T08:11:44 INFO ZEO.ClientStorage (3196) endVerify finishing -- 2006-09-02T08:11:44 INFO ZEO.ClientStorage (3196) endVerify finished -- This will tell you that your zeo client is connected to the zeo server However, if I try to log into the ZMI my passwords don't work. I even tried creating an emergencyuser and that didn't work, either. What to do? Also, should I move these other files into the new zeo/var dir? Data.fs.index Data.fs.lockData.fs.old Data.fs.tmp All you need is Data.fs. Data.fs.index will be recreated if it is not found when zope starts Data.fs.old is created when you pack your zodb You can safely ignore the .lock and .tmp files (they are created by Zope as needed) Jonathan ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] ZEO Problem
- Original Message - From: beno [EMAIL PROTECTED] To: zope@zope.org Sent: Saturday, September 02, 2006 10:27 AM Subject: Re: [Zope] ZEO Problem I got this working by changing the following in zope.conf: server localhost:7080 to server 202.71.106.119: Apparently, it needs its own port? TIA, beno You need to make sure that the entry in your zeo client config file (zope.conf) eg zeoclient server 194.123.123.123:8100 matches the entry in your zeo server config file (zeo.conf) eg. zeo address 8100 and that your zeo server is running on the ip address specified in the zeoclient entry in zope.conf Jonathan ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Problems starting ZEO with zeoctl
On 9/3/06, Jonathan [EMAIL PROTECTED] wrote: If you're running behind a firewall you could set your firewall so that port 8100 is blocked from outside access (ie. only your zeo client and zeo server, running behind the firewall, can communicate on port 8100 - or whatever port you have zeo configured to use) I was planning on doing this anyway, but I was thinking more about how the ZEO server process might be able to run amok if it was run as root, but if it was run as a regular user then it would be more limited in what it could do. I'm not sure how likely this is, I just want to know what risks I am accepting by having the convenience of running the ZEO server as a daemon. Thank you for your help with troubleshooting these problems, it is much appreciated. Ben ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Problems starting ZEO with zeoctl
- Original Message - From: Ben [EMAIL PROTECTED] To: Jonathan [EMAIL PROTECTED] Cc: zope@zope.org Sent: Saturday, September 02, 2006 10:39 AM Subject: Re: [Zope] Problems starting ZEO with zeoctl On 9/3/06, Jonathan [EMAIL PROTECTED] wrote: If you're running behind a firewall you could set your firewall so that port 8100 is blocked from outside access (ie. only your zeo client and zeo server, running behind the firewall, can communicate on port 8100 - or whatever port you have zeo configured to use) I was planning on doing this anyway, but I was thinking more about how the ZEO server process might be able to run amok if it was run as root, but if it was run as a regular user then it would be more limited in what it could do. I have never heard of a case where a rogue zeo server process ran 'amok' ;-) I'm not sure how likely this is, I just want to know what risks I am accepting by having the convenience of running the ZEO server as a daemon. Thank you for your help with troubleshooting these problems, it is much appreciated. Your welcome. Jonathan ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] ZEO Problem
Jonathan wrote: I got this working by changing the following in zope.conf: server localhost:7080 to server 202.71.106.119: Apparently, it needs its own port? TIA, beno You need to make sure that the entry in your zeo client config file (zope.conf) eg zeoclient server 194.123.123.123:8100 matches the entry in your zeo server config file (zeo.conf) eg. zeo address 8100 and that your zeo server is running on the ip address specified in the zeoclient entry in zope.conf That's logical. Why does zeo need its own port? ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] ZEO Problem
--On 2. September 2006 12:15:47 -0400 beno [EMAIL PROTECTED] wrote: zeo address 8100 and that your zeo server is running on the ip address specified in the zeoclient entry in zope.conf That's logical. Why does zeo need its own port? Because every kind of network service needs its own port. -aj -- ZOPYX Ltd. Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany Web: www.zopyx.com - Email: [EMAIL PROTECTED] - Phone +49 - 7071 - 793376 E-Publishing, Python, Zope Plone development, Consulting pgpZ1fCZcP7pN.pgp Description: PGP signature ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: Problems starting ZEO with zeoctl
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ben wrote: I am receiving error messages when attempting to start ZEO in daemon mode. I have setup ZEO according to: http://plone.org/documentation/tutorial/robust-installation I have tried the Plone setup list, but their suggestions (changing the permissions on zeo/log/ and related files) did not lead to a resolution. I receive an error message and a progressive series of dots when I attempt to start ZEO: [EMAIL PROTECTED] zope]$ zeo/bin/zeoctl start . Traceback (most recent call last): File /opt/zope/zope/lib/python/zdaemon/zdrun.py, line 719, in ? main() File /opt/zope/zope/lib/python/zdaemon/zdrun.py, line 716, in mainx File /opt/zope/zope/lib/python/zdaemon/zdrun.py, line 256, in run self.opensocket() File /opt/zope/zope/lib/python/zdaemon/zdrun.py, line 278, in opensocket sock.bind(tempname) File string, line 1, in bind socket.error: (13, 'Permission denied') . . . . . . . . [dots continue to appear at a regular interval] If I start ZEO using: zeo/bin/runzeo then all is fine, the Zope clients connect, etc. but it logs to the console and I want to run in daemon mode. I am using: Plone 2.5 Zope 2.9.4 Python 2.4.3 CentOS 3.7 The permission needed here is for the effective user to write to the ZEO control socket, which is normally in the 'etc' direcdtory of your instance home, and named 'zeo.zdsock'. Try changing 'zeo.conf' to put that file in your 'var' directory, where you *must* be able to create files (otherwise you wouldn't be able to use 'runzeo'). Tres. - -- === Tres Seaver +1 202-558-7113 [EMAIL PROTECTED] Palladion Software Excellence by Designhttp://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2.2 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFE+bNy+gerLs4ltQ4RAvmPAJ9DDR9/vX5umajLE2CWoss9U4ZQJQCgsvYd pHVsOxk7qLdeoSfHGoqFPzM= =Ngq6 -END PGP SIGNATURE- ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] SecurityInfo Conflicting security declarations
Hi; I noticed in my events log the following: 2006-09-02T15:13:50 PROBLEM(100) SecurityInfo Conflicting security declarations for getViewTOCValue -- 2006-09-02T15:13:50 PROBLEM(100) SecurityInfo Class PloneArticleMultiPage had conflicting security declarations How do I trouble-shoot these? TIA, beno ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] SecurityInfo Conflicting security declarations
--On 2. September 2006 12:48:49 -0400 beno [EMAIL PROTECTED] wrote: Hi; I noticed in my events log the following: 2006-09-02T15:13:50 PROBLEM(100) SecurityInfo Conflicting security declarations for getViewTOCValue -- 2006-09-02T15:13:50 PROBLEM(100) SecurityInfo Class PloneArticleMultiPage had conflicting security declarations Either by fixing the double defined security assertions in the related code oin your own or contact the author of the related code/product or file a bugreport to the corresponding bugtracker. -aj ZOPYX Ltd. Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany Web: www.zopyx.com - Email: [EMAIL PROTECTED] - Phone +49 - 7071 - 793376 E-Publishing, Python, Zope Plone development, Consulting pgph1lAeY4QFY.pgp Description: PGP signature ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )