From 1af6712a30f0f137e61d38d269615f006f627e21 Mon Sep 17 00:00:00 2001 From: "Mateusz \"Serafin\" Gajewski" Date: Tue, 18 Feb 2025 06:15:04 +0100 Subject: [PATCH 1/3] Update trino-wasm-python to 3.13-3 --- docs/src/main/sphinx/udf/python.md | 17 +++++++++++++++++ plugin/trino-functions-python/pom.xml | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/docs/src/main/sphinx/udf/python.md b/docs/src/main/sphinx/udf/python.md index 030b1151cbd3..9d67ac47deb0 100644 --- a/docs/src/main/sphinx/udf/python.md +++ b/docs/src/main/sphinx/udf/python.md @@ -105,6 +105,23 @@ not available within a Python UDF: * `wsgiref` * `xmlrpc` +The following libraries are explicitly added to the runtime and therefore +available within a Python UDF: + +* `attrs` +* `bleach` +* `charset-normalizer` +* `defusedxml` +* `idna` +* `jmespath` +* `jsonschema` +* `pyasn1` +* `pyparsing` +* `python-dateutil` +* `rsa` +* `tomli` +* `ua-parser` + ## Type mapping The following table shows supported Trino types and their corresponding Python diff --git a/plugin/trino-functions-python/pom.xml b/plugin/trino-functions-python/pom.xml index db604859b6d4..436dcb6c130d 100644 --- a/plugin/trino-functions-python/pom.xml +++ b/plugin/trino-functions-python/pom.xml @@ -74,7 +74,7 @@ io.trino trino-wasm-python - 3.13-2 + 3.13-3 From b5db82542b15dff8d7dfa0587d9f4dc50fcebd59 Mon Sep 17 00:00:00 2001 From: "Mateusz \"Serafin\" Gajewski" Date: Tue, 18 Feb 2025 06:15:46 +0100 Subject: [PATCH 2/3] Update AWS SDK v2 to 2.30.22 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 88b50585fc4e..0546db83a517 100644 --- a/pom.xml +++ b/pom.xml @@ -309,7 +309,7 @@ software.amazon.awssdk bom - 2.30.21 + 2.30.22 pom import From a4dbde07d3def45691c252791b77883aa45a2de6 Mon Sep 17 00:00:00 2001 From: "Mateusz \"Serafin\" Gajewski" Date: Tue, 18 Feb 2025 06:16:40 +0100 Subject: [PATCH 3/3] Update chicory to 1.0.0 --- plugin/trino-functions-python/pom.xml | 2 +- .../java/io/trino/plugin/functions/python/PythonEngine.java | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/plugin/trino-functions-python/pom.xml b/plugin/trino-functions-python/pom.xml index 436dcb6c130d..8d90411ba72e 100644 --- a/plugin/trino-functions-python/pom.xml +++ b/plugin/trino-functions-python/pom.xml @@ -17,7 +17,7 @@ com.dylibso.chicory bom - 1.0.0-M2 + 1.0.0 pom import diff --git a/plugin/trino-functions-python/src/main/java/io/trino/plugin/functions/python/PythonEngine.java b/plugin/trino-functions-python/src/main/java/io/trino/plugin/functions/python/PythonEngine.java index a53c7dbad74b..39c94c2a6867 100644 --- a/plugin/trino-functions-python/src/main/java/io/trino/plugin/functions/python/PythonEngine.java +++ b/plugin/trino-functions-python/src/main/java/io/trino/plugin/functions/python/PythonEngine.java @@ -112,7 +112,10 @@ public PythonEngine(String guestCode) .withDirectory(guestRoot.toString(), guestRoot) .build(); - WasiPreview1 wasi = closer.register(new WasiPreview1(logger, wasiOptions)); + WasiPreview1 wasi = closer.register(WasiPreview1.builder() + .withLogger(logger) + .withOptions(wasiOptions) + .build()); ImportValues importValues = ImportValues.builder() .addFunction(wasi.toHostFunctions())