Python2.4 and Zope 2.7
Hi All, I'm having some trouble getting python2.3.4 running on FreeBSD 5.3b7 on an AMD Opteron, so for kicks tried python2.4rc3. It managed to pass the recursion regex test in test_re.py that was causing python2.3.4 to barf, but in trying to start Zope with python2.4rc3 I get the error below. Does anyone here know if Zope 2.7.0 should work with python 2.4? -Matt zeo1# bin/runzope /usr/local/lib/python2.4/whrandom.py:38: DeprecationWarning: the whrandom module is deprecated; please use the random module DeprecationWarning) Traceback (most recent call last): File "/usr/local/Zope-2.7.0/lib/python/Zope/Startup/run.py", line 49, in ? run() File "/usr/local/Zope-2.7.0/lib/python/Zope/Startup/run.py", line 18, in run opts = _setconfig() File "/usr/local/Zope-2.7.0/lib/python/Zope/Startup/run.py", line 41, in _setconfig opts.realize(doc="Sorry, no option docs yet.") File "/usr/local/Zope-2.7.0/lib/python/zdaemon/zdoptions.py", line 264, in realize self.load_configfile() File "/usr/local/Zope-2.7.0/lib/python/zdaemon/zdoptions.py", line 308, in load_configfile self.zconfig_options) File "/usr/local/Zope-2.7.0/lib/python/ZConfig/loader.py", line 43, in loadConfig return _get_config_loader(schema, overrides).loadURL(url) File "/usr/local/Zope-2.7.0/lib/python/ZConfig/loader.py", line 71, in loadURL return self.loadResource(r) File "/usr/local/Zope-2.7.0/lib/python/ZConfig/loader.py", line 183, in loadResource self._parse_resource(sm, resource) File "/usr/local/Zope-2.7.0/lib/python/ZConfig/loader.py", line 234, in _parse_resource parser.parse(matcher) File "/usr/local/Zope-2.7.0/lib/python/ZConfig/cfgparser.py", line 63, in parse section = self.end_section(section, line[2:-1]) File "/usr/local/Zope-2.7.0/lib/python/ZConfig/cfgparser.py", line 116, in end_section self.context.endSection( File "/usr/local/Zope-2.7.0/lib/python/ZConfig/loader.py", line 201, in endSection sectvalue = matcher.finish() File "/usr/local/Zope-2.7.0/lib/python/ZConfig/matcher.py", line 170, in finish return self.constuct() File "/usr/local/Zope-2.7.0/lib/python/ZConfig/matcher.py", line 212, in constuct v = v.convert(ci.datatype) File "/usr/local/Zope-2.7.0/lib/python/ZConfig/info.py", line 65, in convert return datatype(self.value) File "/usr/local/Zope-2.7.0/lib/python/Zope/Startup/datatypes.py", line 106, in importable_name package = __import__(n, g, g, component) File "/usr/local/Zope-2.7.0/lib/python/DBTab/ClassFactories.py", line 18, in ? import OFS.Uninstalled File "/usr/local/Zope-2.7.0/lib/python/OFS/Uninstalled.py", line 16, in ? import SimpleItem, Globals, Acquisition File "/usr/local/Zope-2.7.0/lib/python/OFS/SimpleItem.py", line 27, in ? from CopySupport import CopySource File "/usr/local/Zope-2.7.0/lib/python/OFS/CopySupport.py", line 549, in ? action ='manage_main',) File "/usr/local/Zope-2.7.0/lib/python/DocumentTemplate/DT_String.py", line 474, in __call__ try: result = render_blocks(self._v_blocks, md) File "/usr/local/Zope-2.7.0/lib/python/DocumentTemplate/pDocumentTemplate.py", line 202, in render_blocks cond=md[cond] File "/usr/local/Zope-2.7.0/lib/python/DocumentTemplate/pDocumentTemplate.py", line 140, in __getitem__ v = self.dicts[key] File "/usr/local/Zope-2.7.0/lib/python/DocumentTemplate/pDocumentTemplate.py", line 100, in __getitem__ raise KeyError, key KeyError: "'v'" -- Matt Hamilton matth@netsight.co.uk Netsight Internet Solutions, Ltd. Business Vision on the Internet http://www.netsight.co.uk +44 (0)117 9090901 Web Design | Zope/Plone Development & Consulting | Co-location | Hosting
On Oct 17, 2004, at 18:13, Matt Hamilton wrote:
Hi All, I'm having some trouble getting python2.3.4 running on FreeBSD 5.3b7 on an AMD Opteron, so for kicks tried python2.4rc3. It managed to pass the recursion regex test in test_re.py that was causing python2.3.4 to barf, but in trying to start Zope with python2.4rc3 I get the error below. Does anyone here know if Zope 2.7.0 should work with python 2.4?
AFAIK no one has tested it or made any claims it does. More interesting than testing 2.7.0 would be a *recent* 2.7 version (the latest 2.7.3 beta) and maybe 2.8 - unless you're looking for production-quality software. jens
--On Sonntag, 17. Oktober 2004 17:13 Uhr +0100 Matt Hamilton <matth@netsight.co.uk> wrote:
Hi All, I'm having some trouble getting python2.3.4 running on FreeBSD 5.3b7 on an AMD Opteron, so for kicks tried python2.4rc3. It managed to pass the recursion regex test in test_re.py that was causing python2.3.4 to barf, but in trying to start Zope with python2.4rc3 I get the error below. Does anyone here know if Zope 2.7.0 should work with python 2.4?
-Matt
Python 2.4 is still in alpha stage and there are no plans to support Python 2.4 in the short term. -aj
FWIW, the fact that you get the error at that point means that cDocumentTemplate can't be imported (it's using pDocumentTemplate, which nobody uses since it's a "fallback"). This is probably the root of the problem. I suspect pDocumentTemplate would give the same error on any platform. I would start investigating why cDocumentTemplate fails to import. Yet another example of why conditionals at module scope are evil. - C On Sun, 2004-10-17 at 17:13 +0100, Matt Hamilton wrote:
Hi All, I'm having some trouble getting python2.3.4 running on FreeBSD 5.3b7 on an AMD Opteron, so for kicks tried python2.4rc3. It managed to pass the recursion regex test in test_re.py that was causing python2.3.4 to barf, but in trying to start Zope with python2.4rc3 I get the error below. Does anyone here know if Zope 2.7.0 should work with python 2.4?
-Matt
zeo1# bin/runzope /usr/local/lib/python2.4/whrandom.py:38: DeprecationWarning: the whrandom module is deprecated; please use the random module DeprecationWarning) Traceback (most recent call last): File "/usr/local/Zope-2.7.0/lib/python/Zope/Startup/run.py", line 49, in ? run() File "/usr/local/Zope-2.7.0/lib/python/Zope/Startup/run.py", line 18, in run opts = _setconfig() File "/usr/local/Zope-2.7.0/lib/python/Zope/Startup/run.py", line 41, in _setconfig opts.realize(doc="Sorry, no option docs yet.") File "/usr/local/Zope-2.7.0/lib/python/zdaemon/zdoptions.py", line 264, in realize self.load_configfile() File "/usr/local/Zope-2.7.0/lib/python/zdaemon/zdoptions.py", line 308, in load_configfile self.zconfig_options) File "/usr/local/Zope-2.7.0/lib/python/ZConfig/loader.py", line 43, in loadConfig return _get_config_loader(schema, overrides).loadURL(url) File "/usr/local/Zope-2.7.0/lib/python/ZConfig/loader.py", line 71, in loadURL return self.loadResource(r) File "/usr/local/Zope-2.7.0/lib/python/ZConfig/loader.py", line 183, in loadResource self._parse_resource(sm, resource) File "/usr/local/Zope-2.7.0/lib/python/ZConfig/loader.py", line 234, in _parse_resource parser.parse(matcher) File "/usr/local/Zope-2.7.0/lib/python/ZConfig/cfgparser.py", line 63, in parse section = self.end_section(section, line[2:-1]) File "/usr/local/Zope-2.7.0/lib/python/ZConfig/cfgparser.py", line 116, in end_section self.context.endSection( File "/usr/local/Zope-2.7.0/lib/python/ZConfig/loader.py", line 201, in endSection sectvalue = matcher.finish() File "/usr/local/Zope-2.7.0/lib/python/ZConfig/matcher.py", line 170, in finish return self.constuct() File "/usr/local/Zope-2.7.0/lib/python/ZConfig/matcher.py", line 212, in constuct v = v.convert(ci.datatype) File "/usr/local/Zope-2.7.0/lib/python/ZConfig/info.py", line 65, in convert return datatype(self.value) File "/usr/local/Zope-2.7.0/lib/python/Zope/Startup/datatypes.py", line 106, in importable_name package = __import__(n, g, g, component) File "/usr/local/Zope-2.7.0/lib/python/DBTab/ClassFactories.py", line 18, in ? import OFS.Uninstalled File "/usr/local/Zope-2.7.0/lib/python/OFS/Uninstalled.py", line 16, in ? import SimpleItem, Globals, Acquisition File "/usr/local/Zope-2.7.0/lib/python/OFS/SimpleItem.py", line 27, in ? from CopySupport import CopySource File "/usr/local/Zope-2.7.0/lib/python/OFS/CopySupport.py", line 549, in ? action ='manage_main',) File "/usr/local/Zope-2.7.0/lib/python/DocumentTemplate/DT_String.py", line 474, in __call__ try: result = render_blocks(self._v_blocks, md) File "/usr/local/Zope-2.7.0/lib/python/DocumentTemplate/pDocumentTemplate.py", line 202, in render_blocks cond=md[cond] File "/usr/local/Zope-2.7.0/lib/python/DocumentTemplate/pDocumentTemplate.py", line 140, in __getitem__ v = self.dicts[key] File "/usr/local/Zope-2.7.0/lib/python/DocumentTemplate/pDocumentTemplate.py", line 100, in __getitem__ raise KeyError, key KeyError: "'v'"
-- Matt Hamilton matth@netsight.co.uk Netsight Internet Solutions, Ltd. Business Vision on the Internet http://www.netsight.co.uk +44 (0)117 9090901 Web Design | Zope/Plone Development & Consulting | Co-location | Hosting
_______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
chrism wrote:
FWIW, the fact that you get the error at that point means that cDocumentTemplate can't be imported (it's using pDocumentTemplate, which nobody uses since it's a "fallback"). This is probably the root of the problem. I suspect pDocumentTemplate would give the same error on any platform. I would start investigating why cDocumentTemplate fails to import.
Doh! I bet it is because I have copied over the install from one of our other servers, and the C components will have been compiled with py2.3, and hence probably not imported successfully into py2.4. Before I realised this I did a fresh install, using Zope 2.7.3b2 and py2.4a3 and after I got all the modules I needed recompiled for py2.4 (PIL, GD, 4Suite, etc.) I started Zope and is still crashed with a Bus Error. Which was what I was getting with py2.3 on FreeBSD/AMD64. So it looks like it just gets a little further with py2.4, but there are still problems. I'll try and get the recursion limit a bit lower and see if that helps it get through. -Matt -- Matt Hamilton matth@netsight.co.uk Netsight Internet Solutions, Ltd. Business Vision on the Internet http://www.netsight.co.uk +44 (0)117 9090901 Web Design | Zope/Plone Development & Consulting | Co-location | Hosting
Matt Hamilton wrote:
chrism wrote:
FWIW, the fact that you get the error at that point means that cDocumentTemplate can't be imported (it's using pDocumentTemplate, which nobody uses since it's a "fallback"). This is probably the root of the problem. I suspect pDocumentTemplate would give the same error on any platform. I would start investigating why cDocumentTemplate fails to import.
Doh! I bet it is because I have copied over the install from one of our other servers, and the C components will have been compiled with py2.3, and hence probably not imported successfully into py2.4.
Before I realised this I did a fresh install, using Zope 2.7.3b2 and py2.4a3 and after I got all the modules I needed recompiled for py2.4 (PIL, GD, 4Suite, etc.) I started Zope and is still crashed with a Bus Error. Which was what I was getting with py2.3 on FreeBSD/AMD64. So it looks like it just gets a little further with py2.4, but there are still problems. I'll try and get the recursion limit a bit lower and see if that helps it get through.
Are you sure that you have applied whatever patch is required to give Python a big enough stack on FreeBSD (Hmm, I foresee a new spam topic, "Enlarge your Python's Stack! Make your Zope beg for mercy!" ;) Strange crashes reproducible only on *BSD should be checked first against this one: http://mail.python.org/pipermail/python-list/2003-February/148277.html Tres. -- =============================================================== Tres Seaver tseaver@zope.com Zope Corporation "Zope Dealers" http://www.zope.com
Tres Seaver wrote:
Are you sure that you have applied whatever patch is required to give Python a big enough stack on FreeBSD (Hmm, I foresee a new spam topic, "Enlarge your Python's Stack! Make your Zope beg for mercy!" ;)
Strange crashes reproducible only on *BSD should be checked first against this one:
http://mail.python.org/pipermail/python-list/2003-February/148277.html
Yes, I've tried increasing the stack size. I think it is a platform specific problem for threads on FreeBSD/AMD64. Regardless of how large I make the stack, or how low I set the recursionlimit, python 2.3.4 cannot complete test_re.py sucessfully on this platform. I've tried bringing it up on the FreeBSD lists, but not got much of a response. Python 2.4a3 must do *something* different with threads, as it can complete test_re.py on the same platform. I've tried backporting over thread_pthread.py from 2.4a3, but that doesn't do it. I think there may be extra defines set in the Makefile or configure. -Matt -- Matt Hamilton matth@netsight.co.uk Netsight Internet Solutions, Ltd. Business Vision on the Internet http://www.netsight.co.uk +44 (0)117 9090901 Web Design | Zope/Plone Development & Consulting | Co-location | Hosting
[Matt Hamilton]
Yes, I've tried increasing the stack size. I think it is a platform specific problem for threads on FreeBSD/AMD64. Regardless of how large I make the stack, or how low I set the recursionlimit, python 2.3.4 cannot complete test_re.py sucessfully on this platform.
FYI, the sys module's recursion limit only kicks in when Python functions are calling Python functions. The re engine is coded entirely in C, and recursions at the C level "don't count" toward the sys module's recursion limit. IOW, only the stack size is relevant for test_re in 2.3.4.
I've tried bringing it up on the FreeBSD lists, but not got much of a response. Python 2.4a3 must do *something* different with threads, as it can complete test_re.py on the same platform.
test_re is probably a red herring here: starting with 2.4a1, Python's re C implementation became *far* less recursive than prior implementations. IOW, running test_re under 2.4 is a very different (and much easier on the stack) thing than running test_re under 2.3. So looking at test_re alone doesn't really imply anything about threads. The biggest stack hog in 2.4's test suite is the new test_compiler, but it takes so long it only runs a subset by default. Pass "-u all test_compiler" to regrtest.py to run the whole thing. If that passes (== no output other than "1 test OK.")-- and it should --that's a severe test of both the C stack and sys's recursion limit.
I've tried backporting over thread_pthread.py from 2.4a3, but that doesn't do it. I think there may be extra defines set in the Makefile or configure.
Possibly, but I'm not optimistic about that line. That test_re failed in 2.3.4 said you have "stack problems". That test_re passed in 2.4 just says that 2.4's re implementation doesn't stress the stack anymore. But (the full) test_compiler does, so I'm betting that blows up under 2.4 for you.
I have installed Zope 2.7.3 + Python 2.4b1 on my company site and it seems to run pretty fine. I could not see the error below you described. Andreas --On Sonntag, 17. Oktober 2004 17:13 Uhr +0100 Matt Hamilton <matth@netsight.co.uk> wrote:
Hi All, I'm having some trouble getting python2.3.4 running on FreeBSD 5.3b7 on an AMD Opteron, so for kicks tried python2.4rc3. It managed to pass the recursion regex test in test_re.py that was causing python2.3.4 to barf, but in trying to start Zope with python2.4rc3 I get the error below. Does anyone here know if Zope 2.7.0 should work with python 2.4?
-Matt
zeo1# bin/runzope /usr/local/lib/python2.4/whrandom.py:38: DeprecationWarning: the whrandom module is deprecated; please use the random module DeprecationWarning) Traceback (most recent call last): File "/usr/local/Zope-2.7.0/lib/python/Zope/Startup/run.py", line 49, in ? run() File "/usr/local/Zope-2.7.0/lib/python/Zope/Startup/run.py", line 18, in run opts = _setconfig() File "/usr/local/Zope-2.7.0/lib/python/Zope/Startup/run.py", line 41, in _setconfig opts.realize(doc="Sorry, no option docs yet.") File "/usr/local/Zope-2.7.0/lib/python/zdaemon/zdoptions.py", line 264, in realize self.load_configfile() File "/usr/local/Zope-2.7.0/lib/python/zdaemon/zdoptions.py", line 308, in load_configfile self.zconfig_options) File "/usr/local/Zope-2.7.0/lib/python/ZConfig/loader.py", line 43, in loadConfig return _get_config_loader(schema, overrides).loadURL(url) File "/usr/local/Zope-2.7.0/lib/python/ZConfig/loader.py", line 71, in loadURL return self.loadResource(r) File "/usr/local/Zope-2.7.0/lib/python/ZConfig/loader.py", line 183, in loadResource self._parse_resource(sm, resource) File "/usr/local/Zope-2.7.0/lib/python/ZConfig/loader.py", line 234, in _parse_resource parser.parse(matcher) File "/usr/local/Zope-2.7.0/lib/python/ZConfig/cfgparser.py", line 63, in parse section = self.end_section(section, line[2:-1]) File "/usr/local/Zope-2.7.0/lib/python/ZConfig/cfgparser.py", line 116, in end_section self.context.endSection( File "/usr/local/Zope-2.7.0/lib/python/ZConfig/loader.py", line 201, in endSection sectvalue = matcher.finish() File "/usr/local/Zope-2.7.0/lib/python/ZConfig/matcher.py", line 170, in finish return self.constuct() File "/usr/local/Zope-2.7.0/lib/python/ZConfig/matcher.py", line 212, in constuct v = v.convert(ci.datatype) File "/usr/local/Zope-2.7.0/lib/python/ZConfig/info.py", line 65, in convert return datatype(self.value) File "/usr/local/Zope-2.7.0/lib/python/Zope/Startup/datatypes.py", line 106, in importable_name package = __import__(n, g, g, component) File "/usr/local/Zope-2.7.0/lib/python/DBTab/ClassFactories.py", line 18, in ? import OFS.Uninstalled File "/usr/local/Zope-2.7.0/lib/python/OFS/Uninstalled.py", line 16, in ? import SimpleItem, Globals, Acquisition File "/usr/local/Zope-2.7.0/lib/python/OFS/SimpleItem.py", line 27, in ? from CopySupport import CopySource File "/usr/local/Zope-2.7.0/lib/python/OFS/CopySupport.py", line 549, in ? action ='manage_main',) File "/usr/local/Zope-2.7.0/lib/python/DocumentTemplate/DT_String.py", line 474, in __call__ try: result = render_blocks(self._v_blocks, md) File "/usr/local/Zope-2.7.0/lib/python/DocumentTemplate/pDocumentTemplate.py", line 202, in render_blocks cond=md[cond] File "/usr/local/Zope-2.7.0/lib/python/DocumentTemplate/pDocumentTemplate.py", line 140, in __getitem__ v = self.dicts[key] File "/usr/local/Zope-2.7.0/lib/python/DocumentTemplate/pDocumentTemplate.py", line 100, in __getitem__ raise KeyError, key KeyError: "'v'"
-- Matt Hamilton matth@netsight.co.uk Netsight Internet Solutions, Ltd. Business Vision on the Internet http://www.netsight.co.uk +44 (0)117 9090901 Web Design | Zope/Plone Development & Consulting | Co-location | Hosting
_______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Hi, Am Mo, den 18.10.2004 schrieb Andreas Jung um 20:30:
I have installed Zope 2.7.3 + Python 2.4b1 on my company site and it seems to run pretty fine. I could not see the error below you described.
I can second that. python-2.4.0b1 as Andreas said. :-) Regards Tino
participants (7)
-
Andreas Jung -
chrism -
Jens Vagelpohl -
Matt Hamilton -
Tim Peters -
Tino Wildenhain -
Tres Seaver