What’s New in PyAMF 0.6

PyAMF 0.6 represents the next step towards the holy grail that is 1.0. The focus of this release has mainly been about speed and providing better support for integrated frameworks (e.g. Django, SQLAlchemy, AppEngine). The C extensions have been supercharged and now 90%+ of the encoding is done in C. This has given some massive gains in both encoding and decoding.

Highlighted Features

  • The default AMF version has been switched from AMF0 to AMF3.
  • Introduced a new adapter for Elixir, a thin wrapper around SQLAlchemy.
  • Provide support for property synonyms.
  • Support for lxml.

Backward Incompatible API Changes

  • Switched the client from httplib to urllib2 to provide support for gzipped responses and proper HTTP proxying. See #751.
  • pyamf.util.IndexedMap has been removed. See #732.
  • __new__ is used in favour of __init__. See #700.
  • pyamf.ClientTypes served no purpose and was not compliant with the AMF0 specification. It has been removed. See #651 for more information.
  • exceptions attribute has been removed from Context objects and pyamf.util.IndexedCollection. Any method that used to raise pyamf.ReferenceError will now return None for speed.
  • amf3.Encoder.write* methods no longer accept use_references.
  • amf*.Encoder.type_map has been been removed. Use pyamf.add_type instead. Standard types (e.g. str, unicode) are now hardcoded.
  • django.contrib.auth.models.User is now strongly typed, with the alias django.contrib.auth.models.User with the password and all messages excluded from the instance. In addition, the username is now set to readonly which means that a separate (read:deliberate) service method will be required to update this directly (or you can override these defaults)
  • AMF0 Remoting errors will now produce the details property as a list, rather than a string.

Integration

Django

  • Empty relations are now encoded as None, not pyamf.Undefined.
  • All model.Model fields are now encoded dynamically. See #677.
  • Django 1.2 supported, including the new CSRF middleware.

Google AppEngine

  • All db.Model properties are now encoded dynamically. See #677.

SQLAlchemy

  • All mapped properties are now encoded dynamically. See #677.
  • Tested with SQLAlchemy 0.6. See #747.