Skip to content

Commit bb984ee

Browse files
committed
Remove deprecated cqltypes time/date functions
Moved to util
1 parent 574266d commit bb984ee

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

cassandra/cqltypes.py

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -73,20 +73,6 @@ def trim_if_startswith(s, prefix):
7373
return s
7474

7575

76-
def unix_time_from_uuid1(u):
77-
msg = "'cassandra.cqltypes.unix_time_from_uuid1' has moved to 'cassandra.util'. This entry point will be removed in the next major version."
78-
warnings.warn(msg, DeprecationWarning)
79-
log.warning(msg)
80-
return util.unix_time_from_uuid1(u)
81-
82-
83-
def datetime_from_timestamp(timestamp):
84-
msg = "'cassandra.cqltypes.datetime_from_timestamp' has moved to 'cassandra.util'. This entry point will be removed in the next major version."
85-
warnings.warn(msg, DeprecationWarning)
86-
log.warning(msg)
87-
return util.datetime_from_timestamp(timestamp)
88-
89-
9076
_casstypes = {}
9177

9278

@@ -538,7 +524,6 @@ class DateType(_CassandraType):
538524

539525
@staticmethod
540526
def interpret_datestring(val):
541-
# not used internally. deprecate?
542527
if val[-5] in ('+', '-'):
543528
offset = (int(val[-4:-2]) * 3600 + int(val[-2:]) * 60) * int(val[-5] + '1')
544529
val = val[:-5]
@@ -582,7 +567,7 @@ class TimeUUIDType(DateType):
582567
typename = 'timeuuid'
583568

584569
def my_timestamp(self):
585-
return unix_time_from_uuid1(self.val)
570+
return util.unix_time_from_uuid1(self.val)
586571

587572
@staticmethod
588573
def deserialize(byts, protocol_version):

0 commit comments

Comments
 (0)