Commit 2ffff39
committed
fix: restore cleanup of SPARK_LOCAL_IP and PYARROW_IGNORE_TIMEZONE after import
PR #2123 removed the `finally` block that cleaned up environment
variables set temporarily for importing `pyspark.pandas`. This causes
SPARK_LOCAL_IP=127.0.0.1 to persist in os.environ, breaking
non-YARN distributed Spark setups where executors need to connect
to the actual driver IP instead of localhost.
Restores the pre-v0.27.0 behavior: set env vars temporarily, import
pyspark.pandas, then clean up.
Fixes #23441 parent 53e3a50 commit 2ffff39
1 file changed
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
9 | 12 | | |
10 | 13 | | |
11 | 14 | | |
| |||
14 | 17 | | |
15 | 18 | | |
16 | 19 | | |
| 20 | + | |
17 | 21 | | |
18 | 22 | | |
| 23 | + | |
19 | 24 | | |
20 | 25 | | |
21 | 26 | | |
22 | 27 | | |
23 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
0 commit comments