Skip to content

Commit deb029e

Browse files
authored
VER: Release 0.46.0
See release notes.
2 parents d073957 + f18c02a commit deb029e

File tree

9 files changed

+46
-61
lines changed

9 files changed

+46
-61
lines changed

CHANGELOG.md

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

3+
## 0.46.0 - 2024-12-10
4+
5+
#### Enhancements
6+
- Removed deprecated `packaging` parameter from `Historical.batch.submit_job`. Job files can be downloaded individually or as zip files after the job completes
7+
- Upgraded `databento-dbn` to 0.24.0
8+
- Added handling for `UNDEF_TIMESTAMP` in `pretty_` timestamp getters for Python. They now return `None` in the case of `UNDEF_TIMESTAMP`
9+
310
## 0.45.0 - 2024-11-12
411

512
This release adds support for Python v3.13.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ The library is fully compatible with the latest distribution of Anaconda 3.9 and
3232
The minimum dependencies as found in the `pyproject.toml` are also listed below:
3333
- python = "^3.9"
3434
- aiohttp = "^3.8.3"
35-
- databento-dbn = "0.23.1"
35+
- databento-dbn = "0.24.0"
3636
- numpy= ">=1.23.5"
3737
- pandas = ">=1.5.3"
3838
- pip-system-certs = ">=4.0" (Windows only)

databento/__init__.py

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -56,49 +56,48 @@
5656

5757
__all__ = [
5858
"API_VERSION",
59-
"DBNStore",
60-
"DBNRecord",
59+
"BBOMsg",
6160
"BentoClientError",
6261
"BentoError",
6362
"BentoHttpError",
6463
"BentoServerError",
64+
"CBBOMsg",
6565
"Compression",
66-
"Publisher",
66+
"DBNRecord",
67+
"DBNStore",
6768
"Dataset",
68-
"Venue",
6969
"Delivery",
7070
"Encoding",
71+
"ErrorMsg",
7172
"FeedMode",
72-
"RecordFlags",
7373
"Historical",
7474
"HistoricalGateway",
75+
"ImbalanceMsg",
76+
"InstrumentDefMsg",
7577
"InstrumentMap",
7678
"Live",
77-
"Reference",
79+
"MBOMsg",
80+
"MBP1Msg",
81+
"MBP10Msg",
82+
"Metadata",
83+
"OHLCVMsg",
7884
"Packaging",
85+
"Publisher",
7986
"ReconnectPolicy",
87+
"RecordFlags",
88+
"Reference",
8089
"RollRule",
90+
"SType",
8191
"Schema",
8292
"SplitDuration",
83-
"StatType",
84-
"SType",
85-
"SymbologyResolution",
86-
# DBN Record Types
87-
"Metadata",
88-
"BBOMsg",
89-
"CBBOMsg",
90-
"ErrorMsg",
91-
"ImbalanceMsg",
92-
"InstrumentDefMsg",
93-
"MBOMsg",
94-
"MBP1Msg",
95-
"MBP10Msg",
96-
"OHLCVMsg",
9793
"StatMsg",
94+
"StatType",
9895
"StatusMsg",
9996
"SymbolMappingMsg",
97+
"SymbologyResolution",
10098
"SystemMsg",
10199
"TradeMsg",
100+
"Venue",
102101
]
103102

104103
# Setup logging

databento/common/dbnstore.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1331,7 +1331,7 @@ def __init__(
13311331
count: int | None = None,
13321332
) -> None:
13331333
self._reader = reader
1334-
self._dtype = np.dtype(dtype)
1334+
self._dtype: np.typing.DTypeLike = np.dtype(dtype)
13351335
self._offset = offset
13361336
self._count = count
13371337
self._close_on_next = False

