Skip to content

Commit 342fa82

Browse files
krasinskih2o-ops
andauthored
[GH-5676][GH-5679][GH-5619] Add support for Python 3.10 & 3.11 (#5677)
* Add support for Python 3.10 * Add Python 3.11 * remove py 3.11 for spark versions below 3.4 * try to fix numpy build * Update Docker Image Version * put numpy change also in second gradle module * try to bump pytest * Update Docker Image Version * Update Docker Image Version * try to bump pytest 2 * bump other dependencies --------- Co-authored-by: h2o-ops <[email protected]>
1 parent 4cf3823 commit 342fa82

9 files changed

+21
-20
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ ext {
7979
docProjects = [project(':sparkling-water-doc')]
8080

8181
scalaTestVersions = ['2.11': '2.2.1', '2.12': '3.0.8']
82-
numpyVersions = ['2': '1.16.6', '3': '1.19.5']
82+
numpyVersions = ['3.6': '1.19.5', '3.7': '1.19.5', 'default': '1.23.5']
8383
}
8484

8585
def versionSpecificProps = new Properties()

gradle-spark3.0.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ databricksVersion=7.3.x-cpu-ml-scala2.12
77
fabricK8sClientVersion=4.9.2
88
executorOverheadMemoryOption=spark.executor.memoryOverhead
99
driverOverheadMemoryOption=spark.driver.memoryOverhead
10-
supportedPythonVersions=3.6 3.7 3.8 3.9
10+
supportedPythonVersions=3.6 3.7 3.8 3.9 3.10

gradle-spark3.1.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ databricksVersion=9.1.x-cpu-ml-scala2.12
77
fabricK8sClientVersion=4.12.0
88
executorOverheadMemoryOption=spark.executor.memoryOverhead
99
driverOverheadMemoryOption=spark.driver.memoryOverhead
10-
supportedPythonVersions=3.6 3.7 3.8 3.9
10+
supportedPythonVersions=3.6 3.7 3.8 3.9 3.10

gradle-spark3.2.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ databricksVersion=10.4.x-cpu-ml-scala2.12
77
fabricK8sClientVersion=5.4.1
88
executorOverheadMemoryOption=spark.executor.memoryOverhead
99
driverOverheadMemoryOption=spark.driver.memoryOverhead
10-
supportedPythonVersions=3.6 3.7 3.8 3.9
10+
supportedPythonVersions=3.6 3.7 3.8 3.9 3.10

gradle-spark3.3.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ databricksVersion=11.0.x-cpu-ml-scala2.12
77
fabricK8sClientVersion=5.12.2
88
executorOverheadMemoryOption=spark.executor.memoryOverhead
99
driverOverheadMemoryOption=spark.driver.memoryOverhead
10-
supportedPythonVersions=3.7 3.8 3.9
10+
supportedPythonVersions=3.7 3.8 3.9 3.10

gradle-spark3.4.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ databricksVersion=13.0.x-cpu-ml-scala2.12
77
fabricK8sClientVersion=6.4.1
88
executorOverheadMemoryOption=spark.executor.memoryOverhead
99
driverOverheadMemoryOption=spark.driver.memoryOverhead
10-
supportedPythonVersions=3.7 3.8 3.9
10+
supportedPythonVersions=3.7 3.8 3.9 3.10 3.11

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ systemProp.org.gradle.internal.publish.checksums.insecure=true
1919
# Version of Terraform used in the script creating the docker image
2020
terraformVersion=0.12.25
2121
# Version of docker image used in Jenkins tests
22-
dockerImageVersion=80
22+
dockerImageVersion=83
2323
# Is this build nightly build
2424
isNightlyBuild=false
2525
# Supported Major Spark Versions
2626
supportedSparkVersions=2.3 2.4 3.0 3.1 3.2 3.3 3.4
2727
# The list of python environments used in automated tests
28-
pythonEnvironments=3.6 3.7 3.8 3.9
28+
pythonEnvironments=3.6 3.7 3.8 3.9 3.10 3.11
2929
# Select for which Spark version is Sparkling Water built by default
3030
spark=3.4
3131
# Sparkling Water Version

py-scoring/build.gradle

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,19 @@ python {
2727
if (project.hasProperty("pythonPath")) {
2828
pythonPath project.findProperty("pythonPath").toString()
2929
}
30-
def pythonMajorVersion = getPythonVersion().substring(0, 1)
31-
def numpyVersion = numpyVersions.get(pythonMajorVersion)
30+
String pythonVersion = getPythonVersion()
31+
String pythonVersionWithoutPatchPart = pythonVersion.substring(0, pythonVersion.lastIndexOf('.'))
32+
String numpyVersion = numpyVersions.get(pythonVersionWithoutPatchPart, numpyVersions.get("default"))
3233

33-
pip "pytz:2019.1" // Needed in Integration tests, but not PySparkling dependency
34-
pip "pytest:4.6.9" // For running tests
34+
pip "pytz:2023.3.post1" // Needed in Integration tests, but not PySparkling dependency
35+
pip "pytest:6.2.5"
3536
pip "numpy:${numpyVersion}"
3637
pip "pyspark:${sparkVersion}"
3738
if (project.hasProperty("pythonEnvBasePath")) {
3839
// for CI as we use pre-cached environment
39-
envPath "${project.findProperty("pythonEnvBasePath")}/${getPythonVersion()}/${sparkVersion}"
40+
envPath "${project.findProperty("pythonEnvBasePath")}/${pythonVersion}/${sparkVersion}"
4041
} else {
41-
envPath "${rootDir}/.gradle/python/${getPythonVersion()}/${sparkVersion}"
42+
envPath "${rootDir}/.gradle/python/${pythonVersion}/${sparkVersion}"
4243
}
4344
}
4445

py/build.gradle

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ python {
2828
if (project.hasProperty("pythonPath")) {
2929
pythonPath project.findProperty("pythonPath").toString()
3030
}
31-
def pythonMajorVersion = getPythonVersion().substring(0, 1)
32-
def numpyVersion = numpyVersions.get(pythonMajorVersion)
31+
String pythonVersionWithoutPatchPart = pythonVersion.substring(0, pythonVersion.lastIndexOf('.'))
32+
String numpyVersion = numpyVersions.get(pythonVersionWithoutPatchPart, numpyVersions.get("default"))
3333

34-
pip "pytz:2019.1" // Needed in Integration tests, but not PySparkling dependency
35-
pip "pytest:4.6.9" // For running tests
36-
pip "tabulate:0.8.3"
37-
pip "requests:2.21.0"
34+
pip "pytz:2023.3.post1" // Needed in Integration tests, but not PySparkling dependency
35+
pip "pytest:6.2.5"
36+
pip "tabulate:0.8.10"
37+
pip "requests:2.27.1"
3838
pip "numpy:${numpyVersion}"
3939
pip "pyspark:${sparkVersion}"
4040
if (project.hasProperty("pythonEnvBasePath")) {

0 commit comments

Comments
 (0)