Remove deprecated cqlengine.columns.TimeUUID.from_datetime

This commit is contained in:
Adam Holmberg
2015-10-06 12:19:15 -05:00
parent cc9407366a
commit 96489ccc83
2 changed files with 1 additions and 21 deletions

View File

@@ -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):
"""

View File

@@ -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