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 a5ea8848777b [SPARK-47549][BUILD] Remove Spark 3.0~3.2 
`pyspark/version.py` workaround from release scripts
a5ea8848777b is described below

commit a5ea8848777b30facb632e31624d3611a94e6ecf
Author: Dongjoon Hyun <dh...@apple.com>
AuthorDate: Tue Mar 26 09:04:28 2024 +0900

    [SPARK-47549][BUILD] Remove Spark 3.0~3.2 `pyspark/version.py` workaround 
from release scripts
    
    ### What changes were proposed in this pull request?
    
    This PR aims to remove Spark 3.0~3.2 `pyspark/version.py` workaround code 
from release scripts.
    
    This is a logical revert of SPARK-38411 because Spark 3.0~3.3 are the end 
of support status.
    
    - https://github.com/apache/spark/pull/36803
    
    ### Why are the changes needed?
    
    To simplify the release script for Apache Spark 4+
    
    ### Does this PR introduce _any_ user-facing change?
    
    No.
    
    ### How was this patch tested?
    
    Manual review.
    
    ### Was this patch authored or co-authored using generative AI tooling?
    
    No.
    
    Closes #45706 from dongjoon-hyun/SPARK-47549.
    
    Authored-by: Dongjoon Hyun <dh...@apple.com>
    Signed-off-by: Hyukjin Kwon <gurwls...@apache.org>
---
 dev/create-release/release-build.sh |  7 +------
 dev/create-release/release-tag.sh   | 12 ++----------
 2 files changed, 3 insertions(+), 16 deletions(-)

diff --git a/dev/create-release/release-build.sh 
b/dev/create-release/release-build.sh
index 69494dc5107c..610e0ba1f080 100755
--- a/dev/create-release/release-build.sh
+++ b/dev/create-release/release-build.sh
@@ -272,12 +272,7 @@ if [[ "$1" == "package" ]]; then
     # Write out the VERSION to PySpark version info we rewrite the - into a . 
and SNAPSHOT
     # to dev0 to be closer to PEP440.
     PYSPARK_VERSION=`echo "$SPARK_VERSION" |  sed -e "s/-/./" -e 
"s/SNAPSHOT/dev0/" -e "s/preview/dev/"`
-
-    if [[ $SPARK_VERSION == 3.0* ]] || [[ $SPARK_VERSION == 3.1* ]] || [[ 
$SPARK_VERSION == 3.2* ]]; then
-      echo "__version__ = '$PYSPARK_VERSION'" > python/pyspark/version.py
-    else
-      echo "__version__: str = '$PYSPARK_VERSION'" > python/pyspark/version.py
-    fi
+    echo "__version__: str = '$PYSPARK_VERSION'" > python/pyspark/version.py
 
     # Get maven home set by MVN
     MVN_HOME=`$MVN -version 2>&1 | grep 'Maven home' | awk '{print $NF}'`
diff --git a/dev/create-release/release-tag.sh 
b/dev/create-release/release-tag.sh
index fa701dd74b24..43c198301b70 100755
--- a/dev/create-release/release-tag.sh
+++ b/dev/create-release/release-tag.sh
@@ -85,11 +85,7 @@ fi
 sed -i".tmp1" 's/SPARK_VERSION:.*$/SPARK_VERSION: '"$RELEASE_VERSION"'/g' 
docs/_config.yml
 sed -i".tmp2" 's/SPARK_VERSION_SHORT:.*$/SPARK_VERSION_SHORT: 
'"$RELEASE_VERSION"'/g' docs/_config.yml
 sed -i".tmp3" "s/'facetFilters':.*$/'facetFilters': 
[\"version:$RELEASE_VERSION\"]/g" docs/_config.yml
-if [[ $RELEASE_VERSION == 3.0* ]] || [[ $RELEASE_VERSION == 3.1* ]] || [[ 
$RELEASE_VERSION == 3.2* ]]; then
-  sed -i".tmp4" 's/__version__ = .*$/__version__ = "'"$RELEASE_VERSION"'"/' 
python/pyspark/version.py
-else
-  sed -i".tmp4" 's/__version__: str = .*$/__version__: str = 
"'"$RELEASE_VERSION"'"/' python/pyspark/version.py
-fi
+sed -i".tmp4" 's/__version__: str = .*$/__version__: str = 
"'"$RELEASE_VERSION"'"/' python/pyspark/version.py
 
 git commit -a -m "Preparing Spark release $RELEASE_TAG"
 echo "Creating tag $RELEASE_TAG at the head of $GIT_BRANCH"
@@ -102,11 +98,7 @@ R_NEXT_VERSION=`echo $NEXT_VERSION | sed 's/-SNAPSHOT//g'`
 sed -i".tmp5" 's/Version.*$/Version: '"$R_NEXT_VERSION"'/g' R/pkg/DESCRIPTION
 # Write out the R_NEXT_VERSION to PySpark version info we use dev0 instead of 
SNAPSHOT to be closer
 # to PEP440.
-if [[ $RELEASE_VERSION == 3.0* ]] || [[ $RELEASE_VERSION == 3.1* ]] || [[ 
$RELEASE_VERSION == 3.2* ]]; then
-  sed -i".tmp6" 's/__version__ = .*$/__version__ = 
"'"$R_NEXT_VERSION.dev0"'"/' python/pyspark/version.py
-else
-  sed -i".tmp6" 's/__version__: str = .*$/__version__: str = 
"'"$R_NEXT_VERSION.dev0"'"/' python/pyspark/version.py
-fi
+sed -i".tmp6" 's/__version__: str = .*$/__version__: str = 
"'"$R_NEXT_VERSION.dev0"'"/' python/pyspark/version.py
 
 # Update docs with next version
 sed -i".tmp7" 's/SPARK_VERSION:.*$/SPARK_VERSION: '"$NEXT_VERSION"'/g' 
docs/_config.yml


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

Reply via email to