You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by ru...@apache.org on 2025/08/12 23:45:56 UTC
(spark) branch master updated: [SPARK-53257][PYTHON][TESTS] Deduplicate have_graphviz and graphviz_requirement_message
This is an automated email from the ASF dual-hosted git repository.
ruifengz 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 19c8f90bbbff [SPARK-53257][PYTHON][TESTS] Deduplicate have_graphviz and graphviz_requirement_message
19c8f90bbbff is described below
commit 19c8f90bbbff7aecc47a4b1940bbd572623c3218
Author: Ruifeng Zheng <ru...@apache.org>
AuthorDate: Wed Aug 13 07:45:42 2025 +0800
[SPARK-53257][PYTHON][TESTS] Deduplicate have_graphviz and graphviz_requirement_message
### What changes were proposed in this pull request?
Deduplicate have_graphviz and graphviz_requirement_message
### Why are the changes needed?
they were defined twice
### Does this PR introduce _any_ user-facing change?
no
### How was this patch tested?
ci
### Was this patch authored or co-authored using generative AI tooling?
no
Closes #51987 from zhengruifeng/deduplicate_have_graphviz.
Authored-by: Ruifeng Zheng <ru...@apache.org>
Signed-off-by: Ruifeng Zheng <ru...@apache.org>
---
python/pyspark/testing/__init__.py | 6 ------
python/pyspark/testing/connectutils.py | 11 +++++------
2 files changed, 5 insertions(+), 12 deletions(-)
diff --git a/python/pyspark/testing/__init__.py b/python/pyspark/testing/__init__.py
index 27bcd2a1a07b..c5f185bc0371 100644
--- a/python/pyspark/testing/__init__.py
+++ b/python/pyspark/testing/__init__.py
@@ -67,12 +67,6 @@ except ImportError as e:
googleapis_common_protos_requirement_message = str(e)
have_googleapis_common_protos = googleapis_common_protos_requirement_message is None
-graphviz_requirement_message = None
-try:
- import graphviz
-except ImportError as e:
- graphviz_requirement_message = str(e)
-have_graphviz: bool = graphviz_requirement_message is None
from pyspark.testing.utils import (
PySparkErrorTestUtils,
diff --git a/python/pyspark/testing/connectutils.py b/python/pyspark/testing/connectutils.py
index 7599e8470224..a91e18356f27 100644
--- a/python/pyspark/testing/connectutils.py
+++ b/python/pyspark/testing/connectutils.py
@@ -30,20 +30,19 @@ from pyspark.testing import (
have_grpc_status,
googleapis_common_protos_requirement_message,
have_googleapis_common_protos,
- graphviz_requirement_message,
- have_graphviz,
connect_requirement_message,
should_test_connect,
)
from pyspark import Row, SparkConf
from pyspark.util import is_remote_only
-from pyspark.testing.utils import PySparkErrorTestUtils
-from pyspark.testing.sqlutils import (
+from pyspark.testing.utils import (
have_pandas,
pandas_requirement_message,
- pyarrow_requirement_message,
- SQLTestUtils,
+ have_graphviz,
+ graphviz_requirement_message,
+ PySparkErrorTestUtils,
)
+from pyspark.testing.sqlutils import SQLTestUtils
from pyspark.sql.session import SparkSession as PySparkSession
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org