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 256a23883d90 [SPARK-48232][PYTHON][TESTS] Fix 
'pyspark.sql.tests.connect.test_connect_session' in Python 3.12 build
256a23883d90 is described below

commit 256a23883d901c78cf82b4c52e3373322309b8d1
Author: Hyukjin Kwon <gurwls...@apache.org>
AuthorDate: Fri May 10 17:12:37 2024 +0900

    [SPARK-48232][PYTHON][TESTS] Fix 
'pyspark.sql.tests.connect.test_connect_session' in Python 3.12 build
    
    ### What changes were proposed in this pull request?
    
    This PR avoids importing `scipy.sparse` directly which hangs 
indeterministically specifically with Python 3.12
    
    ### Why are the changes needed?
    
    To fix the build with Python 3.12 
https://github.com/apache/spark/actions/runs/9022174253/job/24804919747
    I was able to reproduce this in my local but a bit indeterministic.
    
    ### Does this PR introduce _any_ user-facing change?
    
    No, test-only.
    
    ### How was this patch tested?
    
    Manually tested in my local.
    
    ### Was this patch authored or co-authored using generative AI tooling?
    
    No.
    
    Closes #46522 from HyukjinKwon/SPARK-48232.
    
    Authored-by: Hyukjin Kwon <gurwls...@apache.org>
    Signed-off-by: Hyukjin Kwon <gurwls...@apache.org>
---
 python/pyspark/testing/utils.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/python/pyspark/testing/utils.py b/python/pyspark/testing/utils.py
index fe25136864ee..8a7aa405e4ac 100644
--- a/python/pyspark/testing/utils.py
+++ b/python/pyspark/testing/utils.py
@@ -38,7 +38,7 @@ from itertools import zip_longest
 have_scipy = False
 have_numpy = False
 try:
-    import scipy.sparse  # noqa: F401
+    import scipy  # noqa: F401
 
     have_scipy = True
 except ImportError:


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org

Reply via email to