allthingssecurity commented on code in PR #27525:
URL: https://github.com/apache/camel/pull/27525#discussion_r4217145687
##########
components/camel-python3/src/main/java/org/apache/camel/language/python3/Python3Expression.java:
##########
@@ -33,6 +36,7 @@ public Python3Expression(String text) {
Python3Expression(String text, Python3Language language) {
this.text = text;
+ this.bindVariables = text != null && text.contains("variables");
Review Comment:
Done in 70f66cb717fc. js, python and python3 now bind the Groovy names:
`exchange`, `camelContext`, `exchangeId`, `message`, `request`, `body`,
`header`/`headers`, `exchangeProperty`/`exchangeProperties`,
`variable`/`variables` and `exception`.
- Deprecated aliases, still bound and marked *Deprecated* in the docs:
`context` (use `camelContext`) and `properties` (use `exchangeProperties`),
with an upgrade guide note. `message` stays a regular name, since Groovy binds
`message` too; `exchangeId` has no Groovy equivalent and is kept as is.
- Not added: `in` (a reserved word in JavaScript and Python) and
`out`/`response` (deprecated in Groovy).
- python3 default (data-only) mode binds only `body`, `header`/`headers`,
`exchangeProperty`/`exchangeProperties`, `variable`/`variables`, `exchangeId`
and the deprecated `properties`. `exchange`, `camelContext`, `message`,
`request`, `exception` and `context` stay undefined (`NameError`) unless
`createWithHostAccess()` is used, so the sandbox boundary is unchanged.
New tests per language cover the new names, the deprecated aliases, and
python3's default mode not exposing the host objects. camel-javascript 21,
camel-python 16, camel-python3 55 tests pass.
_Claude Code on behalf of allthingssecurity_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]