Skip to content

Commit

Permalink
feat(python): ensure backward compatibility for future=None
Browse files Browse the repository at this point in the history
  • Loading branch information
ruihe774 committed Jul 5, 2024
1 parent ea92723 commit 3bfc30b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions py-polars/polars/dataframe/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -3350,6 +3350,9 @@ def write_ipc(

if isinstance(future, Flavor):
future = future.value # type: ignore[assignment]
elif future is None:
# this is for backward compatibility
future = True # type: ignore[assignment]

if compression is None:
compression = "uncompressed"
Expand Down Expand Up @@ -3419,6 +3422,9 @@ def write_ipc_stream(

if isinstance(future, Flavor):
future = future.value # type: ignore[assignment]
elif future is None:
# this is for backward compatibility
future = True # type: ignore[assignment]

if compression is None:
compression = "uncompressed"
Expand Down

0 comments on commit 3bfc30b

Please sign in to comment.