Skip to content

Commit

Permalink
MOD: Upgrade databento-dbn to the latest
Browse files Browse the repository at this point in the history
  • Loading branch information
nmacholl committed Dec 17, 2024
1 parent f18c02a commit ea8f6eb
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 12 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.47.0 - TBD

#### Enhancements
- Upgraded `databento-dbn` to 0.25.0
- Added type aliases for `TBBOMsg`, `BBO1SMsg`, `BBO1MMsg`, `TCBBOMsg`, `CBBO1SMsg`,
`CBBO1MMsg` in Python
- Removed exports for `CBBOMsg` and `BBOMsg` in the root `databento` package in favor of aliased versions from `databento-dbn`

## 0.46.0 - 2024-12-10

#### Enhancements
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ The library is fully compatible with the latest distribution of Anaconda 3.9 and
The minimum dependencies as found in the `pyproject.toml` are also listed below:
- python = "^3.9"
- aiohttp = "^3.8.3"
- databento-dbn = "0.24.0"
- databento-dbn = "0.25.0"
- numpy= ">=1.23.5"
- pandas = ">=1.5.3"
- pip-system-certs = ">=4.0" (Windows only)
Expand Down
23 changes: 15 additions & 8 deletions databento/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import logging
import warnings

from databento_dbn import BBOMsg
from databento_dbn import CBBOMsg
from databento_dbn import CMBP1Msg
from databento_dbn import Compression
from databento_dbn import Encoding
from databento_dbn import ErrorMsg
Expand All @@ -21,6 +20,12 @@
from databento_dbn import SymbolMappingMsg
from databento_dbn import SystemMsg
from databento_dbn import TradeMsg
from databento_dbn.v2 import BBO1MMsg
from databento_dbn.v2 import BBO1SMsg
from databento_dbn.v2 import CBBO1MMsg
from databento_dbn.v2 import CBBO1SMsg
from databento_dbn.v2 import TBBOMsg
from databento_dbn.v2 import TCBBOMsg

from databento.common import API_VERSION
from databento.common import bentologging
Expand Down Expand Up @@ -50,18 +55,17 @@
from databento.version import __version__ # noqa


# Alias for convenience
TBBOMsg = MBP1Msg


__all__ = [
"API_VERSION",
"BBOMsg",
"BBO1MMsg",
"BBO1SMsg",
"BentoClientError",
"BentoError",
"BentoHttpError",
"BentoServerError",
"CBBOMsg",
"CBBO1MMsg",
"CBBO1SMsg",
"CMBP1Msg",
"Compression",
"DBNRecord",
"DBNStore",
Expand Down Expand Up @@ -96,6 +100,9 @@
"SymbolMappingMsg",
"SymbologyResolution",
"SystemMsg",
"TBBOMsg",
"TBBOMsg",
"TCBBOMsg",
"TradeMsg",
"Venue",
]
Expand Down
2 changes: 1 addition & 1 deletion databento/common/dbnstore.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ def __init__(self, data_source: DataSource) -> None:
def __iter__(self) -> Generator[DBNRecord, None, None]:
reader = self.reader
decoder = DBNDecoder(
upgrade_policy=VersionUpgradePolicy.UPGRADE,
upgrade_policy=VersionUpgradePolicy.UPGRADE_TO_V2,
)
while True:
raw = reader.read(DBNStore.DBN_READ_SIZE)
Expand Down
2 changes: 1 addition & 1 deletion databento/live/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def __init__(
self._heartbeat_interval_s = heartbeat_interval_s

self._dbn_decoder = databento_dbn.DBNDecoder(
upgrade_policy=VersionUpgradePolicy.UPGRADE,
upgrade_policy=VersionUpgradePolicy.UPGRADE_TO_V2,
)
self._gateway_decoder = GatewayDecoder()

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ aiohttp = [
{version = "^3.8.3", python = "<3.12"},
{version = "^3.9.0", python = "^3.12"}
]
databento-dbn = "0.24.0"
databento-dbn = "0.25.0"
numpy = [
{version = ">=1.23.5", python = "<3.12"},
{version = ">=1.26.0", python = "^3.12"}
Expand Down

0 comments on commit ea8f6eb

Please sign in to comment.