Skip to content

Commit 4f96ab4

Browse files
authored
VER: Release 0.35.0
2 parents 6abedc7 + c76aadd commit 4f96ab4

File tree

104 files changed

+3833
-2891
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+3833
-2891
lines changed

CHANGELOG.md

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

3+
## 0.35.0 - 2025-05-28
4+
This version marks the release of DBN version 3 (DBNv3), which is the new default.
5+
Decoders support decoding all versions of DBN and the DBN encoders default to
6+
upgrading the input to DBNv3.
7+
8+
### Enhancements
9+
- Added a new `UpgradeToV3` `VersionUpgradePolicy` variant
10+
- Consolidated DBN decoding logic in a new sans-I/O style state machine. All existing
11+
decoders now use `DbnFsm` internally
12+
- Added an internal buffer to DBN decoders so wrapping the reader in a `BufReader` is no
13+
longer recommended
14+
- Added `with_upgrade_policy()` construction methods to `MetadataDecoder` and
15+
`AsyncMetadataDecoder` to match other decoders
16+
- Implemented conversion from `RecordRef` to `IoSlice` for use with
17+
`Write::write_vectored`
18+
- Improved performance of the Python `DBNDecoder` by batching acquisition of the GIL for
19+
multiple records
20+
- Added `version()` setter to `CsvEncoderBuilder` to configure the output version
21+
- Upgraded `pyo3` version to 0.25.0
22+
23+
### Breaking changes
24+
- Release of DBN version 3
25+
- Definition schema:
26+
- Updated `InstrumentDefMsg` with new `leg_` fields to support multi-leg strategy
27+
definitions.
28+
- Expanded `asset` to 11 bytes and `ASSET_CSTR_LEN` to match
29+
- Expanded `raw_instrument_id` to 64 bits to support more venues. Like other 64-bit
30+
integer fields, its value will now be quoted in JSON
31+
- Removed `trading_reference_date`, `trading_reference_price`, and
32+
`settl_price_type` fields which will be normalized in the statistics schema
33+
- Removed `md_security_trading_status` better served by the status schema
34+
- Statistics schema:
35+
- Updated `StatMsg` has an expanded 64-bit `quantity` field. Like other 64-bit
36+
integer fields, its value will now be quoted in JSON
37+
- The previous `StatMsg` has been moved to `v2::StatMsg` or `StatMsgV2`
38+
- Changed the default `VersionUpgradePolicy` to `UpgradeToV3`
39+
- Metadata will now always be encoded with a length divisible by 8 bytes for better
40+
alignment
41+
- Version 1 and 2 structs can be converted to version 3 structs with the `From` trait
42+
- Added a `version` parameter to the `encode_header_for_schema()` method on `CsvEncoder`
43+
and `DynEncoder` to handle change in definition schema fields between versions
44+
- Changed the return type of `DbnDecoder::from_file` and `AsyncDbnDecoder::from_file` to
45+
no longer include a `BufReader`
46+
- The `set_upgrade_policy()` methods on `DbnDecoder`, `AsyncDbnDecoder`,
47+
`DbnRecordDecoder`, `AsyncDbnRecordDecoder` now return a `Result`
48+
- Removed `compat::decode_record_ref`. It's recommended to use `DbnFsm` or the decoders
49+
directly
50+
- Updated the minimum supported `tokio` version to 1.38, which was released one year ago
51+
52+
### Bug fixes
53+
- Fixed conversion of `v1::StatMsg` to `v3::StatMsg`
54+
- Changed default `upgrade_policy` of synchronous `DbnRecord`
55+
- Fixed Python `Transcoder` not writing CSV header when `has_metadata=False`
56+
- Removed incorrect `sequence` and `depth` Python type stubs for `CMBP1Msg` and `CBBOMsg`
57+
- Fixed missing export of `Mbp1Msg` and `Mbp10Msg` from `v1`, `v2`, and `v3` modules
58+
359
## 0.34.0 - 2025-05-13
460

561
### Enhancements

Cargo.lock

Lines changed: 33 additions & 32 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,16 @@ resolver = "2"
1111
[workspace.package]
1212
authors = ["Databento <[email protected]>"]
1313
edition = "2021"
14-
version = "0.34.0"
14+
version = "0.35.0"
1515
documentation = "https://databento.com/docs"
1616
repository = "https://github.com/databento/dbn"
1717
license = "Apache-2.0"
1818

1919
[workspace.dependencies]
2020
anyhow = "1.0.98"
2121
csv = "1.3"
22-
pyo3 = "0.24.2"
23-
pyo3-build-config = "0.24.2"
22+
pyo3 = "0.25.0"
23+
pyo3-build-config = "0.25.0"
2424
rstest = "0.25.0"
2525
serde = { version = "1.0", features = ["derive"] }
2626
time = "0.3.41"

