Release Notes¶
v6.0.1¶
Features:
For failed transaction, return the underlying item in
cancellation_reasons[...].raw_item
(#1226). This only applies when passingreturn_values=ALL_OLD
.
Fixes:
Fixing (#1242) regression to the
extra_headers
feature. These headers are intended for proxies that strip them, so they should be excluded from the AWS signature.
v6.0.0¶
This is a major release and contains breaking changes. Please read the notes below carefully.
Breaking changes:
BinaryAttribute
andBinarySetAttribute
have undergone breaking changes:The attributes’ internal encoding has changed. To prevent this change going unnoticed, a new required
legacy_encoding
parameter was added: see Upgrading Binary(Set)Attribute for details. If your codebase usesBinaryAttribute
orBinarySetAttribute
, go over the attribute declarations and mark them accordingly.When using binary attributes, the return value of
serialize()
will no longer be JSON-serializable since it will containbytes
objects. Useto_dynamodb_dict()
andto_simple_dict()
for JSON-serializable mappings. for a safe JSON-serializable representation.
Python 3.6 is no longer supported.
PynamoDB no longer has a default AWS region (used to be us-east-1) (#1003). If needed, update your models’ Meta or set the AWS_DEFAULT_REGION environment variable.
Model
’s JSON serialization helpers were changed:to_json
was renamed toto_simple_dict()
(#1126). Additionally,to_dynamodb_dict()
andfrom_dynamodb_dict()
were added for round-trip JSON serialization.pynamodb.util.attribute_value_to_json
was removed (#1126)
Attribute
’sdefault
parameter must be either an immutable value (of one of the built-in immutable types) or a callable. This prevents a common class of errors caused by unintentionally mutating the default value. A simple workaround is to pass an initializer (e.g. changedefault={}
todefault=dict
) or wrap in a lambda (e.g. changedefault={'foo': 'bar'}
todefault=lambda: {'foo': 'bar'}
).OperationSettings
has been removed.
Major changes:
We are now compatible with opentelemetry botocore instrumentation.
We’ve reduced our usage of botocore private APIs (#1079). On multiple occasions, new versions of botocore broke PynamoDB, and this change lessens the likelihood of that happening in the future by reducing (albeit not eliminating) our reliance on private botocore APIs.
Minor changes:
save()
,update()
,delete_item()
, anddelete()
now accept aadd_version_condition
parameter. See Conditioning on the version for more details.batch_get()
, has guard rails defending against items without a hash_key and range_key.set()
, can remove attribute by assigning an empty value in the update expression.
v5.5.1¶
Fix compatibility with botocore 1.33.2 (#1205)
v5.5.0¶
save()
,update()
,delete_item()
, anddelete()
now accept aadd_version_condition
parameter. See Conditioning on the version for more details.
v5.4.1¶
Use model’s AWS credentials in threads (#1164)
A model can specify custom AWS credentials in the
Meta
class (in lieu of “global” AWS credentials from the environment). Previously those model-specific credentials were not used from within new threads.
Contributors to this release:
@atsuoishimoto
v5.4.0¶
Expose transaction cancellation reasons in
cancellation_reasons()
andcancellation_reasons()
(#1144).
v5.3.2¶
Prevent
typing_tests
from being installed into site-packages (#1118)
Contributors to this release:
v5.3.1¶
Fixed issue introduced in 5.3.0: using
TableConnection
directly (not through a model) raised the following exception:pynamodb.exceptions.TableError: Meta-table for '(table-name)' not initialized
Fix typing on
TransactGet
(backport of #1057)
v5.3.0¶
No longer call
DescribeTable
API before first operationBefore this change, we would call
DescribeTable
before the first operation on a given table in order to discover its schema. This slowed down bootstrap (particularly important for lambdas), complicated testing and could potentially cause inconsistent behavior since queries were serialized using the table’s (key) schema but deserialized using the model’s schema.With this change, both queries and models now use the model’s schema.
v5.2.3¶
Update for botocore 1.28 private API change (#1087) which caused the following exception:
TypeError: Cannot mix str and non-str arguments
v5.2.2¶
Update for botocore 1.28 private API change (#1083) which caused the following exception:
TypeError: _convert_to_request_dict() missing 1 required positional argument: 'endpoint_url'
v5.2.1¶
Fix issue from 5.2.0 with attempting to set GSI provisioned throughput on PAY_PER_REQUEST billing mode (#1018)
v5.2.0¶
v5.1.0¶
- date
2021-06-29
Introduce
DynamicMapAttribute
to enable partially defining attributes on aMapAttribute
(#868)Quality of life improvements: Type annotations, better comment, more resilient test (#934, #936, #948)
Fix type annotation of
is_in
conditional expression (#947)Null errors should include full attribute path (#915)
Fix for serializing and deserializing dates prior to year 1000 (#949)
v5.0.3¶
- date
2021-02-14
This version has an unintentional breaking change:
Propagate
Model.serialize
’snull_check
parameter to nested MapAttributes (#908)Previously null errors (persisting
None
into an attribute defined asnull=False
) were ignored for attributes in map attributes that were nested in maps or lists. After upgrade, these will resulted in anAttributeNullError
being raised.
v5.0.2¶
- date
2021-02-11
Do not serialize all attributes for updates and deletes (#905)
v5.0.1¶
- date
2021-02-10
Fix type errors when deriving from a MapAttribute and another type (#904)
v5.0.0¶
- date
2021-01-26
This is major release and contains breaking changes. Please read the notes below carefully.
Breaking changes:
Python 2 is no longer supported. Python 3.6 or greater is now required.
UnicodeAttribute
andBinaryAttribute
now support empty values (#830)In previous versions, assigning an empty value to would be akin to assigning
None
: if the attribute was defined withnull=True
then it would be omitted, otherwise an error would be raised.As of May 2020, DynamoDB supports empty values for String and Binary attributes. This release of PynamoDB starts treating empty values like any other values. If existing code unintentionally assigns empty values to StringAttribute or BinaryAttribute, this may be a breaking change: for example, the code may rely on the fact that in previous versions empty strings would be “read back” as
None
values when reloaded from the database.UTCDateTimeAttribute
now strictly requires the date string format'%Y-%m-%dT%H:%M:%S.%f%z'
to ensure proper ordering. PynamoDB has always written values with this format but previously would accept reading other formats. Items written using other formats must be rewritten before upgrading.Table backup functionality (
Model.dump[s]
andModel.load[s]
) has been removed.Model.query
no longer converts unsupported range key conditions into filter conditions.Internal attribute type constants are replaced with their “short” DynamoDB version (#827)
Remove
ListAttribute.remove_indexes
(added in v4.3.2) and document usage of remove for list elements (#838)Remove
ModelContextManager
class (#861)
Features:
Polymorphism
This release introduces Polymorphism support via
DiscriminatorAttribute
. Discriminator values are written to DynamoDB and used during deserialization to instantiate the desired class.Model Serialization
The
Model
class now includes public methods for serializing and deserializing its attributes.Model.serialize
andModel.deserialize
convert the model to/from a dictionary of DynamoDB attribute values.
Other changes in this release:
Typed list attributes can now support any Attribute subclass (#833)
Most API operation methods now accept a
settings
argument to customize settings of individual operations. This currently allow adding or overriding HTTP headers. (#887)Add the attribute name to error messages when deserialization fails (#815)
Add the table name to error messages for transactional operations (#835)
Contributors to this release:
v4.4.1¶
Fix compatibility with botocore 1.33.2 (#1235)
v4.4.0¶
Update for botocore 1.28 private API change (#1130) which caused the following exception:
TypeError: _convert_to_request_dict() missing 1 required positional argument: 'endpoint_url'
v4.3.3¶
v4.3.2¶
Fix discrepancy between runtime and type-checker’s perspective of
Index
and derived types (#769)Add
ListAttribute.remove_indexes
action for removing specific indexes from aListAttribute
(#754)Type stub fixes:
Prevent integration tests from being packaged (#758)
Contributors to this release:
v4.3.1¶
Fix Index.query and Index.scan typing regressions introduced in 4.2.0, which were causing false errors in type checkers
v4.3.0¶
Implement exponential backoff for batch writes (#728)
Avoid passing ‘PROVISIONED’ BillingMode for compatibility with some AWS AZs (#721)
On Python >= 3.3, use importlib instead of deprecated imp (#723)
Update in-memory object correctly on
REMOVE
update expressions (#741)
Contributors to this release:
v4.2.0¶
- date
2019-10-17
This is a backwards compatible, minor release.
Add
attributes_to_get
parameter toModel.scan
(#431)Disable botocore parameter validation for performance (#711)
Contributors to this release:
v4.1.0¶
- date
2019-10-17
This is a backwards compatible, minor release.
In the Model’s Meta, you may now provide an AWS session token, which is mostly useful for assumed roles (#700):
sts_client = boto3.client("sts") role_object = sts_client.assume_role(RoleArn=role_arn, RoleSessionName="role_name", DurationSeconds=BOTO3_CLIENT_DURATION) role_credentials = role_object["Credentials"] class MyModel(Model): class Meta: table_name = "table_name" aws_access_key_id = role_credentials["AccessKeyId"] aws_secret_access_key = role_credentials["SecretAccessKey"] aws_session_token = role_credentials["SessionToken"] hash = UnicodeAttribute(hash_key=True) range = UnicodeAttribute(range_key=True)
Fix warning about inspect.getargspec (#701)
Fix provisioning GSIs when using pay-per-request billing (#690)
Suppress Python 3 exception chaining when “re-raising” botocore errors as PynamoDB model exceptions (#705)
Contributors to this release:
v4.0.0¶
- date
2019-04-10
This is major release and contains breaking changes. Please read the notes below carefully.
Requests Removal
Given that botocore
has moved to using urllib3
directly for making HTTP requests, we’ll be doing the same (via botocore
). This means the following:
The
session_cls
option is no longer supported.The
request_timeout_seconds
parameter is no longer supported.connect_timeout_seconds
andread_timeout_seconds
are available instead.Note that the timeouts for connection and read are now
15
and30
seconds respectively. This represents a change from the previous60
second combinedrequests
timeout.
Wrapped exceptions (i.e
exc.cause
) that were fromrequests.exceptions
will now be comparable ones frombotocore.exceptions
instead.
Key attribute types must match table
The previous release would call DescribeTable to discover table metadata and would use the key types as defined in the DynamoDB table. This could obscure type mismatches e.g. where a table’s hash key is a number (N) in DynamoDB, but defined in PynamoDB as a UnicodeAttribute.
With this release, we’re always using the PynamoDB model’s definition of all attributes including the key attributes.
Deprecation of old APIs
Support for Legacy Conditional Parameters has been
removed. See a complete list of affected Model
methods below:
Method |
Changes |
---|---|
|
removed in favor of |
|
removed in favor of |
|
|
|
|
|
|
|
|
|
|
|
|
When upgrading, pay special attention to use of **filters
and **expected_values
, as you’ll need to check for arbitrary names that correspond to
attribute names. Also keep an eye out for kwargs like user_id__eq=5
or email__null=True
, which are no longer supported. A type check can help you catch cases like these.
New features in this release:
Support for transactions (
TransactGet
andTransactWrite
) (#618)Support for versioned optimistic locking (#664)
Other changes in this release:
Python 2.6 is no longer supported. 4.x.x will be the last major release to support Python 2.7 given the upcoming EOL.
Added the
max_pool_connection
andextra_headers
settings to replace common use cases forsession_cls
Added support for moto through implementing the botocore “before-send” hook.
Performance improvements to
UTCDateTimeAttribute
deserialization. (#610)The
MapAttributeMeta
class has been removed. Nowtype(MapAttribute) == AttributeContainerMeta
.Removed
LegacyBooleanAttribute
and the read-compatibility for it inBooleanAttribute
.None can now be used to bootstrap condition chaining (#653)
Allow specifying timedeltas in expressions involving TTLAttributes (#665)
v3.4.1¶
- date
2019-06-28
This is a backwards compatible, minor release.
Changes in this release:
Fix type stubs to include new methods and parameters introduced with time-to-live support
v3.4.0¶
- date
2019-06-13
This is a backwards compatible, minor release.
Changes in this release:
Adds a TTLAttribute that specifies when items expire (#259)
Enables time-to-live on a DynamoDB table if the corresponding model has a TTLAttribute
Adds a default_for_new parameter for Attribute which is a default that applies to new items only
Contributors to this release:
v3.3.3¶
- date
2019-01-15
This is a backwards compatible, minor release.
Fixes in this release:
Contributors to this release:
@vo-va
v3.3.2¶
- date
2019-01-03
This is a backwards compatible, minor release.
Changes in this release:
Built-in support for mypy type stubs, superseding those in python/typeshed. (#537)
v3.3.1¶
- date
2018-08-30
This is a backwards compatible, minor bug fix release.
Fixes in this release:
Clearer error message on missing consumed capacity during rate-limited scan. (#506)
Python 3 compatibility in PageIterator. (#535)
Proxy configuration changes in botocore>=1.11.0. (#531)
Contributors to this release:
v3.3.0¶
- date
2018-05-09
This is a backwards compatible, major bug fix release.
New features in this release:
Handle values from keys when batch get returns unprocessed keys. (#252, #376)
Externalizes AWS Credentials. (#426)
Add migration support for LegacyBooleanAttribute. (#404, #405)
Rate limited Page Iterator. (#481)
Fixes in this release:
Use attr.get_value(value) when deserialize. (#450)
Skip null attributes post serialization for maps. (#455)
Fix deserialization bug in BinaryAttribute and BinarySetAttribute. (#459, #480)
Allow MapAttribute instances to be used as the RHS in expressions. (#488)
Return the correct last_evaluated_key for limited queries/scans. (#406, #410)
Fix exclusive_start_key getting lost in PageIterator. (#421)
Add python 3.5 for Travis ci builds. (#437)
Contributors to this release:
v3.2.1¶
- date
2017-10-25
This is a backwards compatible, minor bug fix release.
Removed features in this release:
Remove experimental Throttle api. (#378)
Fixes in this release:
Handle attributes that cannot be retrieved by getattr. Fixes #104 (#385)
Model.refresh() should reset all model attribuets. Fixes #166 (#388)
Model.loads() should deserialize using custom attribute names. Fixes #168 (#387)
Support pagination in high-level api query and scan methods. Fixes #50, #118, #207, and #248 (#379)
Don’t serialize null nested attributed. Fixes #240 and #309 (#375)
Legacy update item subset removal using DELETE operator. Fixes #132 (#374)
Contributors to this release:
@jpinner-lyft
v3.2.0¶
- date
2017-10-13
This is a backwards compatible, minor release.
This release updates PynamoDB to interact with Dynamo via the current version of Dynamo’s API. Condition and update expressions can now be created from attributes and used in model operations. Legacy filter and attribute update keyword arguments have been deprecated. Using these arguments will cause a warning to be logged.
New features in this release:
Add support for current version of DynamoDB API
Improved
MapAttribute
item assignment and access.
Contributors to this release:
@jpinner-lyft
v3.2.0rc2¶
- date
2017-10-09
This is a backwards compatible, release candidate.
This release candidate allows dereferencing raw MapAttributes
in condition expressions.
It also improves MapAttribute
assignment and access.
Contributors to this release:
@jpinner-lyft
v3.2.0rc1¶
- date
2017-09-22
This is a backwards compatible, release candidate.
This release candidate updates PynamoDB to interact with Dynamo via the current version of Dynamo’s API. It deprecates some internal methods that were used to interact with Dynamo that are no longer relevant. If your project was calling those low level methods a warning will be logged.
New features in this release:
Add support for current version of DynamoDB API
Contributors to this release:
@jpinner-lyft
v3.1.0¶
- date
2017-07-07
This is a backwards compatible, minor release.
Note that we now require botocore>=1.2.0
; this is required to support the
consistent_read
parameter when scanning.
Calling Model.count()
without a hash_key
and with filters
will
raise a ValueError
, as it was previously returning incorrect results.
New features in this release:
Add support for signals via blinker (#278)
Fixes in this release:
Pass batch parameters down to boto/dynamo (#308)
Raise a ValueError if count() is invoked with no hash key AND filters (#313)
Add consistent_read parameter to Model.scan (#311)
Contributors to this release:
v3.0.1¶
- date
2017-06-09
This is a major release with breaking changes.
MapAttribute
now allows pythonic access when recursively defined.
If you were not using the attr_name=
kwarg then you should have no problems upgrading.
Previously defined non subclassed MapAttributes
(raw MapAttributes
) that were members of a subclassed MapAttribute
(typed MapAttributes
) would have to be accessed like a dictionary.
Now object access is possible and recommended.
Access via the attr_name
, also known as the DynamoDB name, will now throw an AttributeError
.
UnicodeSetAttributes
do not json serialize or deserialize anymore.
We deprecated the functionality of json serializing as of 1.6.0
but left the deserialization functionality in there so people could migrate away from the old functionality.
If you have any UnicodeSetAttributes
that have not been persisted since version 1.6.0
you will need to migrate your data or manage the json encoding and decoding with a custom attribute in application.
Performance enhancements for the
UTCDateTimeAttribute
deserialize method. (#277)There was a regression with attribute discovery. Fixes attribute discovery for model classes with inheritance (#280)
Fix to ignore null checks for batch delete (#283)
Fix for
ListAttribute
andMapAttribute
serialize (#286)Fix for
MapAttribute
pythonic access (#292) This is a breaking change.Deprecated the json decode in
UnicodeSetAttribute
(#294) This is a breaking change.Raise
TableDoesNotExist
error instead of letting json decodingValueErrors
raise (#296)
Contributors to this release:
v2.2.0¶
- date
2017-10-25
This is a backwards compatible, minor release.
The purpose of this release is to prepare users to upgrade to v3.0.1+ (see issue #377 for details).
Pull request #294 removes the backwards compatible deserialization of UnicodeSetAttributes introduced in #151.
This release introduces a migration function on the Model class to help re-serialize any data that was written with v1.5.4 and below.
Temporary feature in this release:
Model.fix_unicode_set_attributes() migration helper
Model.needs_unicode_set_fix() migration helper
v2.1.6¶
- date
2017-05-10
This is a backwards compatible, minor release.
Fixes in this release:
Replace Delorean with dateutil (#208)
Fix a bug with count – consume all pages in paginated response (#256)
Update mock lib (#262)
Use pytest instead of nose (#263)
Documentation changes (#269)
Fix null deserialization in MapAttributes (#272)
Contributors to this release:
v2.1.5¶
- date
2017-03-16
This is a backwards compatible, minor release.
Fixes in this release:
Apply retry to ProvisionedThroughputExceeded (#222)
rate_limited_scan fix to handle consumed capacity (#235)
Fix for test when dict ordering differs (#237)
Contributors to this release:
v2.1.4¶
- date
2017-02-14
This is a minor release, with some changes to MapAttribute handling. Previously, when accessing a MapAttribute via item.attr, the type of the object used during instantiation would determine the return value. Model(attr={…}) would return a dict on access. Model(attr=MapAttribute(…)) would return an instance of MapAttribute. After #223, a MapAttribute will always be returned during item access regardless of the type of the object used during instantiation. For convenience, a dict version can be accessed using .as_dict() on the MapAttribute.
New features in this release:
Support multiple attribute update (#194)
Rate-limited scan (#205)
Always create map attributes when setting a dict (#223)
Fixes in this release:
Remove AttributeDict and require explicit attr names (#220)
Add distinct DoesNotExist classes per model (#206)
Ensure defaults are respected for MapAttribute (#221)
Add docs for GSI throughput changes (#224)
Contributors to this release:
v2.0.3¶
- date
2016-11-18
This is a backwards compatible, minor release.
Fixes in this release:
Allow longs as members of maps + lists in python 2 (#200)
Allow raw map attributes in subclassed map attributes (#199)
Contributors to this release:
v2.0.2¶
- date
2016-11-10
This is a backwards compatible, minor release.
Fixes in this release:
add BOOL into SHORT_ATTR_TYPES (#190)
deserialize map attributes correctly (#192)
prepare request with requests session so session properties are applied (#197)
Contributors to this release:
v2.0.1¶
- date
2016-11-04
This is a backwards compatible, minor release.
Fixes in this release:
make “unprocessed keys for batch operation” log at info level (#180)
fix RuntimeWarning during imp_load in custom settings file (#185)
allow unstructured map attributes (#186)
Contributors to this release:
v2.0.0¶
- date
2016-11-01
This is a major release, which introduces support for native DynamoDB maps and lists. There are no changes which are expected to break backwards compatibility, but you should test extensively before upgrading in production due to the volume of changes.
New features in this release:
Add support for native map and list attributes (#175)
Contributors to this release:
v1.6.0¶
- date
2016-10-20
This is a minor release, with some changes to BinaryAttribute handling and new options for configuration.
BooleanAttribute now uses the native API type “B”. BooleanAttribute is also compatible with the legacy BooleanAttributes on read. On save, they will be rewritten with the native type. If you wish to avoid this behavior, you can continue to use LegacyBooleanAttribute. LegacyBooleanAttribute is also forward compatible with native boolean attributes to allow for migration.
New features in this release:
Add support for native boolean attributes (#149)
Parse legacy and native bool in legacy bool (#158)
Allow override of settings from global configuration file (#147)
Fixes in this release:
Serialize UnicodeSetAttributes correctly (#151)
Make update_item respect attr_name differences (#160)
Contributors to this release:
v1.5.4¶
- date
2017-10-25
This is a backwards compatible, minor bug fix release.
The purpose of this release is to prepare users to upgrade to v1.6.0+ (see issue #377 for details).
Pull request #151 introduces a backwards incompatible change to how UnicodeSetAttributes are serialized. While the commit attempts to provide compatibility by deserializing values written with v1.5.3 and below, it prevents users from upgrading because it starts writing non JSON-encoded values to dynamo.
Anyone using UnicodeSetAttribute must first deploy this version.
Fixes in this release:
Backport UnicodeSetAttribute deserialization code from #151
v1.5.3¶
- date
2016-08-08
This is a backwards compatible, minor release.
Fixes in this release:
Introduce concept of page_size, separate from num items returned limit (#139)
Contributors to this release:
v1.5.2¶
- date
2016-06-23
This is a backwards compatible, minor release.
Fixes in this release:
Additional retry logic for HTTP Status Code 5xx, usually attributed to InternalServerError (#135)
Contributors to this release:
v1.5.1¶
- date
2016-05-11
This is a backwards compatible, minor release.
Fixes in this release:
Fix for binary attribute handling of unprocessed items data corruption affecting users of 1.5.0 (#126 fixes #125)
Contributors to this release:
v1.5.0¶
- date
2016-05-09
This is a backwards compatible, minor release.
Please consider the fix for limits before upgrading. Correcting for off-by-one when querying is no longer necessary.
Fixes in this release:
Fix off-by-one error for limits when querying (#123 fixed #95)
Retry on ConnectionErrors and other types of RequestExceptions (#121 fixes #98)
More verbose logging when receiving errors e.g. InternalServerError from the DynamoDB API (#115)
Prevent permanent poisoning of credential cache due to botocore bug (#113 fixes #99)
Fix for UnprocessedItems serialization error (#114 fixes #103)
Fix parsing issue with newer version of dateutil and UTCDateTimeAttributes (#110 fixes #109)
Correctly handle expected value generation for set types (#107 fixes #102)
New features in this release:
Return the cause of connection exceptions to the caller (#108 documented by #112)
Configurable session class for custom connection pool size, etc (#91)
Add attributes_to_get and consistent_read to more of the API (#79)
Contributors to this release:
v1.4.4¶
- date
2015-11-10
This is a backward compatible, minor release.
Changes in this release:
v1.4.3¶
- date
2015-10-12
This is a backward compatible, minor release. Included are bug fixes and performance improvements.
A huge thank you to all who contributed to this release:
Daniel Hochman
Josh Owen
Keith Mitchell
Kevin Wilson
Changes in this release:
Fixed bug where models without a range key weren’t handled correctly
Botocore is now only used for preparing requests (for performance reasons)
Removed the dependency on OrderedDict
Fixed bug for zope interface compatibility (#71)
Fixed bug where the range key was handled incorrectly for integer values
v1.4.2¶
- date
2015-06-26
This is a backward compatible, minor bug fix release.
Bugs fixed in this release:
Fixed bug where botocore exceptions were not being reraised.
v1.4.1¶
- date
2015-06-26
This is a backward compatible, minor bug fix release.
Bugs fixed in this release:
Fixed bug where a local variable could be unbound (#67).
v1.4.0¶
- date
2015-06-23
This is a minor release, with backward compatible bug fixes.
Bugs fixed in this release:
v1.3.7¶
- date
2015-04-06
This is a backward compatible, minor bug fix release.
Bugs fixed in this release:
v1.3.6¶
- date
2015-04-06
This is a backward compatible, minor bug fix release.
Bugs fixed in this release:
Fixed bug where arguments were used incorrectly in update_item (#54)
Fixed bug where falsy values were used incorrectly in model constructors (#57), thanks @pior
Fixed bug where the limit argument for scan and query was not always honored.
New features:
Table counts with optional filters can now be queried using
Model.count(**filters)
v1.3.5¶
This is a backward compatible, minor bug fix release.
Bugs fixed in this release.
v1.3.4¶
- date
2014-10-06
This is a backward compatible, minor bug fix release.
Bugs fixed in this release.
Fixed bug where attributes could not be used in multiple indexes when creating a table.
Fixed bug where a dependency on mock was accidentally introduced.
v1.3.3¶
- date
2014-9-18
This is a backward compatible, minor bug fix release, fixing the following issues
Fixed bug with Python 2.6 compatibility (#28)
Fixed bug where update_item was incorrectly checking attributes for null (#34)
Other minor improvements
New API for backing up and restoring tables
Better support for custom attributes (https://github.com/pynamodb/PynamoDB/commit/0c2ba5894a532ed14b6c14e5059e97dbb653ff12)
Explicit Travis CI testing of Python 2.6, 2.7, 3.3, 3.4, and PyPy
Tests added for round tripping unicode values
v1.3.2¶
- date
2014-7-02
This is a minor bug fix release, fixing a bug where query filters were incorrectly parsed (#26).
v1.3.1¶
- date
2014-05-26
This is a bug fix release, ensuring that KeyCondition and QueryFilter arguments are constructed correctly (#25).
Added an example URL shortener to the examples.
Minor documentation fixes.
v1.3.0¶
- date
2014-05-20
This is a minor release, with new backward compatible features and bug fixes.
Fixed bug where NULL and NOT_NULL were not set properly in query and scan operations (#24)
Support for specifying the index_name as a Index.Meta attribute (#23)
Support for specifying read and write capacity in Model.Meta (#22)
v1.2.2¶
- date
2014-05-14
This is a minor bug fix release, resolving #21 (key_schema ordering for create_table).
v1.2.1¶
- date
2014-05-07
This is a minor bug fix release, resolving #20.
v1.2.0¶
- date
2014-05-06
Numerous documentation improvements
Improved support for conditional operations
Added support for filtering queries on non key attributes (https://aws.amazon.com/blogs/aws/improved-queries-and-updates-for-dynamodb/)
Fixed issue with JSON loading where escaped characters caused an error (#17)
Minor bug fixes
v1.1.0¶
- date
2014-04-14
PynamoDB now requires botocore version 0.42.0 or greater
Improved documentation
Minor bug fixes
New API endpoint for deleting model tables
Support for expected value conditions in item delete, update, and save
Support for limit argument to queries
Support for aliased attribute names
Example of using aliased attribute names:
class AliasedModel(Model):
class Meta:
table_name = "AliasedModel"
forum_name = UnicodeAttribute(hash_key=True, attr_name='fn')
subject = UnicodeAttribute(range_key=True, attr_name='s')
v1.0.0¶
- date
2014-03-28
Major update: New syntax for specifying models that is not backward compatible.
Important
The syntax for models has changed!
The old way:
from pynamodb.models import Model
from pynamodb.attributes import UnicodeAttribute
class Thread(Model):
table_name = 'Thread'
forum_name = UnicodeAttribute(hash_key=True)
The new way:
from pynamodb.models import Model
from pynamodb.attributes import UnicodeAttribute
class Thread(Model):
class Meta:
table_name = 'Thread'
forum_name = UnicodeAttribute(hash_key=True)
Other, less important changes:
Added explicit support for specifying the server hostname in models
Added documentation for using DynamoDB Local and dynalite
Made examples runnable with DynamoDB Local and dynalite by default
Added documentation for the use of
default
andnull
on model attributesImproved testing for index queries
v0.1.13¶
- date
2014-03-20
Bug fix release. Proper handling of update_item attributes for atomic item updates, with tests. Fixes #7.
v0.1.12¶
- date
2014-03-18
Added a region attribute to model classes, allowing users to specify the AWS region, per model. Fixes #6.
v0.1.11¶
- date
2014-02-26
New exception behavior: Model.get and Model.refresh will now raise DoesNotExist if the item is not found in the table.
Correctly deserialize complex key types. Fixes #3
Correctly construct keys for tables that don’t have both a hash key and a range key in batch get operations. Fixes #5
Better PEP8 Compliance
More tests
Removed session and endpoint caching to avoid using stale IAM role credentials