(If you're using Java or if you are not yet using NDB with Python you can ignore this post.)
Now that the 1.6.4 prerelease SDK is public (http://code.google.com/p/googleappengine/downloads/detail?name=google_appengine_1.6.4_prerelease.zip) I'd like to remind NDB users that the next version of NDB will contain a few incompatibilities. These are not in API signatures but in the behavior of certain operations. It is particularly important to test your app ahead of time with the prerelease SDK because, as usual, the production runtime will be switched to the SDK 1.6.4 behavior at some point later this week (possibly starting tomorrow!), well *before* the final SDK 1.6.4 is announced. (1) NESTED TRANSACTIONS In SDK 1.6.3, calling get_or_insert() or transaction() (or their async counterparts) starts a *new* *independent* transaction. This is usually not what you want -- two transactions are likely to conflict with each other if they use the same entity group. Therefore in SDK 1.6.4, get_or_insert() will join the current transaction if there is one, and transaction() will raise an exception. If there is no current transaction their behavior is unchanged from before. Note that code using the @ndb.transactional decorator is not affected, since this decorator already joins the current transaction if there is one. (2) STRICTER PROPERTY ENFORCEMENTS In SDK 1.6.3, some invalid property values were not rejected; in SDK 1.6.4 the following will be rejected when written: - StringProperty(): values longer than 500 characters - BlobProperty(indexed=True): values longer than 500 bytes - StringProperty() and TextProperty(): 8-bit string values that aren't proper UTF-8 (3) INTERACTION BETWEEN CONTEXT CACHE AND QUERY RESULTS In SDK 1.6.3, under some circumstances a query result could overwrite a value in the context cache. This was deemed undesirable (read http://code.google.com/p/appengine-ndb-experiment/issues/detail?id=156) and in SDK 1.6.4, the context cache will have priority. (Queries do not interact with memcache.) (4) STRICTER TRANSACTION OPTIONS In SDK 1.6.3, it was possible to pass transaction-related options to non-transaction APIs (e.g. ent.put(retries=3)); these were silently ignored. In SDK 1.6.4 these will be rejected. Also, if you want to construct an Options object including transaction-related options, you must now use ndb.TransactionOptions(option=value, ...) instead of ndb.ContextOption(option=value, ...). If you are including your own copy of NDB into your app you are not directly affected, but the above changes will affect you when you upgrade to NDB 0.9.9 (items 1-3) or NDB 1.0.0 (item 4). Note that NDB 1.0.0 is not yet released, but an approximation is available in the sandbox branch of the repo. -- --Guido van Rossum (python.org/~guido) -- 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.
