Source

dynamodb-mapper / CHANGES.rst

DynamoDBMapper 1.8.0.dev

This section documents all user visible changes included between DynamoDBMapper versions 1.8.0 and versions 1.7.1

Additions

  • add DynamoDBModel.validate() based on Onctuous
  • data are validated prior to any write operations
  • cache tables objects in ConnectionBorg to avoid superfluous``DescribeTable`` requests

Changes

  • __schema__ can now use Onctuous for deep definitions
  • DynamoDBModel.__init__ set members with no value nor default value to None instead of "neutral" value
  • revert the fix for bug #17 (regressions).
  • move dev deps to requirements.dev.txt (pip install -r requirements.dev.txt)

Upgrade

  • all functions relying on type coercion in __init__ will now need to it themselves
  • make sure all fields are set before saving or marked as optional as "neutral" values are no longer generated

DynamoDBMapper 1.7.1

This section documents all user visible changes included between DynamoDBMapper versions 1.7.1 and versions 1.7.0

Changes

  • OverwriteError inherits from ConflictError so that raise_on_conflict always raises ConflictError while staying retro-compatible
  • fix bug #17: enforce type coercion in DynamoDBModel.__init__. (thanks luckyasser)
  • (internal) no more "MAGIC_ITEM" initialisation for auto_inc_int. It is not needed.

DynamoDBMapper 1.7.0

This section documents all user visible changes included between DynamoDBMapper versions 1.6.2 and versions 1.7.0

Additions

  • migration engine - single object
  • method ConnectionBorg.set_region to specify Amazon's region (thanks kimscheibel)
  • method DynamoDBModel.from_db_dict which additionaly saves _raw_data
  • raise_on_conflict on DynamoDBModel.save, defaults to False
  • raise_on_conflict on DynamoDBModel.delete, defaults to False

Changes

  • rename ExpectedValueError to ConflictError to reflect its true meaning
  • rename to_db_dict to _to_db_dict. Should not be used anymore
  • rename from_dict to _from_db_dict. Should not be used anymore
  • transactions may create new Items (side effect of raise_on_conflict refactor)
  • fix bug #13 in dates de-serialization. (thanks Merwok)
  • open only one shared boto connection per process instead of on/thread. Boto is thread-safe
  • re-implement get_batch to rely on boto new generator. Fixes 100 Items limitation and paging.
  • boto min version is 2.6.0

Removal

  • expected_values feature was incompatible with the migration engine
  • allow_overwrite feature was not needed with raise_on_conflict
  • to_db_dict and from_dict are no longer public
  • ThroughputError. Throughput checks are delegated to Amazon's API (thanks kimscheibel)
  • new_batch_list_nominal is not needed anymore with boto>=2.6.0

Upgrade

conflict detection

Wherever save was called with expected_values=... and/or allow_overwrite=False, replace it with a call to save with raise_on_conflict=True. It should handle most if not all use cases. In some place, you'll even be able to get rid of to_db_dict. Rename also all instances of ExpectedValueError to ConflictError

raise_on_conflict=True --> allow_overwrite=False for new objects raise_on_conflict=True --> expected_values=... for existing objects

data (de-)serialization

from_dict and to_db_dict have been moved to private _from_db_dict and _to_db_dict. Any direct use of these should be avoided _from_db_dict will mark data as coming from the DB

  • from_dict(data_dict) for initialization should be replaced by __init__(**data_dict)
  • to_db_dict for data export should be replaced by to_json_dict
  • overloading for custom DB Item (de-)serialization can still be done provided that the function is renamed

DynamoDBMapper 1.6.3

This section documents all user visible changes included between DynamoDBMapper versions 1.6.2 and versions 1.6.3

Changes

  • fix bug #11 in delete. Keys were not serialized

DynamoDBMapper 1.6.2

This section documents all user visible changes included between DynamoDBMapper versions 1.6.1 and versions 1.6.2

Additions

  • transactions may generate a list of sub-transactions to run after the main one
  • log all successful queries
  • add parameter limit on query method defaulting to None
  • extensive documentation

Upgrade

sub-transactions
If __init__() is called in any of your transactions, make sure to call super(MyTransactionClass, self).__init__(**kwargs)

Known bugs - limitations

  • #7 Can't save models where a datetime field is nested in a dict/list
  • Can't use datetime objects in scan and query filters
  • DynamoDBModel.from_dict() does not check types as opposed to __init__()

DynamoDBMapper 1.6.1

This section documents all user visible changes included between DynamoDBMapper version 1.6.0 and version 1.6.1

Changes

  • fixed bug in scan

DynamoDBMapper 1.6.0

This section documents all user visible changes included between DynamoDBMapper versions 1.5.0 and versions 1.6.0

Additions

  • support for default values in a __defaults__ dict
  • specify instances members via global __init__ **kwargs
  • autogenerated API documentation

Changes

  • transactions engine rewrite to support multiple targets
  • transactions always persisted after first write attempt
  • transactions engine now embeds its own minimal schema
  • transactions can be set transient on a 'per instance basis' instead of class
  • autoinc hash key now relies on atomic add to prevent risks of races
  • autoinc magic element moved to -1 instead of 0 to prevent accidental overwrite
  • autoinc magic element now hidden from scan results
  • factorized default value code
  • enforce batch size 100 limit
  • full inline documentation
  • fixed issue: All transactions fail if they have a bool field set to False
  • 99% test coverage

Removal

(None)

Upgrade

autoinc
For all tables relying on autoinc feature, manually move element at 'hash_key' = 0 to 'hash_key' = -1
transactions
Should be retro-compatible but you are strongly advised to adopt the new API - specify targets and setters via Transactions._get_transactors - avoid any use of Transactions._get_target and Transactions._alter_target - save is now called automatically as long as at least 1 write was attempted - __schema__ might not be required anymore due to Transaction having a new one - requester_id hash key must be set by the user See these method's documentation for more informations

Known bugs

(None)

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.