Re: [Zope] DTML batch processing variables
At 13:55 25/06/99 , Oleg Broytmann wrote:
Hi!
On Fri, 25 Jun 1999, Martijn Pieters wrote:
next-sequence-size is alway "1", and previous-sequence-size is "-90","-70","-50","-30","-10" everything else works as described.
What version of Zope and Python are you using? There is a known bug with all versions of Zope up to Zope 2.0.0a2 (fixed in Zope 2.0.0a3) that becomes effective when using python 1.5.2.
I wonder how is it possible to develop a program that does different calculations (very simle math, I think) with 1.5.1 and 1.5.2?
Any cahnce we'd see a patch? I'd like to incorporate it into 1.10.3...
It has nothing to do with simple math, but everything with the interpretation of None compaired to 0's. Something that was implemented wrongy in python 1.5.1, and fixed in 1.5.2. This change brought out a bug in the code, which hitherto had managed to miraculously work anyway. 1.10.3 is meant to run with python 1.5.1, not 1.5.2, and has only been tested with 1.5.1. There are other problems concerning running Zope 1.10.3 with version 1.5.1 than this one, like Netscape Publishing, FTP uploads and WebDAV being broken. If you insist, here is a context diff from the CVS you could apply, it probably has slightly differing line numbers, but you should be able to apply it to DT_In.py anyway, as patch will correct for this. It basically replaces all occurrences of None within calls to the method 'opt' with 0: *************** *** 531,537 **** try: if previous: if first > 0: ! pstart,pend,psize=opt(None,first+overlap, sz,orphan,sequence) kw['previous-sequence']=1 kw['previous-sequence-start-index']=pstart-1 --- 531,537 ---- try: if previous: if first > 0: ! pstart,pend,psize=opt(0,first+overlap, sz,orphan,sequence) kw['previous-sequence']=1 kw['previous-sequence-start-index']=pstart-1 *************** *** 547,553 **** # there are more items, without actually # computing a length: sequence[end] ! pstart,pend,psize=opt(end+1-overlap,None, sz,orphan,sequence) kw['next-sequence']=1 kw['next-sequence-start-index']=pstart-1 --- 547,553 ---- # there are more items, without actually # computing a length: sequence[end] ! pstart,pend,psize=opt(end+1-overlap,0, sz,orphan,sequence) kw['next-sequence']=1 kw['next-sequence-start-index']=pstart-1 *************** *** 563,569 **** validate=md.validate for index in range(first,end): if index==first and index > 0: ! pstart,pend,psize=opt(None,index+overlap, sz,orphan,sequence) kw['previous-sequence']=1 kw['previous-sequence-start-index']=pstart-1 --- 563,569 ---- validate=md.validate for index in range(first,end): if index==first and index > 0: ! pstart,pend,psize=opt(0,index+overlap, sz,orphan,sequence) kw['previous-sequence']=1 kw['previous-sequence-start-index']=pstart-1 *************** *** 577,583 **** # test whether there are more items, # without actually computing a length: sequence[end] ! pstart,pend,psize=opt(end+1-overlap,None, sz,orphan,sequence) kw['previous-sequence']=0 kw['next-sequence']=1 --- 577,583 ---- # test whether there are more items, # without actually computing a length: sequence[end] ! pstart,pend,psize=opt(end+1-overlap,0, sz,orphan,sequence) kw['previous-sequence']=0 kw['next-sequence']=1 -- Martijn Pieters, Web Developer | Antraciet http://www.antraciet.nl | Tel: +31-35-7502100 Fax: +31-35-7502111 | mailto:mj@antraciet.nl http://www.antraciet.nl/~mj | PGP: http://wwwkeys.nl.pgp.net:11371/pks/lookup?op=get&search=0xA8A32149 ------------------------------------------
Hi! On Fri, 25 Jun 1999, Martijn Pieters wrote:
It has nothing to do with simple math, but everything with the interpretation of None compaired to 0's. Something that was implemented wrongy in python 1.5.1, and fixed in 1.5.2. This change brought out a bug in the code, which hitherto had managed to miraculously work anyway.
Thanks for the explanation.
1.10.3 is meant to run with python 1.5.1, not 1.5.2, and has only been
Bad news, really :( Or, it is rather my fault - I've upgraded my systems to 1.5.2 too fast.
tested with 1.5.1. There are other problems concerning running Zope 1.10.3 with version 1.5.1 than this one, like Netscape Publishing, FTP uploads and WebDAV being broken.
No, I need only "standard" things - Web interface for editing objects, DTML and SQL Methods. I'll write a demo application to convince my boss to try Zope. I am pretty sure Zope2 will be released before our company will make the change. [patch skipped] Thanks for the patch. Will try it...
-- Martijn Pieters, Web Developer | Antraciet http://www.antraciet.nl | Tel: +31-35-7502100 Fax: +31-35-7502111 | mailto:mj@antraciet.nl http://www.antraciet.nl/~mj | PGP: http://wwwkeys.nl.pgp.net:11371/pks/lookup?op=get&search=0xA8A32149 ------------------------------------------
Oleg. ---- Oleg Broytmann Netskate/Inter.Net.Ru phd@emerald.netskate.ru Programmers don't die, they just GOSUB without RETURN.
Oleg Broytmann wrote:
Bad news, really :( Or, it is rather my fault - I've upgraded my systems to 1.5.2 too fast.
It's easy to have multiple Python versions on a system, we do it all the time. Just install 1.5.1 for your demo or early investigations. Jim -- Jim Fulton mailto:jim@digicool.com Python Powered! Technical Director (888) 344-4332 http://www.python.org Digital Creations http://www.digicool.com http://www.zope.org Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email address may not be added to any commercial mail list with out my permission. Violation of my privacy with advertising or SPAM will result in a suit for a MINIMUM of $500 damages/incident, $1500 for repeats.
participants (3)
-
Jim Fulton -
Martijn Pieters -
Oleg Broytmann