With the release of the 1.2.6 SDK, it is now possible to specify a key
directly to a newly constructed model instance.  To make this possible
we added 'key' as a positional parameter to the Model constructor.
Doing so was a mistake as it caused certain applications to break in a
relatively subtle way.  To remedy the situation we will release an
updated version of the SDK to change the signature of the Model
constructor back to one that is compatible with older source code.  We
will do this by change 'key' to a key-word only parameter.

There is a chance that applications that have started to make use of
the 'key' parameter as a positional parameter will break when we make
this change, which we regret, but it is a worse outcome, we believe,
if older applications that might have been running well for ages were
to suddenly stop working.  If you are using the 'key' parameter with
the 1.2.6 SDK, it is easy to make sure any code you write is
compatible with our upcoming patch.  The solution is to always specify
the 'key' parameter using a keyword, like so:

  # Old code:
  instance = MyModel(my_parent, None, db.Key.from_path('MyModel', 'my-
name'))

  # New code:
  instance = MyModel(my_parent, key=db.Key.from_path('MyModel', 'my-
name'))

As you can see, the key parameter is now assigned using 'key=<the
key>'.

Again, we apologize for the confusion and will remedy the situation as
soon as we can.

  - Rafe Kaplan
    App Engine Team

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to