Skip to content

Commit 569552b

Browse files
authored
Update type stubs for TTL feature (#657)
1 parent 77f1cb8 commit 569552b

File tree

5 files changed

+19
-2
lines changed

5 files changed

+19
-2
lines changed

docs/release_notes.rst

+13
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
Release Notes
22
=============
33

4+
v3.4.1
5+
------
6+
7+
:date: 2019-06-28
8+
9+
This is a backwards compatible, minor release.
10+
11+
Changes in this release:
12+
13+
* Fix type stubs to include new methods and parameters introduced with time-to-live support
14+
15+
416
v3.4.0
517
------
618

@@ -19,6 +31,7 @@ Contributors to this release:
1931
* @irhkang
2032
* @ikonst
2133

34+
2235
v3.3.3
2336
------
2437

pynamodb/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77
"""
88
__author__ = 'Jharrod LaFon'
99
__license__ = 'MIT'
10-
__version__ = '3.4.0'
10+
__version__ = '3.4.1'

pynamodb/connection/base.pyi

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ class Connection:
3232
def client(self): ...
3333
def get_meta_table(self, table_name: Text, refresh: bool = ...): ...
3434
def create_table(self, table_name: Text, attribute_definitions: Optional[Any] = ..., key_schema: Optional[Any] = ..., read_capacity_units: Optional[Any] = ..., write_capacity_units: Optional[Any] = ..., global_secondary_indexes: Optional[Any] = ..., local_secondary_indexes: Optional[Any] = ..., stream_specification: Optional[Any] = ...): ...
35+
def update_time_to_live(self, table_name: Text, ttl_attribute_name: Text): ...
3536
def delete_table(self, table_name: Text): ...
3637
def update_table(self, table_name: Text, read_capacity_units: Optional[Any] = ..., write_capacity_units: Optional[Any] = ..., global_secondary_index_updates: Optional[Any] = ...): ...
3738
def list_tables(self, exclusive_start_table_name: Optional[Any] = ..., limit: Optional[Any] = ...): ...

pynamodb/connection/table.pyi

+1
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ class TableConnection:
7474
def query(self, hash_key, attributes_to_get: Optional[Any] = ..., consistent_read: bool = ..., exclusive_start_key: Optional[Any] = ..., index_name: Optional[Any] = ..., key_conditions: Optional[Any] = ..., query_filters: Optional[Any] = ..., limit: Optional[Any] = ..., return_consumed_capacity: Optional[Any] = ..., scan_index_forward: Optional[Any] = ..., conditional_operator: Optional[Any] = ..., select: Optional[Any] = ...): ...
7575
def describe_table(self): ...
7676
def delete_table(self): ...
77+
def update_time_to_live(self, ttl_attr_name: Text): ...
7778
def update_table(self, read_capacity_units: Optional[Any] = ..., write_capacity_units: Optional[Any] = ..., global_secondary_index_updates: Optional[Any] = ...): ...
7879
def create_table(self, attribute_definitions: Optional[Any] = ..., key_schema: Optional[Any] = ..., read_capacity_units: Optional[Any] = ..., write_capacity_units: Optional[Any] = ..., global_secondary_indexes: Optional[Any] = ..., local_secondary_indexes: Optional[Any] = ..., stream_specification: Optional[Any] = ...): ...
7980

pynamodb/models.pyi

+3-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,9 @@ class Model(metaclass=MetaModel):
112112
@classmethod
113113
def describe_table(cls): ...
114114
@classmethod
115-
def create_table(cls: Type[_T], wait: bool = ..., read_capacity_units: Optional[Any] = ..., write_capacity_units: Optional[Any] = ...): ...
115+
def create_table(cls: Type[_T], wait: bool = ..., read_capacity_units: Optional[Any] = ..., write_capacity_units: Optional[Any] = ..., ignore_update_ttl_errors: bool = ...): ...
116+
@classmethod
117+
def update_ttl(cls, ignore_update_ttl_errors: bool) -> None: ...
116118
@classmethod
117119
def dumps(cls): ...
118120
@classmethod

0 commit comments

Comments
 (0)