Skip to content

Commit 65a6a8f

Browse files
authored
VER: Release 0.65.0
See release notes.
2 parents b41eedd + 1fa9ba6 commit 65a6a8f

24 files changed

+134
-114
lines changed

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ jobs:
1313
if: ${{ github.event.workflow_run.conclusion == 'success' }}
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@v4
16+
- uses: actions/checkout@v5
1717
- uses: actions/setup-python@v5
1818
with:
19-
python-version: "3.10"
19+
python-version: "3.12"
2020
- uses: snok/install-poetry@v1
2121
with:
2222
virtualenvs-create: true
@@ -32,7 +32,7 @@ jobs:
3232
sed -n '/^## /{n; :a; /^## /q; p; n; ba}' CHANGELOG.md >> NOTES.md
3333
3434
- name: Release
35-
uses: softprops/action-gh-release@v1
35+
uses: softprops/action-gh-release@v2
3636
with:
3737
fail_on_unmatched_files: true
3838
append_body: true

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ jobs:
1010
fail-fast: false
1111
matrix:
1212
os: [ubuntu-latest, macos-latest, windows-latest]
13-
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
13+
python-version: ["3.10", "3.11", "3.12", "3.13"]
1414
name: build - Python ${{ matrix.python-version }} (${{ matrix.os }})
1515
runs-on: ${{ matrix.os }}
1616

1717
steps:
18-
- uses: actions/checkout@v4
18+
- uses: actions/checkout@v5
1919
- uses: actions/setup-python@v5
2020
with:
2121
python-version: ${{ matrix.python-version }}

CHANGELOG.md

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

3+
## 0.65.0 - 2025-11-11
4+
5+
#### Deprecations
6+
- Deprecated `mode` parameter in `metadata.get_cost`, which will be removed in a future release
7+
8+
#### Enhancements
9+
- Added export of `CBBOMsg` and `BBOMsg` from `databento_dbn` to the root `databento` package
10+
- Upgraded `databento-dbn` to 0.43.0
11+
- Added export of `F_PUBLISHER_SPECIFIC` constant to Python
12+
- Added explicit `Unset` variant for `SystemCode` and `ErrorCode`
13+
- Changed Python getters for enum fields to return the underlying type when no known variant can be found. As a result, these getters no longer raise an exception
14+
15+
#### Breaking changes
16+
- Removed support for Python 3.9 due to end of life
17+
318
## 0.64.0 - 2025-09-30
419

520
#### Enhancements
621
- Upgraded `databento-dbn` to 0.42.0
722
- Added `ts_index` and `pretty_ts_index` properties for records in Python which provides the timestamp that is most appropriate for indexing
823
- Fixed type stub for `channel_id` to allow None
924

