I'm back from the dead with new tweaks to MiddleKit in CVS HEAD:

* Attribute names, which must be compatible with Python (since they get used as method 
names), are now checked against a regex. (MiddleKit/Core/Attr.py __init__())

* Integer overflow error checking is reinstated under Python 2.3. In other words: 
Fixed the code generation for setSomeInt() to raise OverflowError if the argument 
cannot be reduced to an int (vs. a long). This is important because databases don't 
have arbitrarily long longs like Python does. This behavior already exists in 
MiddleKit under Python <2.3.

* Added MiddleObject.refetch() for refreshing a single object from it's data in the 
database. It's an experimental method; i.e., I didn't think about it real hard.  :-)

        def refetch(self):
                """
                Refetches the object's attributes from the store.
                Only works for non-changed objects from a store.
                @@ not covered by test suite yet
                """
                assert self.isInStore()
                assert not self.isChanged()
                result = self.store().fetchObject(self.__class__, self.serialNum())
                assert result is self, 'expecting result to be self. self=%r, 
result=%r' % (self, result)

* Tweaked an assert in MiddleKit.Run.ObjectStore._deleteObject() to be more 
informative.

* Tweaked MiddleKit/Tests/FixPath to fix the sys.path a little bit more. Required on 
my Python 2.3 on Windows XP box.

* Enhanced MiddleKit/Tests/Test.py to summarize the results of each test at the very 
end, like so:

RESULTS
-------
     succeeded MKBasic.mkmodel
     succeeded MKNone.mkmodel
     succeeded MKString.mkmodel
     succeeded MKDateTime.mkmodel
     succeeded MKDefaultMinMax.mkmodel
     succeeded MKTypeValueChecking.mkmodel
     succeeded MKInheritance.mkmodel
     succeeded MKInheritanceAbstract.mkmodel
     succeeded MKList.mkmodel
     succeeded MKObjRef.mkmodel
     succeeded MKObjRefReuse.mkmodel
*** FAILED *** MKDelete.mkmodel
*** FAILED *** MKDeleteMark.mkmodel
     succeeded MKMultipleStores.mkmodel
*** FAILED *** MKMultipleThreads.mkmodel
     succeeded MKModelInh1.mkmodel
     succeeded MKModelInh2.mkmodel
     succeeded MKModelInh3.mkmodel

Which brings me to my next topic which I'll post separately.


-Chuck
--
http://ChuckEsterbrook.com/




-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
Webware-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-devel

Reply via email to