[Zope-dev] Weird batches produced by dtml-in

2003-02-11 Thread Bjorn Stabell
Hello, I'm trying to implement a Google-like pagination using the dtml-in batching system, and I'm getting some very strange results. Either I'm overlooking something obvious or there is a problem with dtml-in. See attached source code of simplified example that produces the strange results.

Re: [Zope-dev] Weird batches produced by dtml-in

2003-02-11 Thread Andreas Jung
Take a look at PloneBatch.py from the Plone package. PloneBatch.py is a very sophisticated module for batching and forget about dtml-in. -aj --On Dienstag, 11. Februar 2003 17:01 +0800 Bjorn Stabell [EMAIL PROTECTED] wrote: Hello, I'm trying to implement a Google-like pagination using the

Re: Bare except dangerous to ZODB? was Re: [Zope-dev] Accept-Charset hearders causing 500 internal server error.[correct but not lenient]

2003-02-11 Thread Toby Dickenson
On Monday 10 February 2003 8:47 pm, Shane Hathaway wrote: Great, so there's at least 133 things to examine to see if they could catch a ConflictError. And I only wrote about 15 of those. The rest could be very time-consuming to audit. tal:on-error also catches all exceptions. It could

Re: [Zope-dev] Accept-Charset hearders causing 500 internal servererror.[correct but not lenient]

2003-02-11 Thread Juan David Ibáñez Palomar
The bug was fixed three weeks ago (branch-1-0), it is time for a release I guess. Well, only the strip(), no try/except clause yet. By the way, Localizer bugs/patches should be sent to the Localizer mailing list or to the SourceForge tracker of the LLEU project. Romain Slootmaekers wrote:

[Zope-dev] Re: Bare except dangerous to ZODB? was Re: Accept-Charset hearderscausing 500 internal server error.[correct but not lenient]

2003-02-11 Thread R. David Murray
Paul Winkler [EMAIL PROTECTED] wrote: $ cd /usr/src/Zope-2.6.1-src/lib/python/Products/ $ find . -name *py -exec grep -H except: {} \; | wc -l 170 well, this is all stuff that comes with Zope, hopefully they have been vetted... but then there's all these 'fraid not. These days they tend to

Re: Bare except dangerous to ZODB? was Re: [Zope-dev] Accept-Charsethearders causing 500 internal server error.[correct but not lenient]

2003-02-11 Thread Shane Hathaway
Toby Dickenson wrote: On Monday 10 February 2003 8:47 pm, Shane Hathaway wrote: Great, so there's at least 133 things to examine to see if they could catch a ConflictError. And I only wrote about 15 of those. The rest could be very time-consuming to audit. tal:on-error also catches all

[Zope-dev] Re: Bare except dangerous to ZODB?

2003-02-11 Thread Jeremy Hylton
On Tue, 2003-02-11 at 04:13, [EMAIL PROTECTED] wrote: Chris McDonough wrote: Could this be done by initializing a dictionary at startup keyed on thread-id that a ConflictError exception's __init__ could stick a marker into, then checking that dictionary at commit time and disallowing the

Re: [Zope-dev] Re: Bare except dangerous to ZODB?

2003-02-11 Thread Shane Hathaway
Jeremy Hylton wrote: On Tue, 2003-02-11 at 04:13, [EMAIL PROTECTED] wrote: Chris McDonough wrote: Could this be done by initializing a dictionary at startup keyed on thread-id that a ConflictError exception's __init__ could stick a marker into, then checking that dictionary at commit time and

Re: [Zope-dev] Re: Bare except dangerous to ZODB?

2003-02-11 Thread Jeremy Hylton
On Tue, 2003-02-11 at 12:10, Shane Hathaway wrote: I added a test to testZODB.py on a new branch (shane-conflict-handling-branch) that exercises the conflict handling bug. The test currently fails. It might be simpler to go with Toby's implementation for now: add a veto object to the

Re: [Zope-dev] Re: Bare except dangerous to ZODB?

2003-02-11 Thread Shane Hathaway
Jeremy Hylton wrote: On Tue, 2003-02-11 at 12:10, Shane Hathaway wrote: I added a test to testZODB.py on a new branch (shane-conflict-handling-branch) that exercises the conflict handling bug. The test currently fails. It might be simpler to go with Toby's implementation for now: add a

Re: [Zope-dev] Re: Bare except dangerous to ZODB?

2003-02-11 Thread Romain Slootmaekers
Shane Hathaway wrote: Jeremy Hylton wrote: On Tue, 2003-02-11 at 12:10, Shane Hathaway wrote: I added a test to testZODB.py on a new branch (shane-conflict-handling-branch) that exercises the conflict handling bug. The test currently fails. It might be simpler to go with Toby's

Re: [Zope-dev] Re: Bare except dangerous to ZODB?

2003-02-11 Thread Shane Hathaway
Romain Slootmaekers wrote: Shane Hathaway wrote: If we have veto(), it should probably expect a string argument that explains the reason for the veto. Then if something tries to commit, we can raise VetoedError(explanation). Otherwise, it seems like failed transactions would be opaque and

Re: [Zope-dev] Python core dump zope 2.6.1+CMF1.3

2003-02-11 Thread Barry Pederson
R. David Murray wrote: I haven't touched Z2 in a while. But I need a Plone site (I think). So I downloaded 2.6.1, CMF1.3, and Plone 1.0. Installed all on FreeBSD 4.7. Created a plone portal. Going to the plone site URL causes a python core dump. Created a plain CMF site. Going to the site

RE: [Zope-dev] Weird batches produced by dtml-in

2003-02-11 Thread Bjorn Stabell
From: Andreas Jung [mailto:[EMAIL PROTECTED]] Take a look at PloneBatch.py from the Plone package. PloneBatch.py is a very sophisticated module for batching and forget about dtml-in. That doesn't really solve my problem. I don't use ZPT and I don't use Plone, and the PloneBatch module