[
https://issues.apache.org/jira/browse/FLINK-23823?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17403800#comment-17403800
]
Mika Naylor commented on FLINK-23823:
-------------------------------------
I verified this behaviour in a few ways. It behaved as expected in a few areas,
but my experience in one area disagreed with the documentation. I did this by
writing a pyflink job with some Python 3.8 specific syntax, that would fail
with a syntax error on any python version below that. I:
- Verified that the client interpreter can be set/changed using the
{{pyclientexec}} and {{pyClientExecutable}} CLI flags.
- Verified that the client interpreter can be set/changed using the
{{PYFLINK_CLIENT_EXECUTABLE}} environment variable when submitting the job.
- Verified that the client interpreter can be set/changed using the
{{python.client.executable}} Flink configuration setting.
The
[documentation|https://ci.apache.org/projects/flink/flink-docs-master/docs/dev/python/python_config/#python-client-executable]
states:
{quote}The priority is as following:
1. the command line option "-pyclientexec";
2. the environment variable PYFLINK_CLIENT_EXECUTABLE;
3. the configuration 'python.client.executable' defined in flink-conf.yaml
{quote}
I set {{python.client.executable}} to point to Python 3.6, and submitted a job
with Python 3.8 syntax. Running the job normally results in a Syntax Error as
expected, and the {{pyclientexec}} and {{pyClientExecutable}} CLI flags let me
override this setting and point to Python 3.8. However, setting the
{{PYFLINK_CLIENT_EXECUTABLE}} *did not overwrite the
{{python.client.executable}} setting*.
{code:bash}
export PYFLINK_CLIENT_EXECUTABLE=/usr/bin/python3.8
./bin/flink run --python examples/python/table/batch/python38_test.py
{code}
Still used Python 3.6 as the Python client interpreter.
> Test specifying python client interpreter used to compile jobs
> --------------------------------------------------------------
>
> Key: FLINK-23823
> URL: https://issues.apache.org/jira/browse/FLINK-23823
> Project: Flink
> Issue Type: Improvement
> Components: API / Python
> Reporter: Huang Xingbo
> Assignee: Mika Naylor
> Priority: Blocker
> Labels: release-testing
> Fix For: 1.14.0
>
>
> The newly feature allows to users to specify the client python interpreter
> used to compile pyflink jobs.
> In order to test this new feature I recommend to follow the
> documentation[1][2] and the config
> "-pyclientexec,--pyClientExecutable"
> [1]
> https://ci.apache.org/projects/flink/flink-docs-master/docs/deployment/cli/#submitting-pyflink-jobs
> [2]
> https://ci.apache.org/projects/flink/flink-docs-master/docs/dev/python/dependency_management/#python-interpreter-of-client
--
This message was sent by Atlassian Jira
(v8.3.4#803005)