Skip to content

Commit e1b11b0

Browse files
committed
Remove Model.__default_ttl__
1 parent c613a12 commit e1b11b0

4 files changed

Lines changed: 5 additions & 12 deletions

File tree

CHANGELOG.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@ Bug Fixes
1414
Other
1515
-----
1616
* Cassandra 2.0 support removal (PYTHON-716)
17-
* cqlengine: disallow Counter create, save operations (PYTHON-497)
18-
* cqlengine: remove the negative indices slicing support in ModelQuerySet (PYTHON-875)
1917
* PreparedStatement.column_metadata should be renamed to bind_metadata (PYTHON-884)
2018
* Remove Cluster.set_meta_refresh_enabled (PYTHON-890)
19+
* cqlengine: disallow Counter create, save operations (PYTHON-497)
20+
* cqlengine: remove the negative indices slicing support in ModelQuerySet (PYTHON-875)
21+
* cqlengine: Remove Model.__default_ttl__ (PYTHON-889)
2122

2223
3.12.0
2324
======

cassandra/cqlengine/models.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ def _clone_model_class(model, attrs):
3535
try:
3636
new_type.__abstract__ = model.__abstract__
3737
new_type.__discriminator_value__ = model.__discriminator_value__
38-
new_type.__default_ttl__ = model.__default_ttl__
3938
except AttributeError:
4039
pass
4140
return new_type
@@ -933,10 +932,6 @@ def __new__(cls, name, bases, attrs):
933932
# short circuit __discriminator_value__ inheritance
934933
attrs['__discriminator_value__'] = attrs.get('__discriminator_value__')
935934

936-
# TODO __default__ttl__ should be removed in the next major release
937-
options = attrs.get('__options__') or {}
938-
attrs['__default_ttl__'] = options.get('default_time_to_live')
939-
940935
column_definitions = [(k, v) for k, v in attrs.items() if isinstance(v, columns.Column)]
941936
column_definitions = sorted(column_definitions, key=lambda x: x[1].position)
942937

docs/api/cassandra/cqlengine/models.rst

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,6 @@ Model
3434

3535
.. autoattribute:: __connection__
3636

37-
.. attribute:: __default_ttl__
38-
:annotation: = None
39-
40-
Will be deprecated in release 4.0. You can set the default ttl by configuring the table ``__options__``. See :ref:`ttl-change` for more details.
41-
4237
.. autoattribute:: __discriminator_value__
4338

4439
See :ref:`model_inheritance` for usage examples.

docs/cqlengine/upgrade_guide.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ Upgrade Guide 3.x to 4.x
6969

7070
Automobile.objects.all()[-10:]
7171

72+
* Model.__default_ttl__ has been removed.
73+
7274
Upgrade Guide cqlengine to cassandra.cqlengine
7375
==============================================
7476

0 commit comments

Comments
 (0)