[SPARK-52224][CONNECT][PYTHON] Introduce pyyaml as a dependency for the Python client #50944
+7
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
Introduces pyyaml as a dependency for the Python client. When
pip install
-ing the pyspark client, it will be installed with it.Why are the changes needed?
The pipeline spec file described in the Declarative Pipelines SPIP expects data in a YAML format. YAML is superior to alternatives, for a few reasons:
The Declarative Pipelines CLI will be a Spark Connect Python client, and thus require a Python library for loading YAML. The pyyaml library is an extremely stable dependency. The
safe_load
function that we'll use to load YAML files was introduced more than a decade ago.Does this PR introduce any user-facing change?
Yes – users who
pip install
the PySpark client library will see the pyyaml library installed.How was this patch tested?
pip install python/packaging/client
import yaml
in a Python shellWas this patch authored or co-authored using generative AI tooling?
No