Skip to content

Commit f2403d0

Browse files
committed
cqle doc: deprecated TimeUUID.from_datetime
1 parent 5ea3f22 commit f2403d0

3 files changed

Lines changed: 11 additions & 1 deletion

File tree

cassandra/cqlengine/columns.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,12 @@ def from_datetime(self, dt):
557557
558558
:param dt: datetime
559559
:type dt: datetime
560-
:return:
560+
:return: uuid1
561+
562+
.. deprecated:: 2.6.0
563+
564+
Use :func:`cassandra.util.uuid_from_time`
565+
561566
"""
562567
msg = "cqlengine.columns.TimeUUID.from_datetime is deprecated. Use cassandra.util.uuid_from_time instead."
563568
warnings.warn(msg, DeprecationWarning)

docs/api/cassandra/cqlengine/columns.rst

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

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

81+
.. automethod:: from_datetime
82+
8183
.. autoclass:: TinyInt(**kwargs)
8284

8385
.. autoclass:: UserDefinedType

docs/cqlengine/upgrade_guide.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,3 +150,6 @@ After::
150150
__discriminator_value__ = 'dog'
151151

152152

153+
TimeUUID.from_datetime
154+
----------------------
155+
This function is deprecated in favor of the core utility function :func:`~.uuid_from_time`.

0 commit comments

Comments
 (0)