Skip to content

Commit ec3c75a

Browse files
authored
VER: Release 0.52.0
See release notes.
2 parents 7678240 + 4babf5f commit ec3c75a

Some content is hidden

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

50 files changed

+63
-31
lines changed

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ jobs:
3232
- name: Test (release)
3333
timeout-minutes: 3
3434
if: ${{ github.ref == 'refs/heads/main' }}
35-
run: scripts/test.sh --release
35+
run: scripts/test.sh -vvv --release
3636
shell: bash
3737

3838
- name: Test
3939
timeout-minutes: 3
4040
if: ${{ github.ref != 'refs/heads/main' }}
41-
run: scripts/test.sh
41+
run: scripts/test.sh -vvv
4242
shell: bash

CHANGELOG.md

Lines changed: 10 additions & 0 deletions

README.md

Lines changed: 1 addition & 1 deletion

databento/common/dbnstore.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1335,7 +1335,7 @@ def __init__(
13351335
count: int | None = None,
13361336
) -> None:
13371337
self._reader = reader
1338-
self._dtype: np.typing.DTypeLike = np.dtype(dtype)
1338+
self._dtype: np.dtype[Any] = np.dtype(dtype)
13391339
self._offset = offset
13401340
self._count = count
13411341
self._close_on_next = False

databento/live/gateway.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ class SubscriptionRequest(GatewayControl):
132132
symbols: str
133133
start: int | None = None
134134
snapshot: int = 0
135+
id: int | None = None
135136

136137

137138
@dataclasses.dataclass

databento/live/protocol.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,7 @@ def subscribe(
284284
stype_in: SType | str = SType.RAW_SYMBOL,
285285
start: str | int | None = None,
286286
snapshot: bool = False,
287+
subscription_id: int | None = None,
287288
) -> list[SubscriptionRequest]:
288289
"""
289290
Send a SubscriptionRequest to the gateway. Returns a list of all
@@ -302,6 +303,8 @@ def subscribe(
302303
within 24 hours.
303304
snapshot: bool, default to 'False'
304305
Request subscription with snapshot. The `start` parameter must be `None`.
306+
subscription_id : int, optional
307+
A numerical identifier to associate with this subscription.
305308
306309
Returns
307310
-------
@@ -329,6 +332,7 @@ def subscribe(
329332
symbols=batch_str,
330333
start=optional_datetime_to_unix_nanoseconds(start),
331334
snapshot=int(snapshot),
335+
id=subscription_id,
332336
)
333337
subscriptions.append(message)
334338

databento/live/session.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,7 @@ def __init__(
332332
self._transport: asyncio.Transport | None = None
333333
self._session_id: str | None = None
334334

335+
self._subscription_counter = 0
335336
self._subscriptions: list[SubscriptionRequest] = []
336337
self._reconnect_policy = ReconnectPolicy(reconnect_policy)
337338
self._reconnect_task: asyncio.Task[None] | None = None
@@ -499,13 +500,15 @@ def subscribe(
499500
if self._protocol is None:
500501
self._connect(dataset=dataset)
501502

503+
self._subscription_counter += 1
502504
self._subscriptions.extend(
503505
self._protocol.subscribe(
504506
schema=schema,
505507
symbols=symbols,
506508
stype_in=stype_in,
507509
start=start,
508510
snapshot=snapshot,
511+
subscription_id=self._subscription_counter,
509512
),
510513
)
511514

@@ -672,6 +675,7 @@ async def _reconnect(self) -> None:
672675
stype_in=sub.stype_in,
673676
snapshot=bool(sub.snapshot),
674677
start=None,
678+
subscription_id=sub.id,
675679
)
676680

677681
if should_restart:

databento/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.51.0"
1+
__version__ = "0.52.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.51.0"
3+
version = "0.52.0"
44
description = "Official Python client library for Databento"
55
authors = [
66
"Databento <support@databento.com>",
@@ -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.31.0"
35+
databento-dbn = "0.32.0"
3636
numpy = [
3737
{version = ">=1.23.5", python = "<3.12"},
3838
{version = ">=1.26.0", python = "^3.12"}
-363 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)