Skip to content

Commit 69c50ed

Browse files
Merge branch 'release-v5.8.1'
2 parents 02a0e4e + abfdf3b commit 69c50ed

File tree

5 files changed

+14
-12
lines changed

5 files changed

+14
-12
lines changed

btrdb/utils/general.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def from_timedelta(cls, delta):
5858
specified duration. Because pointwidths are in powers of 2, be sure to check
5959
that the returned real duration is sufficient.
6060
"""
61-
return cls.from_nanoseconds(delta.total_seconds()*1e9)
61+
return cls.from_nanoseconds(int(delta.total_seconds()*1e9))
6262

6363
@classmethod
6464
def from_nanoseconds(cls, nsec):

btrdb/version.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
__version_info__ = {
1919
'major': 5,
2020
'minor': 8,
21-
'micro': 0,
21+
'micro': 1,
2222
'releaselevel': 'final',
23-
'serial': 13,
23+
'serial': 14,
2424
}
2525

2626
##########################################################################

requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# GRPC / Protobuff related
2-
grpcio==1.16.1
3-
grpcio-tools==1.16.1
2+
grpcio>=1.16.1
3+
grpcio-tools>=1.16.1
44

55
# Time related utils
66
pytz

tests/btrdb/test_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
## Test Constants
2727
##########################################################################
2828

29-
EXPECTED_VERSION = "5.8"
29+
EXPECTED_VERSION = "5.8.1"
3030

3131

3232
##########################################################################

tests/btrdb/utils/test_general.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,16 @@ class TestPointwidth(object):
2525
(timedelta(days=30), 51),
2626
(timedelta(days=7), 49),
2727
(timedelta(days=1), 46),
28-
(timedelta(hours=4), 45),
29-
(timedelta(minutes=15), 40),
30-
(timedelta(seconds=30), 29),
28+
(timedelta(hours=4), 43),
29+
(timedelta(minutes=15), 39),
30+
(timedelta(seconds=30), 34),
3131
])
32-
def test_from_nanoseconds(self, delta, expected):
32+
33+
def test_from_timedelta(self, delta, expected):
3334
"""
34-
Test getting the closest point width from nanoseconds
35+
Test getting the closest point width from a timedelta
3536
"""
36-
assert pointwidth.from_nanoseconds(nsec) == expected
37+
assert pointwidth.from_timedelta(delta) == expected
3738

3839
@pytest.mark.parametrize("nsec, expected", [
3940
(ns_delta(days=365), 54),
@@ -44,6 +45,7 @@ def test_from_nanoseconds(self, delta, expected):
4445
(ns_delta(minutes=30), 40),
4546
(ns_delta(seconds=1), 29),
4647
])
48+
4749
def test_from_nanoseconds(self, nsec, expected):
4850
"""
4951
Test getting the closest point width from nanoseconds

0 commit comments

Comments
 (0)