[ 
https://issues.apache.org/jira/browse/FLINK-34195?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17809826#comment-17809826
 ] 

Xingbo Huang commented on FLINK-34195:
--------------------------------------

[~mapohl] Thanks for the great work. Since the second version of PyFlink's 
inception, 1.10, it has only supported Python3. I believe that using `python3` 
rather than `python` is indeed a more standard practice. For information on 
which Python version PyFlink supports, one method is to check the Flink 
documentationhttps://nightlies.apache.org/flink/flink-docs-release-1.18/docs/dev/python/installation/,
 and another method is to view the Python package meta on PyPI 
https://pypi.org/project/apache-flink/.

> PythonEnvUtils creates python environment instead of python3
> ------------------------------------------------------------
>
>                 Key: FLINK-34195
>                 URL: https://issues.apache.org/jira/browse/FLINK-34195
>             Project: Flink
>          Issue Type: Bug
>          Components: API / Python, Build System / CI
>            Reporter: Matthias Pohl
>            Priority: Major
>
> I was looking into the Python installation of the Flink test suite because I 
> working on updating the CI Docker image from 16.04 (Xenial) to 22.04 
> (FLINK-34194). I noticed that there is test code still relying on the 
> {{python}} command instead of {{{}python3{}}}. For Ubuntu 16.04 that meant 
> relying on Python 2. Therefore, we have tests still relying on Python 2 as 
> far as I understand.
> I couldn't find any documentation or mailing list discussion on major Python 
> version support. But AFAIU, we're relying on Python3 (based on the e2e tests) 
> which makes these tests out-dated.
> Additionally, 
> [python.client.executable|https://github.com/apache/flink/blob/50cb4ee8c545cd38d0efee014939df91c2c9c65f/flink-python/src/main/java/org/apache/flink/python/PythonOptions.java#L170]
>  relies on {{{}python{}}}.
> Should we make it more explicit in our test code that we're actually 
> expecting python3? Additionally, should that be mentioned somewhere in the 
> docs? Or if it's already mentioned, could you point me to it? (As someone 
> looking into PyFlink for the "first" time) I would have expected something 
> like that being mentioned on the [PyFlink 
> overview|https://nightlies.apache.org/flink/flink-docs-master/docs/dev/python/overview/].
>  Or is it the default to assume nowadays that {{python}} refers to 
> {{python3?}}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to