databento/historical/api/batch.py

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,7 @@
2727
from databento.common import API_VERSION
2828
from databento.common.constants import HTTP_STREAMING_READ_SIZE
2929
from databento.common.enums import Delivery
30-
from databento.common.enums import Packaging
3130
from databento.common.enums import SplitDuration
32-
from databento.common.error import BentoDeprecationWarning
3331
from databento.common.error import BentoError
3432
from databento.common.error import BentoHttpError
3533
from databento.common.error import BentoWarning
@@ -40,7 +38,6 @@
4038
from databento.common.parsing import optional_values_list_to_string
4139
from databento.common.parsing import symbols_list_to_list
4240
from databento.common.publishers import Dataset
43-
from databento.common.types import Default
4441
from databento.common.validation import validate_enum
4542
from databento.common.validation import validate_path
4643
from databento.common.validation import validate_semantic_string
@@ -75,7 +72,6 @@ def submit_job(
7572
split_symbols: bool = False,
7673
split_duration: SplitDuration | str = "day",
7774
split_size: int | None = None,
78-
packaging: Packaging | str | None = Default(None), # type: ignore [assignment]
7975
delivery: Delivery | str = "download",
8076
stype_in: SType | str = "raw_symbol",
8177
stype_out: SType | str = "instrument_id",
@@ -127,8 +123,6 @@ def submit_job(
127123
split_size : int, optional
128124
The maximum size (bytes) of each batched data file before being split.
129125
Must be an integer between 1e9 and 10e9 inclusive (1GB - 10GB).
130-
packaging : Packaging or str {'none', 'zip', 'tar'}, optional
131-
The archive type to package all batched data files in.
132126
delivery : Delivery or str {'download', 's3', 'disk'}, default 'download'
133127
The delivery mechanism for the processed batched data files.
134128
stype_in : SType or str, default 'raw_symbol'
@@ -151,14 +145,6 @@ def submit_job(
151145
stype_in_valid = validate_enum(stype_in, SType, "stype_in")
152146
symbols_list = symbols_list_to_list(symbols, stype_in_valid)
153147

154-
if isinstance(packaging, Default):
155-
packaging = packaging.value
156-
else:
157-
warnings.warn(
158-
message="The `packaging` parameter is deprecated and will be removed in a future release.",
159-
category=BentoDeprecationWarning,
160-
)
161-
162148
data: dict[str, object | None] = {
163149
"dataset": validate_semantic_string(dataset, "dataset"),
164150
"start": datetime_to_string(start),
@@ -178,9 +164,6 @@ def submit_job(
178164
"split_duration": str(
179165
validate_enum(split_duration, SplitDuration, "split_duration"),
180166
),
181-
"packaging": (
182-
str(validate_enum(packaging, Packaging, "packaging")) if packaging else None
183-
),
184167
"delivery": str(validate_enum(delivery, Delivery, "delivery")),
185168
}
186169

databento/version.py

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

pyproject.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "databento"
3-
version = "0.45.0"
3+
version = "0.46.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.23.1"
35+
databento-dbn = "0.24.0"
3636
numpy = [
3737
{version = ">=1.23.5", python = "<3.12"},
3838
{version = ">=1.26.0", python = "^3.12"}
@@ -73,6 +73,7 @@ no_strict_optional = true
7373
warn_no_return = true
7474
warn_unused_configs = true
7575
warn_unused_ignores = true
76+
plugins = ["numpy.typing.mypy_plugin"]
7677

7778
[tool.pytest.ini_options]
7879
testpaths = ["tests"]

scripts/lint.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
#!/usr/bin/env bash
2-
echo $(mypy --version)
3-
echo Running mypy...
4-
poetry run mypy databento examples tests
2+
echo "Running $(poetry run mypy --version)..."
3+
poetry run mypy .

tests/test_historical_batch.py

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import databento as db
66
import pytest
77
import requests
8-
from databento.common.error import BentoDeprecationWarning
98
from databento.historical.client import Historical
109

1110

@@ -64,20 +63,18 @@ def test_batch_submit_job_sends_expected_request(
6463
monkeypatch.setattr(requests, "post", mocked_post := MagicMock())
6564

6665
# Act
67-
with pytest.warns(BentoDeprecationWarning):
68-
historical_client.batch.submit_job(
69-
dataset="GLBX.MDP3",
70-
symbols="ESH1",
71-
schema="trades",
72-
start="2020-12-28T12:00",
73-
end="2020-12-29",
74-
encoding="csv",
75-
split_duration="day",
76-
split_size=10000000000,
77-
packaging="none",
78-
delivery="download",
79-
compression="zstd",
80-
)
66+
historical_client.batch.submit_job(
67+
dataset="GLBX.MDP3",
68+
symbols="ESH1",
69+
schema="trades",
70+
start="2020-12-28T12:00",
71+
end="2020-12-29",
72+
encoding="csv",
73+
split_duration="day",
74+
split_size=10000000000,
75+
delivery="download",
76+
compression="zstd",
77+
)
8178

8279
# Assert
8380
call = mocked_post.call_args.kwargs
@@ -100,7 +97,6 @@ def test_batch_submit_job_sends_expected_request(
10097
"map_symbols": False,
10198
"split_symbols": False,
10299
"split_duration": "day",
103-
"packaging": "none",
104100
"delivery": "download",
105101
"split_size": "10000000000",
106102
}

0 commit comments

Comments
 (0)