c/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ dbn = { path = "../rust/dbn", features = [] }
1919
libc = "0.2.172"
2020

2121
[build-dependencies]
22-
cbindgen = { version = "0.28.0", default-features = false }
22+
cbindgen = { version = "0.29.0", default-features = false }

c/cbindgen.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ renaming_overrides_prefixing = true
1515
"FILE" = "FILE"
1616
# Workaround for cbindgen not understanding constants defined in terms of other constants
1717
"SYMBOL_CSTR_LEN_V2" = "DbnSYMBOL_CSTR_LEN"
18+
"ASSET_CSTR_LEN" = "DbnASSET_CSTR_LEN_V3"
1819

1920
[enum]
2021
prefix_with_name = true

c/src/compat.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use dbn::{
22
compat::{
3-
ErrorMsgV1, InstrumentDefMsgV1, InstrumentDefMsgV3, StatMsgV3, SymbolMappingMsgV1,
3+
ErrorMsgV1, InstrumentDefMsgV1, InstrumentDefMsgV2, StatMsgV1, SymbolMappingMsgV1,
44
SystemMsgV1,
55
},
66
ErrorMsg, InstrumentDefMsg, StatMsg, SymbolMappingMsg, SystemMsg,
@@ -14,26 +14,26 @@ pub extern "C" fn from_error_v1_to_v2(def_v1: &ErrorMsgV1) -> ErrorMsg {
1414

1515
/// Converts an V1 InstrumentDefMsg to V2.
1616
#[no_mangle]
17-
pub extern "C" fn from_instrument_def_v1_to_v2(def_v1: &InstrumentDefMsgV1) -> InstrumentDefMsg {
18-
InstrumentDefMsg::from(def_v1)
17+
pub extern "C" fn from_instrument_def_v1_to_v2(def_v1: &InstrumentDefMsgV1) -> InstrumentDefMsgV2 {
18+
InstrumentDefMsgV2::from(def_v1)
1919
}
2020

2121
/// Converts a V1 InstrumentDefMsg to V3.
2222
#[no_mangle]
23-
pub extern "C" fn from_instrument_def_v1_to_v3(def_v1: &InstrumentDefMsgV1) -> InstrumentDefMsgV3 {
24-
InstrumentDefMsgV3::from(def_v1)
23+
pub extern "C" fn from_instrument_def_v1_to_v3(def_v1: &InstrumentDefMsgV1) -> InstrumentDefMsg {
24+
InstrumentDefMsg::from(def_v1)
2525
}
2626

2727
/// Converts a V2 InstrumentDefMsg to V3.
2828
#[no_mangle]
29-
pub extern "C" fn from_instrument_def_v2_to_v3(def_v2: &InstrumentDefMsg) -> InstrumentDefMsgV3 {
30-
InstrumentDefMsgV3::from(def_v2)
29+
pub extern "C" fn from_instrument_def_v2_to_v3(def_v2: &InstrumentDefMsgV2) -> InstrumentDefMsg {
30+
InstrumentDefMsg::from(def_v2)
3131
}
3232

3333
/// Converts a V1 StatMsg to V3.
3434
#[no_mangle]
35-
pub extern "C" fn from_stat_v1_to_v3(stat_v1: &StatMsg) -> StatMsgV3 {
36-
StatMsgV3::from(stat_v1)
35+
pub extern "C" fn from_stat_v1_to_v3(stat_v1: &StatMsgV1) -> StatMsg {
36+
StatMsg::from(stat_v1)
3737
}
3838

3939
/// Converts an V1 SymbolMappingMsg to V2.

python/Cargo.toml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,12 @@ name = "databento_dbn" # Python modules can't contain dashes
1414

1515
[dependencies]
1616
dbn = { path = "../rust/dbn", features = ["python"] }
17-
pyo3 = { workspace = true }
18-
time = { workspace = true }
17+
pyo3.workspace = true
18+
time.workspace = true
1919

2020
[build-dependencies]
21-
pyo3-build-config = { workspace = true }
21+
pyo3-build-config.workspace = true
2222

2323
[dev-dependencies]
24-
rstest = { workspace = true }
24+
rstest.workspace = true
25+
zstd.workspace = true

python/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-dbn"
3-
version = "0.34.0"
3+
version = "0.35.0"
44
description = "Python bindings for encoding and decoding Databento Binary Encoding (DBN)"
55
authors = ["Databento <[email protected]>"]
66
license = "Apache-2.0"
@@ -17,7 +17,7 @@ build-backend = "maturin"
1717

1818
[project]
1919
name = "databento-dbn"
20-
version = "0.34.0"
20+
version = "0.35.0"
2121
authors = [
2222
{ name = "Databento", email = "[email protected]" }
2323
]

0 commit comments

Comments
 (0)