This is an automated email from the ASF dual-hosted git repository.
gurwls223 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push:
new 8d99e646e98 [MINOR][PYTHON] Remove deprecated use of typing.io
8d99e646e98 is described below
commit 8d99e646e983ac1ccb383acf35dcbec745219146
Author: Shantanu <[email protected]>
AuthorDate: Mon May 8 10:47:00 2023 +0900
[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
https://github.com/python/cpython/issues/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 #41084 from hauntsaninja/patch-1.
Authored-by: Shantanu <[email protected]>
Signed-off-by: Hyukjin Kwon <[email protected]>
---
python/pyspark/broadcast.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/python/pyspark/broadcast.py b/python/pyspark/broadcast.py
index a72bf1e059b..605663a2204 100644
--- a/python/pyspark/broadcast.py
+++ b/python/pyspark/broadcast.py
@@ -24,6 +24,7 @@ import pickle
from typing import (
overload,
Any,
+ BinaryIO,
Callable,
Dict,
Generic,
@@ -35,7 +36,6 @@ from typing import (
TYPE_CHECKING,
Union,
)
-from typing.io import BinaryIO # type: ignore[import]
from pyspark.java_gateway import local_connect_and_auth
from pyspark.serializers import ChunkedStream, pickle_protocol
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]