A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/datastax/python-driver/commit/bb984ee below:

Remove deprecated cqltypes time/date functions · datastax/python-driver@bb984ee · GitHub

File tree Expand file treeCollapse file tree 1 file changed

+1

-16

lines changed

Filter options

Expand file treeCollapse file tree 1 file changed

+1

-16

lines changed Original file line number Diff line number Diff line change

@@ -73,20 +73,6 @@ def trim_if_startswith(s, prefix):

73 73

return s

74 74 75 75 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 - 90 76

_casstypes = {}

91 77 92 78

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

538 524 539 525

@staticmethod

540 526

def interpret_datestring(val):

541 -

# not used internally. deprecate?

542 527

if val[-5] in ('+', '-'):

543 528

offset = (int(val[-4:-2]) * 3600 + int(val[-2:]) * 60) * int(val[-5] + '1')

544 529

val = val[:-5]

@@ -582,7 +567,7 @@ class TimeUUIDType(DateType):

582 567

typename = 'timeuuid'

583 568 584 569

def my_timestamp(self):

585 -

return unix_time_from_uuid1(self.val)

570 +

return util.unix_time_from_uuid1(self.val)

586 571 587 572

@staticmethod

588 573

def deserialize(byts, protocol_version):

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4