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 73de7ccc8314 [SPARK-52419][PYTHON][TESTS] Make Python Connect tests
work with NumPy 2.3.0
73de7ccc8314 is described below
commit 73de7ccc8314a00e300561e421a5ecbec0f1b0f5
Author: Hyukjin Kwon <[email protected]>
AuthorDate: Sun Jun 8 21:48:22 2025 -0700
[SPARK-52419][PYTHON][TESTS] Make Python Connect tests work with NumPy 2.3.0
### What changes were proposed in this pull request?
This PR proposes to skip a type definition test with NumPy 2.3 for now.
### Why are the changes needed?
To fix the build for Python Connect client
(https://github.com/apache/spark/actions/runs/15521622757/job/43695591595). It
fails after NumPy got upgraded to 2.3.0.
### Does this PR introduce _any_ user-facing change?
No, test-only.
### How was this patch tested?
Manually.
### Was this patch authored or co-authored using generative AI tooling?
No.
Closes #51120 from HyukjinKwon/SPARK-52419.
Authored-by: Hyukjin Kwon <[email protected]>
Signed-off-by: Hyukjin Kwon <[email protected]>
---
python/pyspark/pandas/tests/test_typedef.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/python/pyspark/pandas/tests/test_typedef.py
b/python/pyspark/pandas/tests/test_typedef.py
index cac9aaf193a0..329af01a3944 100644
--- a/python/pyspark/pandas/tests/test_typedef.py
+++ b/python/pyspark/pandas/tests/test_typedef.py
@@ -313,7 +313,6 @@ class TypeHintTestsMixin:
def test_as_spark_type_pandas_on_spark_dtype(self):
type_mapper = {
# binary
- np.character: (np.character, BinaryType()),
np.bytes_: (np.bytes_, BinaryType()),
bytes: (np.bytes_, BinaryType()),
# integer
@@ -347,6 +346,9 @@ class TypeHintTestsMixin:
LongType(),
),
}
+ if LooseVersion(np.__version__) < LooseVersion("2.3"):
+ # binary
+ type_mapper.update({np.character: (np.character, BinaryType())})
for numpy_or_python_type, (dtype, spark_type) in type_mapper.items():
self.assertEqual(as_spark_type(numpy_or_python_type), spark_type)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]