Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BEAM-8287] Python 3 docs updates for 2.16.0 #9700

Merged
merged 6 commits into from
Oct 10, 2019

Conversation

soyrice
Copy link
Contributor

@soyrice soyrice commented Oct 1, 2019

Update docs for Python 3 GA in 2.16.0 SDK version

R: @tvalentyn
CC: @rosetn, @marciw, @aaltay


Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • Choose reviewer(s) and mention them in a comment (R: @username).
  • Format the pull request title like [BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replace BEAM-XXX with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

Post-Commit Tests Status (on master branch)

Lang SDK Apex Dataflow Flink Gearpump Samza Spark
Go Build Status --- --- Build Status --- --- Build Status
Java Build Status Build Status Build Status Build Status
Build Status
Build Status
Build Status Build Status Build Status
Build Status
Python Build Status
Build Status
Build Status
Build Status
--- Build Status
Build Status
Build Status --- --- Build Status
XLang --- --- --- Build Status --- --- ---

Pre-Commit Tests Status (on master branch)

--- Java Python Go Website
Non-portable Build Status Build Status Build Status Build Status
Portable --- Build Status --- ---

See .test-infra/jenkins/README for trigger phrase, status and link of all Jenkins jobs.

@soyrice soyrice force-pushed the python3_ga_docs_updates branch 2 times, most recently from ec0541c to 7ae4978 Compare October 1, 2019 18:34
@rosetn
Copy link
Contributor

rosetn commented Oct 1, 2019

Any changes needed for the Quickstart? https://beam.apache.org/get-started/quickstart-py/#check-your-python-version

@soyrice
Copy link
Contributor Author

soyrice commented Oct 1, 2019

Any changes needed for the Quickstart? https://beam.apache.org/get-started/quickstart-py/#check-your-python-version

None needed - checked with Valentyn. The snippets are version-agnostic and the opening line still works, but will need to change once 2.7 is deprecated. I'll add a note about the upcoming deprecation like in the programming guide

@@ -39,6 +39,9 @@ how to implement Beam concepts in your pipelines.
</ul>
</nav>

{:.language-py}
New versions of the Python SDK will only support Python 3.5 or higher. Currently, the Python SDK still supports Python 2.7.x. We recommend using the latest Python 3 version.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about the following wording:

New releases of the Python SDK will soon require Python 3.5 or higher. We recommend that new users start using Beam with Python 3.

Or:

Currently, the Python SDK still supports Python 2.7.x, however new releases of the Python SDK will soon require Python 3.5 or higher. We recommend that new users start using Beam with Python 3.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a link to a site/document/mailing list discussion we can link to related to sunsetting plan?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a particular release I can mention here? Or is "soon" as specific as we can get right now?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you recommend this only for new users? It seems that all users would benefit from switching to Python 3

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can't say more specific than soon at this point.

sure, we can drop "new" - and recommend the switch to all users.

@@ -22,7 +22,7 @@ limitations under the License.

## Python 3 Support

Apache Beam first offered Python 3.5 support with the 2.11.0 SDK release and added Python 3.6, Python 3.7 support with the 2.14.0 version. However, we continue to polish some [rough edges](https://issues.apache.org/jira/browse/BEAM-1251?focusedCommentId=16890504&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-1689050) and strengthen Beam's Python 3 offering:
Apache Beam supports Python 3.5 or higher with the 2.16.0 SDK release. Python 3.5 beta support was first offered with the 2.11.0 SDK release; beta support for Python 3.6, Python 3.7 was added with the 2.14.0 version. We continue to polish some [rough edges](https://issues.apache.org/jira/browse/BEAM-1251?focusedCommentId=16890504&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-1689050) and strengthen Beam's Python 3 offering:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beam does not have notions of Alpha/Beta. I suggest the following wording:

Apache Beam offers Python 3.5, 3.6, 3.7 support since Beam 2.14.0. We continue to polish remaining rough edges to improve the experience of Python 3 users and prepare for eventual sunsetting of Beam Python 2 offering:

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think as of this release we are confident enough to say:

As of Apache Beam 2.16.0, Beam supports Python 3.5 and higher.

<subnote here about it has been supported for a while and for a few minor remaining issues see the BEAM-1215>

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Add note about Python version support

Resolve comments
@soyrice soyrice marked this pull request as ready for review October 2, 2019 17:33
@@ -39,6 +39,9 @@ how to implement Beam concepts in your pipelines.
</ul>
</nav>

{:.language-py}
New versions of the Python SDK will only support Python 3.5 or higher. Currently, the Python SDK still supports Python 2.7.x. We recommend using the latest Python 3 version.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a link to a site/document/mailing list discussion we can link to related to sunsetting plan?

@@ -27,6 +27,8 @@ If you're interested in contributing to the Apache Beam Python codebase, see the
* TOC
{:toc}

New versions of the Python SDK will only support Python 3.5 or higher. Currently, the Python SDK still supports Python 2.7.x. We recommend using the latest Python 3 version.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add a deprecation warning here. And probably to the download page and to the 2.16 blog.

/cc @markflyhigh

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a special format for deprecation warnings?

@@ -22,7 +22,7 @@ limitations under the License.

## Python 3 Support

Apache Beam first offered Python 3.5 support with the 2.11.0 SDK release and added Python 3.6, Python 3.7 support with the 2.14.0 version. However, we continue to polish some [rough edges](https://issues.apache.org/jira/browse/BEAM-1251?focusedCommentId=16890504&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-1689050) and strengthen Beam's Python 3 offering:
Apache Beam supports Python 3.5 or higher with the 2.16.0 SDK release. Python 3.5 beta support was first offered with the 2.11.0 SDK release; beta support for Python 3.6, Python 3.7 was added with the 2.14.0 version. We continue to polish some [rough edges](https://issues.apache.org/jira/browse/BEAM-1251?focusedCommentId=16890504&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-1689050) and strengthen Beam's Python 3 offering:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think as of this release we are confident enough to say:

As of Apache Beam 2.16.0, Beam supports Python 3.5 and higher.

<subnote here about it has been supported for a while and for a few minor remaining issues see the BEAM-1215>

website/src/roadmap/python-sdk.md Show resolved Hide resolved
@tvalentyn
Copy link
Contributor

tvalentyn commented Oct 2, 2019

We don't have a sunsetting doc yet, but Beam SDK itself comes with a warning that Python 2 will sunset in future releases. We can link https://lists.apache.org/thread.html/eba6caa58ea79a7ecbc8560d1c680a366b44c531d96ce5c699d41535@%3Cdev.beam.apache.org%3E that has a discussion.

@tvalentyn tvalentyn changed the title [BEAM-8287] Python3 GA docs updates [BEAM-8287] Python 3 docs updates for 2.16.0 Oct 2, 2019
@aaltay
Copy link
Member

aaltay commented Oct 3, 2019

We don't have a sunsetting doc yet, but Beam SDK itself comes with a warning that Python 2 will sunset in future releases. We can link https://lists.apache.org/thread.html/eba6caa58ea79a7ecbc8560d1c680a366b44c531d96ce5c699d41535@%3Cdev.beam.apache.org%3E that has a discussion.

It might be good to document this plan somewhere and point users to it. A jira issue might be good, and that way users can add comments if they want to.

@tvalentyn
Copy link
Contributor

I created https://issues.apache.org/jira/browse/BEAM-8371 to track Python 2 sunsetting. We can reference this jira in this PR.

@@ -39,6 +39,9 @@ how to implement Beam concepts in your pipelines.
</ul>
</nav>

{:.language-py}
The Python SDK supports Python 2.7, 3.5, or higher; soon, new Python SDK releases won't support Python 2.7. For best results, use Beam with Python 3.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could say:
...new Python SDK releases won't support Python 2.7 (BEAM-8371).

@@ -22,7 +22,7 @@ limitations under the License.

## Python 3 Support

Apache Beam first offered Python 3.5 support with the 2.11.0 SDK release and added Python 3.6, Python 3.7 support with the 2.14.0 version. However, we continue to polish some [rough edges](https://issues.apache.org/jira/browse/BEAM-1251?focusedCommentId=16890504&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-1689050) and strengthen Beam's Python 3 offering:
Apache Beam 2.14.0 and higher support Python 3.5, 3.6, and 3.7. We continue to [improve](https://issues.apache.org/jira/browse/BEAM-1251?focusedCommentId=16890504&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-1689050) the experience for Python 3 users and phase out Python 2 support:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could say:
...and phase out Python 2 support (BEAM-8371).

Copy link
Contributor

@tvalentyn tvalentyn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @soyrice !

@@ -39,6 +39,9 @@ how to implement Beam concepts in your pipelines.
</ul>
</nav>

{:.language-py}
The Python SDK supports Python 2.7, 3.5, or higher; soon, new Python SDK releases won't support Python 2.7 ([BEAM-8371](https://issues.apache.org/jira/browse/BEAM-8371)). For best results, use Beam with Python 3.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we spell out 3.5, or higher here similarly as 3.5, 3.6 and 3.7?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM, would not hurt. We should have a conversation in Beam about definition of support for minor version. Direct runner might just work on 3.8, dataflow wouldn't. There are no 3.8 tests. Do we want to stop enthusiastic users from trying 3.8? Probably not. Do we claim to support it? Probably not.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@@ -39,6 +39,9 @@ how to implement Beam concepts in your pipelines.
</ul>
</nav>

{:.language-py}
The Python SDK supports Python 2.7, 3.5, or higher; soon, new Python SDK releases won't support Python 2.7 ([BEAM-8371](https://issues.apache.org/jira/browse/BEAM-8371)). For best results, use Beam with Python 3.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about, instead of new Python SDK releases won't support -> starting from 2020 newer Python SDKreleases won't support ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on latest round of discussions in the mailing list, we decided that we will do it somewhere in 2020, but not necessarily in the beginning. We will revisit this conversation. For now I think we can say:

New Python SDK releases will stop supporting Python 2.7 in 2020 ([BEAM-8371]).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@aaltay
Copy link
Member

aaltay commented Oct 10, 2019

Suggestions from the last round of comments LGTM.

@@ -27,6 +27,8 @@ If you're interested in contributing to the Apache Beam Python codebase, see the
* TOC
{:toc}

The Python SDK supports Python 2.7, 3.5, or higher; soon, new Python SDK releases won't support Python 2.7 ([BEAM-8371](https://issues.apache.org/jira/browse/BEAM-8371)). For best results, use Beam with Python 3.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's make quickstart wording consistent with programming guide. Thanks.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch - done.

@tvalentyn tvalentyn merged commit 71a4690 into apache:master Oct 10, 2019
robinyqiu pushed a commit to robinyqiu/beam that referenced this pull request Oct 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants