Zope 2.6+ pyton 2.3 ? and "Bad Call" on zope 2.6.2/python 2.1.3 with profiling turned on.
Yo, I have an elaborate piece of python code that works fine, but with profiling turned on, it barfs a "Bad Call" message. When google-ing for a solution, the only thing I could find was a http://mail.python.org/pipermail/python-bugs-list/2003-June/018510.html There's a follow up stating it's "already fixed", and does not occur in Python 2.2.x and beyond. So now my questions are: - how difficult is it to get a zope 2.6.2 (or 2.7) working with a python 2.2.x or 2.3. on a windows platform? (I read up on the changes between 2.6 and 2.7 and it does not seem to change python version.) - I believe there's a concensus that the next major 2.X release should jump immediately 2.3, but is there a timeline ? - or is there a workaround/solution to the "Bad Call" problem? This all to see if I should invest time in getting a 2.6 or 2.7 +python 2.3 up and running or I should do my own time measurements/profiling effort. TIA, Romain Slootmaekers.
On Wed, 2003-10-29 at 05:28, Romain Slootmaekers wrote:
Yo,
I have an elaborate piece of python code that works fine, but with profiling turned on, it barfs a "Bad Call" message.
When google-ing for a solution, the only thing I could find was a
http://mail.python.org/pipermail/python-bugs-list/2003-June/018510.html
There's a follow up stating it's "already fixed", and does not occur in Python 2.2.x and beyond.
So now my questions are:
- how difficult is it to get a zope 2.6.2 (or 2.7) working with a python 2.2.x or 2.3. on a windows platform? (I read up on the changes between 2.6 and 2.7 and it does not seem to change python version.)
In general, you should be able to run Zope 2.6.2 with Python 2.2.3 without issues (but *don't* use Python 2.2 - 2.2.2, nor Zope 2.6 - 2.6.1 in this mode!). I'm afraid I don't know enough Windows majyk to tell you an easy way to upgrade the Python on the box; I would install 2.2.3 separately, and then hack the startup.bat (or whatever) to use that Python.
- I believe there's a concensus that the next major 2.X release should jump immediately 2.3, but is there a timeline ?
We are looking to release Zope 2.7b3 (which will prefer Python 2.3), soon, Here is what Brian wrote yesterday:
I'd like to try to have another bug day next Tuesday (Nov 3) to make up for the one that was cut short last week, in preparation for a beta 2 release of Zope 2.7.
- or is there a workaround/solution to the "Bad Call" problem?
This all to see if I should invest time in getting a 2.6 or 2.7 +python 2.3 up and running or I should do my own time measurements/profiling effort.
There are substantial performance benefits (at least on the platforms I know) in moving from 2.1.3 to 2.2.3. I am told, and believe, that 2.3.2 will provide further such benefits. Tres. -- =============================================================== Tres Seaver tseaver@zope.com Zope Corporation "Zope Dealers" http://www.zope.com
Romain Slootmaekers wrote at 2003-10-29 11:28 +0100:
I have an elaborate piece of python code that works fine, but with profiling turned on, it barfs a "Bad Call" message.
When google-ing for a solution, the only thing I could find was a
http://mail.python.org/pipermail/python-bugs-list/2003-June/018510.html
There's a follow up stating it's "already fixed", and does not occur in Python 2.2.x and beyond.
I think the bug report is from me. I do not believe the followup ("does not occur in Python 2.2.x"). While I analysed the problem with Python 2.1.3 (and therefore reported it as an 2.1.3 bug), I am almost sure (not completely) that my colleague hit the problem with Python 2.2 in the first place (which triggered my analysis). Thus, watch out for the same behaviour in Python 2.2. I think I added a followup with a workaround to the bug report. Should the problem come back with Python 2.2 or Python 2.3 and you do not find the patch in Python's bug tracker, come back. I can send you the patch in this case. -- Dieter
Dieter Maurer wrote:
Romain Slootmaekers wrote at 2003-10-29 11:28 +0100:
I have an elaborate piece of python code that works fine, but with profiling turned on, it barfs a "Bad Call" message.
When google-ing for a solution, the only thing I could find was a
http://mail.python.org/pipermail/python-bugs-list/2003-June/018510.html
There's a follow up stating it's "already fixed", and does not occur in Python 2.2.x and beyond.
I think the bug report is from me.
I do not believe the followup ("does not occur in Python 2.2.x"). While I analysed the problem with Python 2.1.3 (and therefore reported it as an 2.1.3 bug), I am almost sure (not completely) that my colleague hit the problem with Python 2.2 in the first place (which triggered my analysis). Thus, watch out for the same behaviour in Python 2.2.
I think I added a followup with a workaround to the bug report.
No you did not, but the problem was prpbably not that sever: apparantly, from what I understand from your bug report, you get a "Exception Bad call ... ignored" In my particular case, that exception is not "...ignored", but cascades upwards, to the top level.
Should the problem come back with Python 2.2 or Python 2.3 and you do not find the patch in Python's bug tracker, come back. I can send you the patch in this case.
So you have a patch ? Romain Slootmaekers.
Romain Slootmaekers wrote at 2003-10-30 08:47 +0100:
... No you did not, but the problem was prpbably not that sever: apparantly, from what I understand from your bug report, you get a "Exception Bad call ... ignored"
In my particular case, that exception is not "...ignored", but cascades upwards, to the top level.
In our case, the complete time from the occurrence of the exception until the end of profiling was assigned to a completely harmless funtion. This was very confusing...
Should the problem come back with Python 2.2 or Python 2.3 and you do not find the patch in Python's bug tracker, come back. I can send you the patch in this case.
So you have a patch ?
Sure. Attached. -- Dieter
On Wed, 29 Oct 2003 11:28:36 +0100, Romain Slootmaekers <romain@zzict.com> wrote:
- how difficult is it to get a zope 2.6.2 (or 2.7) working with a python 2.2.x or 2.3. on a windows platform? (I read up on the changes between 2.6 and 2.7 and it does not seem to change python version.)
Hi, Here's my experience in setting zope 2.6.2 with python 2.3.2 in both windows 2000 and red hat linux 9. Each step is marked with [x], where x is the platform that this step is applicable, x=W for Windows, x=L for Linux. 1) [WL] extract source :) 2) [W] cd into Zope-2.6.2-src\lib\python\Products\PluginIndexes\TextIndex\Splitter\, fix the following truncated file names: ISO_8859_1_Splitter\src\ISO_885 to ISO_8859_1_Splitter.c UnicodeSplitter\src\UnicodeSpli to UnicodeSplitter.c UnicodeSplitter\tests\__init__ to __init__.py UnicodeSplitter\tests\testUnico to testUnicodeSplitter.py 3) [WL] python 2.3.2 will complain that some zope codes contain 'argument named None', e.g. def mymethod(a, b, None=None). So goto Zope-2.6.2-src\inst\, edit compilezpy.py. Change class NoteErr to: class NoteErr: wrote = 0 def write(self, *args): for arg in args: if arg.find('SyntaxWarning: argument named None'): return self.wrote = 1 apply(stderr.write, args) 4) [W] Start compiling zope in windows. Cd into \Zope-2.6.2-src, then run "c:\progra~1\python23\python.exe wo_pcgi.py". Don't use "c:\program files\...", the space will fail the compilation. Another note: I can't compile zope using w_pcgi.py because it invokes unix command to compile pcgi. Anyway, I don't need pcgi, so wo_pcgi.py is fine for me. 5) [L] Start compiling zope in linux. Cd into Zope-2.6.2-src, then run "python2.3 wo_pcgi.py" or "python2.3 w_pcgi.py" 6) [WL] Make a zope instance. Cd into Zope-2.6.2-src\inst, run make_instance.py and follow on-screen instruction. You need to hack the start script in the instance directory to make it run in windows. Have fun! Comments are most welcome. Regards, Zhi Min
participants (4)
-
Choo Zhi Min -
Dieter Maurer -
Romain Slootmaekers -
Tres Seaver