From f5fefb36d861ebcef259f3d38724bb3404c12078 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Ma=C5=9Blanka?= <piotr.maslanka@henrietta.com.pl> Date: Thu, 24 Jun 2021 16:44:18 +0200 Subject: [PATCH] `TimeSeries.iterate_range` will accept a parameter called `direct_bytes` for compatibility with `VarlenSeries`. It's value is ignored. --- README.md | 3 +++ setup.cfg | 2 +- tempsdb/series.pxd | 3 ++- tempsdb/series.pyx | 4 +++- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d641c90..4434735 100644 --- a/README.md +++ b/README.md @@ -57,6 +57,9 @@ Then copy your resulting wheel and install it via pip on the target system. * added support for storing metadata as minijson * this will be enabled by default is minijson is importable * fixed minor compiler warnings +* `TimeSeries.iterate_range` will accept a parameter called + `direct_bytes` for compatibility with `VarlenSeries`. + It's value is ignored. ## v0.5.4 diff --git a/setup.cfg b/setup.cfg index 3fde48a..6266526 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,7 +1,7 @@ # coding: utf-8 [metadata] name = tempsdb -version = 0.6a2 +version = 0.6a3 long-description = file: README.md long-description-content-type = text/markdown; charset=UTF-8 license_files = LICENSE diff --git a/tempsdb/series.pxd b/tempsdb/series.pxd index 98da3b1..539062a 100644 --- a/tempsdb/series.pxd +++ b/tempsdb/series.pxd @@ -37,7 +37,8 @@ cdef class TimeSeries: cpdef int append_padded(self, unsigned long long timestamp, bytes data) except -1 cpdef int sync(self) except -1 cpdef int close_chunks(self) except -1 - cpdef Iterator iterate_range(self, unsigned long long start, unsigned long long stop) + cpdef Iterator iterate_range(self, unsigned long long start, unsigned long long stop, + bint direct_bytes=*) cdef unsigned int get_index_of_chunk_for(self, unsigned long long timestamp) cpdef int trim(self, unsigned long long timestamp) except -1 cpdef unsigned long open_chunks_mmap_size(self) diff --git a/tempsdb/series.pyx b/tempsdb/series.pyx index 7fad4e4..3c60ab2 100644 --- a/tempsdb/series.pyx +++ b/tempsdb/series.pyx @@ -309,12 +309,14 @@ cdef class TimeSeries: except IndexError: return len(self.chunks)-1 - cpdef Iterator iterate_range(self, unsigned long long start, unsigned long long stop): + cpdef Iterator iterate_range(self, unsigned long long start, unsigned long long stop, + bint direct_bytes=True): """ Return an iterator through collected data with given timestamps. :param start: timestamp to start at :param stop: timestamp to stop at + :param direct_bytes: for compatibility with VarlenSeries. Ignored. :return: an iterator with the data :raises ValueError: start larger than stop """ -- GitLab