Remove deprecated cqlengine.columns.TimeUUID.from_datetime
This commit is contained in:
@@ -540,6 +540,7 @@ class UUID(Column):
|
||||
def to_database(self, value):
|
||||
return self.validate(value)
|
||||
|
||||
|
||||
from uuid import UUID as pyUUID, getnode
|
||||
|
||||
|
||||
@@ -550,25 +551,6 @@ class TimeUUID(UUID):
|
||||
|
||||
db_type = 'timeuuid'
|
||||
|
||||
@classmethod
|
||||
def from_datetime(self, dt):
|
||||
"""
|
||||
generates a UUID for a given datetime
|
||||
|
||||
:param dt: datetime
|
||||
:type dt: datetime
|
||||
:return: uuid1
|
||||
|
||||
.. deprecated:: 2.6.0
|
||||
|
||||
Use :func:`cassandra.util.uuid_from_time`
|
||||
|
||||
"""
|
||||
msg = "cqlengine.columns.TimeUUID.from_datetime is deprecated. Use cassandra.util.uuid_from_time instead."
|
||||
warnings.warn(msg, DeprecationWarning)
|
||||
log.warning(msg)
|
||||
return util.uuid_from_time(dt)
|
||||
|
||||
|
||||
class Boolean(Column):
|
||||
"""
|
||||
|
@@ -78,8 +78,6 @@ Columns of all types are initialized by passing :class:`.Column` attributes to t
|
||||
|
||||
.. autoclass:: TimeUUID(**kwargs)
|
||||
|
||||
.. automethod:: from_datetime
|
||||
|
||||
.. autoclass:: TinyInt(**kwargs)
|
||||
|
||||
.. autoclass:: UserDefinedType
|
||||
|
Reference in New Issue
Block a user