durusmail: durus-users: Durus 3.7 on Windows oid allocation issue
Durus 3.7 on Windows oid allocation issue
2007-09-06
2007-09-06
2007-09-06
2007-09-06
2007-09-06
2007-09-06
Durus 3.7 on Windows oid allocation issue
Patrick K. O'Brien
2007-09-06
On Sep 6, 2007, at 2:55 PM, David K. Hess wrote:

> I think I have found it and it's not just a Windows issue:
>
> connection.py line 61
>
>             assert ROOT_OID == self.new_oid()
>
> This statement has a side effect of incrementing the oid from -1 to
> 0 when run in the interpreter. When run in py2exe and compiling
> into an exe with optimization, assert statements become NOOPs and
> this becomes a bug.

No offense to any of the fine Durus folks, but that is some seriously
evil code there.  We just upgraded Schevo to Durus 3.7 and so far
haven't had a problem with this, even though I've created databases
using "python -O" to do so.  I guess we got lucky in the atypical way
that we use Durus.  I just hope there aren't any more asserts with
side effects in the Durus code...

P.S.  Nice catch, David.  Glad you found that.

--
Patrick K. O'Brien
Orbtech    http://www.orbtech.com
Schevo     http://www.schevo.org


reply