Skip to content

Commit 96489cc

Browse files
committed
Remove deprecated cqlengine.columns.TimeUUID.from_datetime
1 parent cc94073 commit 96489cc

File tree

2 files changed

+1
-21
lines changed

2 files changed

+1
-21
lines changed

cassandra/cqlengine/columns.py

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -540,6 +540,7 @@ def to_python(self, value):
540540
def to_database(self, value):
541541
return self.validate(value)
542542

543+
543544
from uuid import UUID as pyUUID, getnode
544545

545546

@@ -550,25 +551,6 @@ class TimeUUID(UUID):
550551

551552
db_type = 'timeuuid'
552553

553-
@classmethod
554-
def from_datetime(self, dt):
555-
"""
556-
generates a UUID for a given datetime
557-
558-
:param dt: datetime
559-
:type dt: datetime
560-
:return: uuid1
561-
562-
.. deprecated:: 2.6.0
563-
564-
Use :func:`cassandra.util.uuid_from_time`
565-
566-
"""
567-
msg = "cqlengine.columns.TimeUUID.from_datetime is deprecated. Use cassandra.util.uuid_from_time instead."
568-
warnings.warn(msg, DeprecationWarning)
569-
log.warning(msg)
570-
return util.uuid_from_time(dt)
571-
572554

573555
class Boolean(Column):
574556
"""

docs/api/cassandra/cqlengine/columns.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,6 @@ Columns of all types are initialized by passing :class:`.Column` attributes to t
7878

7979
.. autoclass:: TimeUUID(**kwargs)
8080

81-
.. automethod:: from_datetime
82-
8381
.. autoclass:: TinyInt(**kwargs)
8482

8583
.. autoclass:: UserDefinedType

0 commit comments

Comments
 (0)