Commit 8c1adc0
committed
### What changes were proposed in this pull request?
This PR is a follow-up of the following to fix `connectutils.py` to import `pb2` conditionally.
- #52894
### Why are the changes needed?
Currently, Python CIs are broken like the following.
- https://github.com/apache/spark/actions/workflows/build_python_3.11_classic_only.yml
- https://github.com/apache/spark/actions/runs/19316448951/job/55248810741
- https://github.com/apache/spark/actions/workflows/build_python_3.12.yml
- https://github.com/apache/spark/actions/runs/19275741458/job/55212353468
```
File "/__w/spark/spark/python/pyspark/testing/connectutils.py", line 26, in <module>
import pyspark.sql.connect.proto as pb2
File "/__w/spark/spark/python/pyspark/sql/connect/proto/__init__.py", line 18, in <module>
from pyspark.sql.connect.proto.base_pb2_grpc import *
File "/__w/spark/spark/python/pyspark/sql/connect/proto/base_pb2_grpc.py", line 19, in <module>
import grpc
ModuleNotFoundError: No module named 'grpc'
```
### Does this PR introduce _any_ user-facing change?
No behavior change. We has been importing `pyspark.sql.connect` conditionally before #52894 .
### How was this patch tested?
Pass the CIs and manual test.
### Was this patch authored or co-authored using generative AI tooling?
No.
Closes #53037 from dongjoon-hyun/SPARK-54194.
Authored-by: Dongjoon Hyun <dongjoon@apache.org>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
(cherry picked from commit 63bcc87)
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
1 parent 6320540 commit 8c1adc0
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | 26 | | |
28 | 27 | | |
29 | 28 | | |
| |||
53 | 52 | | |
54 | 53 | | |
55 | 54 | | |
| 55 | + | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| |||
0 commit comments