# MiddleKit 0.2 Release Notes

Version 0.2
Webware for Python 0.6

- Version 0.2 was released on 12/2/2001.
- If you use 'Extras' column in your object model file (Classes.csv), then pay attention: The 'Extras' column is now processed with MiscUtil's PyDictForArgs() rather than DictForArgs(). [Chuck]

  The downside is that values like:

  > x=1 y=2

  Must be edited or your model cannot be read:

  > x=1; y=2

  The upside is that you can use full Python expressions, so ints come in as ints (instead of strings) and you can create lists and so on:

  > Samples=[1, 2, 3]

  Which was the motivation for this change.

- MiddleKit developers are now encouraged to always put their Python classes in a Python package. The Quick Start takes you through this process. [Chuck]
- MiddleKit now supports deleting objects including some powerful options regarding the relationships between objects and deleting. See the User's Guide for details. [Geoff T]
- Type and value checking: Accessor methods such as setFoo() now do type checking and value checking on their arguments. [Chuck] For example, you can't pass in a string for a boolean:

      obj.setSomeBool('s')  # raises TypeError

  Some numeric compatibility is allowed:

  - ints can take longs that don't overflow the int range
  - longs can take ints
  - floats can take ints and longs

  The date, time and datetime accessors no longer accept strings (such as '2001-01-15') if you have an mx.DateTime.

  For value checking:

  - bools only take 0 or 1
  - enums only take valid strings found in the enum def

  Also, MiddleKit assumes that if you have DateTime, it is in the mx package, as in:

      from mx import DateTime

- MK previously spewed all it's SQL statements to stdout. The new default behavior is not to log anything, but you can change this via the SQLLog option described in the configuration section of the User's Guide. [Chuck]
- MiddleObject.setValueForKey() now raises LookupError instead of NameError if there is a problem. This is consistent with valueForKey() and fits the doc strings of the exceptions better. [Chuck]
- Miscellaneous fixes and refinements. [Chuck, Geoff T, Dave R]