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
David K. Hess
2007-09-06
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.

Here's my proposed fix:

             new_oid = self.new_oid()
             assert ROOT_OID == new_oid

Dave

------
David K. Hess
Cell 214.684.5448 | Fax 214.764.7183
dhess@fishsoftware.com


On Sep 6, 2007, at 1:55 PM, David K. Hess wrote:

>
> I'm currently trying to track down a Windows problem with Durus
> 3..7 and wanted to give a heads up and check if anybody had an idea
> of where to look.
>
> I'm using Connection(FileStorage()). I start off without an
> existing database file on disk (i.e. it's created as part of the
> FileStorage object allocation). The basic problem is that when I'm
> running the Python interpreter against my source code, Durus
> behaves properly. However, when I build an executable with py2exe
> and run it, the first object added to the root dict ends up getting
> oid 0 instead of 1 which of course leads to havoc. It's as if the
> oid allocator is broken when going to py2exe.
>
> Anybody else seen this? Any ideas of where to look?
>
> Dave
>
> ------
> David K. Hess
> Cell 214.684.5448 | Fax 214.764.7183
> dhess@fishsoftware.com
>
>
>
>
> This email message is for the sole use of the intended recipient(s)
> and may contain confidential and privileged information.
> Any unauthorized review, use, disclosure or distribution is
> prohibited. If you are not the intended recipient, please contact
> the sender by reply email and delete and destroy all copies of the
> original message.
> _______________________________________________
> Durus-users mailing list
> Durus-users@mems-exchange.org
> http://mail.mems-exchange.org/mailman/listinfo/durus-users



This email message is for the sole use of the intended recipient(s) and may
contain confidential and privileged information.
Any unauthorized review, use, disclosure or distribution is prohibited. If you
are not the intended recipient, please contact the sender by reply email and
delete and destroy all copies of the original message.
reply