25+
#### Enhancements
26+
- Reduced the log level of `SystemMsg` records in the `Live` client to debug
27+
- Increased the log level of `SystemMsg` records with the code `SystemCode.SLOW_READER_WARNING` to warning
28+
1029
#### Bug fixes
1130
- Fixed type hint for `start` parameter in `Live.subscribe()`
1231

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ You can find our full client API reference on the [Historical Reference](https:/
2828
[Examples](https://databento.com/docs/examples?historical=python&live=python) section for various tutorials and code samples.
2929

3030
## Requirements
31-
The library is fully compatible with the latest distribution of Anaconda 3.9 and above.
31+
The library is fully compatible with distributions of Anaconda 2023.x and above.
3232
The minimum dependencies as found in the `pyproject.toml` are also listed below:
33-
- python = "^3.9"
33+
- python = "^3.10"
3434
- aiohttp = "^3.8.3"
35-
- databento-dbn = "~0.42.0"
35+
- databento-dbn = "~0.43.0"
3636
- numpy = ">=1.23.5"
3737
- pandas = ">=1.5.3"
3838
- pip-system-certs = ">=4.0" (Windows only)

databento/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
from databento_dbn import UNDEF_STAT_QUANTITY
99
from databento_dbn import UNDEF_TIMESTAMP
1010
from databento_dbn import Action
11+
from databento_dbn import BBOMsg
1112
from databento_dbn import BidAskPair
13+
from databento_dbn import CBBOMsg
1214
from databento_dbn import CMBP1Msg
1315
from databento_dbn import Compression
1416
from databento_dbn import ConsolidatedBidAskPair
@@ -90,13 +92,15 @@
9092
"Action",
9193
"BBO1MMsg",
9294
"BBO1SMsg",
95+
"BBOMsg",
9396
"BentoClientError",
9497
"BentoError",
9598
"BentoHttpError",
9699
"BentoServerError",
97100
"BidAskPair",
98101
"CBBO1MMsg",
99102
"CBBO1SMsg",
103+
"CBBOMsg",
100104
"CMBP1Msg",
101105
"Compression",
102106
"ConsolidatedBidAskPair",

databento/common/dbnstore.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import logging
88
import warnings
99
import zoneinfo
10+
from collections.abc import Callable
1011
from collections.abc import Generator
1112
from collections.abc import Iterator
1213
from collections.abc import Mapping
@@ -18,7 +19,6 @@
1819
from typing import TYPE_CHECKING
1920
from typing import Any
2021
from typing import BinaryIO
21-
from typing import Callable
2222
from typing import Final
2323
from typing import Literal
2424
from typing import Protocol

databento/common/enums.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
from __future__ import annotations
22

3+
from collections.abc import Callable
34
from enum import Enum
45
from enum import Flag
56
from enum import IntFlag
67
from enum import unique
7-
from typing import Callable
88
from typing import TypeVar
99

1010

databento/common/parsing.py

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

3-
import warnings
43
from collections.abc import Iterable
54
from datetime import date
65
from datetime import datetime
@@ -277,13 +276,13 @@ def datetime_to_string(value: pd.Timestamp | datetime | date | str | int) -> str
277276
return pd.to_datetime(value).isoformat()
278277

279278

280-
def date_to_string(value: pd.Timestamp | date | str | int) -> str:
279+
def date_to_string(value: date | str) -> str:
281280
"""
282281
Return a valid date string from the given value.
283282
284283
Parameters
285284
----------
286-
value : pd.Timestamp, date, str, or int
285+
value : date or str
287286
The value to parse.
288287
289288
Returns
@@ -293,32 +292,10 @@ def date_to_string(value: pd.Timestamp | date | str | int) -> str:
293292
"""
294293
if isinstance(value, str):
295294
return value
296-
elif isinstance(value, date):
295+
elif type(value) is date:
297296
return value.isoformat()
298-
elif isinstance(value, int):
299-
warnings.warn(
300-
"Passing an int to `start_date` or `end_date` is deprecated and will be removed in v0.59.0."
301-
"Use a date or str instead.",
302-
DeprecationWarning,
303-
stacklevel=2,
304-
)
305-
return str(value)
306-
elif isinstance(value, pd.Timestamp):
307-
warnings.warn(
308-
"Passing a pandas Timestamp to `start_date` or `end_date` is deprecated and will be removed in v0.59.0."
309-
"Use a date or str instead.",
310-
DeprecationWarning,
311-
stacklevel=2,
312-
)
313-
return pd.to_datetime(value).date().isoformat()
314297
else:
315-
warnings.warn(
316-
f"Passing a {type(value)} to `start_date` or `end_date` is deprecated and will be removed in v0.59.0."
317-
"Use a date or str instead.",
318-
DeprecationWarning,
319-
stacklevel=2,
320-
)
321-
return pd.to_datetime(value).date().isoformat()
298+
raise TypeError(f"`{type(value)} is not supported. Only `date` and `str` are supported.")
322299

323300

324301
def optional_datetime_to_string(

databento/common/types.py

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,36 @@
11
import datetime as dt
2-
from typing import Callable
2+
from collections.abc import Callable
33
from typing import Generic
44
from typing import TypedDict
55
from typing import TypeVar
6-
from typing import Union
76

87
import databento_dbn
98
import pandas as pd
109

1110

12-
DBNRecord = Union[
13-
databento_dbn.BBOMsg,
14-
databento_dbn.CBBOMsg,
15-
databento_dbn.CMBP1Msg,
16-
databento_dbn.MBOMsg,
17-
databento_dbn.MBP1Msg,
18-
databento_dbn.MBP10Msg,
19-
databento_dbn.TradeMsg,
20-
databento_dbn.OHLCVMsg,
21-
databento_dbn.ImbalanceMsg,
22-
databento_dbn.InstrumentDefMsg,
23-
databento_dbn.InstrumentDefMsgV1,
24-
databento_dbn.InstrumentDefMsgV2,
25-
databento_dbn.StatMsg,
26-
databento_dbn.StatMsgV1,
27-
databento_dbn.StatusMsg,
28-
databento_dbn.SymbolMappingMsg,
29-
databento_dbn.SymbolMappingMsgV1,
30-
databento_dbn.SystemMsg,
31-
databento_dbn.SystemMsgV1,
32-
databento_dbn.ErrorMsg,
33-
databento_dbn.ErrorMsgV1,
34-
]
11+
DBNRecord = (
12+
databento_dbn.BBOMsg
13+
| databento_dbn.CBBOMsg
14+
| databento_dbn.CMBP1Msg
15+
| databento_dbn.MBOMsg
16+
| databento_dbn.MBP1Msg
17+
| databento_dbn.MBP10Msg
18+
| databento_dbn.TradeMsg
19+
| databento_dbn.OHLCVMsg
20+
| databento_dbn.ImbalanceMsg
21+
| databento_dbn.InstrumentDefMsg
22+
| databento_dbn.InstrumentDefMsgV1
23+
| databento_dbn.InstrumentDefMsgV2
24+
| databento_dbn.StatMsg
25+
| databento_dbn.StatMsgV1
26+
| databento_dbn.StatusMsg
27+
| databento_dbn.SymbolMappingMsg
28+
| databento_dbn.SymbolMappingMsgV1
29+
| databento_dbn.SystemMsg
30+
| databento_dbn.SystemMsgV1
31+
| databento_dbn.ErrorMsg
32+
| databento_dbn.ErrorMsgV1
33+
)
3534

3635
RecordCallback = Callable[[DBNRecord], None]
3736
ExceptionCallback = Callable[[Exception], None]

databento/historical/api/metadata.py

Lines changed: 12 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
@@ -19,6 +20,7 @@
1920
from databento.common.parsing import optional_datetime_to_string
2021
from databento.common.parsing import optional_symbols_list_to_list
2122
from databento.common.publishers import Dataset
23+
from databento.common.types import Default
2224
from databento.common.validation import validate_enum
2325
from databento.common.validation import validate_semantic_string
2426

@@ -399,7 +401,7 @@ def get_cost(
399401
dataset: Dataset | str,
400402
start: pd.Timestamp | datetime | date | str | int,
401403
end: pd.Timestamp | datetime | date | str | int | None = None,
402-
mode: FeedMode | str = "historical-streaming",
404+
mode: FeedMode | str | Default[None] = Default[None](None),
403405
symbols: Iterable[str | int] | str | int | None = None,
404406
schema: Schema | str = "trades",
405407
stype_in: SType | str = "raw_symbol",
@@ -425,8 +427,8 @@ def get_cost(
425427
Assumes UTC as timezone unless otherwise specified.
426428
If an integer is passed, then this represents nanoseconds since the UNIX epoch.
427429
Defaults to the forward filled value of `start` based on the resolution provided.
428-
mode : FeedMode or str {'live', 'historical-streaming', 'historical'}, default 'historical-streaming'
429-
The data feed mode for the request.
430+
mode : FeedMode or str {'live', 'historical-streaming', 'historical'}, default `None`
431+
The data feed mode for the request. This parameter has been deprecated.
430432
symbols : Iterable[str | int] or str or int, optional
431433
The instrument symbols to filter for. Takes up to 2,000 symbols per request.
432434
If 'ALL_SYMBOLS' or `None` then will select **all** symbols.
@@ -443,6 +445,13 @@ def get_cost(
443445
The cost in US dollars.
444446
445447
"""
448+
if not isinstance(mode, Default):
449+
warnings.warn(
450+
"The `mode` parameter is deprecated and will be removed in a future release.",
451+
DeprecationWarning,
452+
stacklevel=2,
453+
)
454+
446455
stype_in_valid = validate_enum(stype_in, SType, "stype_in")
447456
symbols_list = optional_symbols_list_to_list(symbols, stype_in_valid)
448457
data: dict[str, str | None] = {
@@ -453,7 +462,6 @@ def get_cost(
453462
"schema": str(validate_enum(schema, Schema, "schema")),
454463
"stype_in": str(stype_in_valid),
455464
"stype_out": str(SType.INSTRUMENT_ID),
456-
"mode": validate_enum(mode, FeedMode, "mode"),
457465
}
458466

459467
if limit is not None:

0 commit comments

Comments
 (0)