Skip to content

Commit

Permalink
[GH-15865] Upgrade org.python:jython to CWE-416 of com.github.jnr:jnr…
Browse files Browse the repository at this point in the history
…-posix (overriding org.python.core.imp class from Jython with custom changes, search for CUSTOM CHANGE) (#15866)

* [GH-15865] Upgrade org.python:jython to CWE-416 of com.github.jnr:jnr-posix

* Override jython class

* Add Jython version check
  • Loading branch information
mn-mikke authored Oct 30, 2023
1 parent 936756b commit cd38506
Show file tree
Hide file tree
Showing 3 changed files with 1,803 additions and 1 deletion.
3 changes: 3 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ jetty9MainVersion=9.4.53.v20231009
jetty9MinimalVersion=9.4.53.v20231009
servletApiVersion=3.1.0

# Jython (Java intrapretor for Python language)
jythonVersion=2.7.3

# Gson
gsonVersion=2.9.1

Expand Down
10 changes: 9 additions & 1 deletion h2o-extensions/jython-cfunc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@ description = "H2O Jython Udfs"

dependencies {
api project(":h2o-core")
api 'org.python:jython:2.7.1b3'
api "org.python:jython:${jythonVersion}"

if ("${jythonVersion}".toString() != "2.7.3") {
throw new IllegalStateException(
"This module expects Jython 2.7.3, configured version is ${jythonVersion}. " +
"Please locate org.python.core.imp class (modified from Jython 2.7.3), " +
"upgrade it to your version, port our custom changes (Marked as CUSTOM CHANGE)." +
"Once you've done that you can modify this check.")
}

testImplementation project(":h2o-test-support")
testRuntimeOnly project(":${defaultWebserverModule}")
Expand Down
Loading

0 comments on commit cd38506

Please sign in to comment.