Skip to content

Commit 779c0ef

Browse files
committed
DEL: Remove pretty_px option from DBNStore.to_df
1 parent d04a57b commit 779c0ef

File tree

3 files changed

+6
-26
lines changed

3 files changed

+6
-26
lines changed

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Changelog
22

3-
## 0.24.2 - TBD
3+
## 0.25.0 - TBD
4+
5+
#### Breaking changes
6+
- Removed deprecated `pretty_px` parameter for `DBNStore.to_df`; `price_type` can be used instead
47

58
#### Bug fixes
69
- Fixed an issue where the `Live` client would not raise an exception when reading an incompatible DBN version

databento/common/dbnstore.py

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import decimal
55
import itertools
66
import logging
7-
import warnings
87
from collections.abc import Generator
98
from collections.abc import Iterator
109
from io import BytesIO
@@ -826,7 +825,6 @@ def to_csv(
826825
@overload
827826
def to_df(
828827
self,
829-
pretty_px: bool | None = ...,
830828
price_type: Literal["fixed", "float", "decimal"] = ...,
831829
pretty_ts: bool = ...,
832830
map_symbols: bool = ...,
@@ -838,7 +836,6 @@ def to_df(
838836
@overload
839837
def to_df(
840838
self,
841-
pretty_px: bool | None = ...,
842839
price_type: Literal["fixed", "float", "decimal"] = ...,
843840
pretty_ts: bool = ...,
844841
map_symbols: bool = ...,
@@ -849,7 +846,6 @@ def to_df(
849846

850847
def to_df(
851848
self,
852-
pretty_px: bool | None = None,
853849
price_type: Literal["fixed", "float", "decimal"] = "float",
854850
pretty_ts: bool = True,
855851
map_symbols: bool = True,
@@ -861,11 +857,6 @@ def to_df(
861857
862858
Parameters
863859
----------
864-
pretty_px : bool, default True
865-
This parameter is deprecated and will be removed in a future release.
866-
If all price columns should be converted from `int` to `float` at
867-
the correct scale (using the fixed-precision scalar 1e-9). Null
868-
prices are replaced with NaN.
869860
price_type : str, default "float"
870861
The price type to use for price fields.
871862
If "fixed", prices will have a type of `int` in fixed decimal format; each unit representing 1e-9 or 0.000000001.
@@ -899,20 +890,6 @@ def to_df(
899890
If the schema for the array cannot be determined.
900891
901892
"""
902-
if pretty_px is True:
903-
warnings.warn(
904-
'The argument `pretty_px` is deprecated and will be removed in a future release; `price_type="float"` can be used instead.',
905-
DeprecationWarning,
906-
stacklevel=2,
907-
)
908-
elif pretty_px is False:
909-
price_type = "fixed"
910-
warnings.warn(
911-
'The argument `pretty_px` is deprecated and will be removed in a future release; `price_type="fixed"` can be used instead.',
912-
DeprecationWarning,
913-
stacklevel=2,
914-
)
915-
916893
schema = validate_maybe_enum(schema, Schema, "schema")
917894
if schema is None:
918895
if self.schema is None:

tests/test_historical_bento.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ def test_to_df_with_mbo_data_returns_expected_record(
292292
# Act
293293
df = data.to_df(
294294
pretty_ts=False,
295-
pretty_px=False,
295+
price_type="fixed",
296296
map_symbols=False,
297297
)
298298

@@ -324,7 +324,7 @@ def test_to_df_with_stub_ohlcv_data_returns_expected_record(
324324
# Act
325325
df = data.to_df(
326326
pretty_ts=False,
327-
pretty_px=False,
327+
price_type="fixed",
328328
map_symbols=False,
329329
)
330330

0 commit comments

Comments
 (0)