Skip to content

Commit e4cd057

Browse files
authored
VER: Release 0.57.0
See release notes.
2 parents 10c75b7 + b4c6951 commit e4cd057

File tree

6 files changed

+43
-9
lines changed

6 files changed

+43
-9
lines changed

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# Changelog
22

3+
## 0.57.0 - 2025-06-10
4+
5+
#### Enhancements
6+
- Upgraded `databento-dbn` to 0.36.0
7+
- Added missing Python type stubs for several leg properties of `InstrumentDefMsg`
8+
9+
#### Bug fixes
10+
- Fixed an issue where the zstandard frame size could limit the size of `DataFrame` objects returned by `DBNStore.to_df()` when a `count` was specified
11+
12+
#### Deprecations
13+
- Deprecated `int` and `pd.Timestamp` types for `start_date` and `end_date` parameters which will be removed in a future release
14+
315
## 0.56.0 - 2025-06-03
416

517
#### Breaking changes

databento/common/dbnstore.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -535,6 +535,7 @@ def reader(self) -> IO[bytes]:
535535
if self.compression == Compression.ZSTD:
536536
return zstandard.ZstdDecompressor().stream_reader(
537537
self._data_source.reader,
538+
read_across_frames=True,
538539
)
539540
return self._data_source.reader
540541

databento/common/parsing.py

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from __future__ import annotations
22

3+
import warnings
34
from collections.abc import Iterable
45
from datetime import date
56
from datetime import datetime
@@ -220,7 +221,7 @@ def optional_date_to_string(value: date | str | None) -> str | None:
220221
if value is None:
221222
return None
222223

223-
return datetime_to_date_string(value)
224+
return date_to_string(value)
224225

225226

226227
def datetime_to_string(value: pd.Timestamp | datetime | date | str | int) -> str:
@@ -249,7 +250,7 @@ def datetime_to_string(value: pd.Timestamp | datetime | date | str | int) -> str
249250
return pd.to_datetime(value).isoformat()
250251

251252

252-
def datetime_to_date_string(value: pd.Timestamp | date | str | int) -> str:
253+
def date_to_string(value: pd.Timestamp | date | str | int) -> str:
253254
"""
254255
Return a valid date string from the given value.
255256
@@ -265,11 +266,31 @@ def datetime_to_date_string(value: pd.Timestamp | date | str | int) -> str:
265266
"""
266267
if isinstance(value, str):
267268
return value
268-
elif isinstance(value, int):
269-
return str(value)
270269
elif isinstance(value, date):
271270
return value.isoformat()
271+
elif isinstance(value, int):
272+
warnings.warn(
273+
"Passing an int to `start_date` or `end_date` is deprecated and will be removed in v0.59.0."
274+
"Use a date or str instead.",
275+
DeprecationWarning,
276+
stacklevel=2,
277+
)
278+
return str(value)
279+
elif isinstance(value, pd.Timestamp):
280+
warnings.warn(
281+
"Passing a pandas Timestamp to `start_date` or `end_date` is deprecated and will be removed in v0.59.0."
282+
"Use a date or str instead.",
283+
DeprecationWarning,
284+
stacklevel=2,
285+
)
286+
return pd.to_datetime(value).date().isoformat()
272287
else:
288+
warnings.warn(
289+
f"Passing a {type(value)} to `start_date` or `end_date` is deprecated and will be removed in v0.59.0."
290+
"Use a date or str instead.",
291+
DeprecationWarning,
292+
stacklevel=2,
293+
)
273294
return pd.to_datetime(value).date().isoformat()
274295

275296

databento/historical/api/symbology.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
from databento.common import API_VERSION
1111
from databento.common.http import BentoHttpAPI
12-
from databento.common.parsing import datetime_to_date_string
12+
from databento.common.parsing import date_to_string
1313
from databento.common.parsing import optional_date_to_string
1414
from databento.common.parsing import optional_symbols_list_to_list
1515
from databento.common.publishers import Dataset
@@ -69,7 +69,7 @@ def resolve(
6969
"symbols": ",".join(symbols_list),
7070
"stype_in": str(stype_in_valid),
7171
"stype_out": str(validate_enum(stype_out, SType, "stype_out")),
72-
"start_date": datetime_to_date_string(start_date),
72+
"start_date": date_to_string(start_date),
7373
"end_date": optional_date_to_string(end_date),
7474
}
7575

databento/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.56.0"
1+
__version__ = "0.57.0"

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "databento"
3-
version = "0.56.0"
3+
version = "0.57.0"
44
description = "Official Python client library for Databento"
55
authors = [
66
"Databento <[email protected]>",
@@ -32,7 +32,7 @@ aiohttp = [
3232
{version = "^3.8.3", python = "<3.12"},
3333
{version = "^3.9.0", python = "^3.12"}
3434
]
35-
databento-dbn = "0.35.1"
35+
databento-dbn = "0.36.0"
3636
numpy = [
3737
{version = ">=1.23.5", python = "<3.12"},
3838
{version = ">=1.26.0", python = "^3.12"}

0 commit comments

Comments
 (0)