Skip to content

Commit ff6ee19

Browse files
hauntsaninjaLuciferYang
authored andcommitted
[MINOR][PYTHON] Remove deprecated use of typing.io
### What changes were proposed in this pull request? Use `typing.BinaryIO` instead of `typing.io.BinaryIO`. The latter is deprecated and had questionable type checker support, see python/cpython#92871 ### Why are the changes needed? So Spark is unaffected when `typing.io` is removed in Python 3.13 ### Does this PR introduce any user-facing change? No ### How was this patch tested? Existing unit tests / every import of this module Closes apache#41084 from hauntsaninja/patch-1. Authored-by: Shantanu <[email protected]> Signed-off-by: Hyukjin Kwon <[email protected]>
1 parent f6e31e4 commit ff6ee19

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/pyspark/broadcast.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
from typing import (
2525
overload,
2626
Any,
27+
BinaryIO,
2728
Callable,
2829
Dict,
2930
Generic,
@@ -35,7 +36,6 @@
3536
TYPE_CHECKING,
3637
Union,
3738
)
38-
from typing.io import BinaryIO # type: ignore[import]
3939

4040
from pyspark.java_gateway import local_connect_and_auth
4141
from pyspark.serializers import ChunkedStream, pickle_protocol

0 commit comments

Comments
 (0)