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

Python 3.10 support #23587

Merged
merged 24 commits into from
Oct 18, 2022
Merged

Python 3.10 support #23587

merged 24 commits into from
Oct 18, 2022

Conversation

AnandInguva
Copy link
Contributor

@AnandInguva AnandInguva commented Oct 11, 2022

Fixes: #21458
Fixes: #21671

This PR covers

  1. Python 3.10 tests and infrastructure.
  2. replace _unified_repr() with repr(). Fixed the tests related to _unified_repr() Fixes: Replace _unified_repr with repr #20982
  3. Some tests were meant to be run on Dataflow runner v1 when it was the default runner for Dataflow. But Runner v2 has been added as default so we need to explicitly add --experiments=disable_runner_v2 or --dataflow_service_option=disable_runner_v2. Added this flag to dataflow runner v1 tests.

Note: Also, dataflow runner v1 is not supported yet with Python 3.10. Please use runner_v2 for the Dataflow jobs.


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).
  • Mention the appropriate issue in your description (for example: addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment fixes #<ISSUE NUMBER> instead.
  • Update CHANGES.md with noteworthy changes.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md

GitHub Actions Tests Status (on master branch)

Build python source distribution and wheels
Python tests
Java tests
Go tests

See CI.md for more information about GitHub Actions CI.

@codecov
Copy link

codecov bot commented Oct 11, 2022

Codecov Report

Merging #23587 (c6b9cdb) into master (98eeac7) will decrease coverage by 0.08%.
The diff coverage is 83.33%.

@@            Coverage Diff             @@
##           master   #23587      +/-   ##
==========================================
- Coverage   73.40%   73.32%   -0.09%     
==========================================
  Files         719      719              
  Lines       95940    95797     -143     
==========================================
- Hits        70424    70241     -183     
- Misses      24205    24245      +40     
  Partials     1311     1311              
Flag Coverage Δ
python 83.03% <83.33%> (-0.10%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...ython/apache_beam/runners/interactive/sql/utils.py 76.09% <ø> (ø)
sdks/python/apache_beam/typehints/row_type.py 100.00% <ø> (ø)
...apache_beam/typehints/native_type_compatibility.py 85.52% <33.33%> (-1.06%) ⬇️
sdks/python/apache_beam/typehints/opcodes.py 85.35% <50.00%> (-0.26%) ⬇️
.../python/apache_beam/typehints/trivial_inference.py 96.15% <87.50%> (-0.27%) ⬇️
sdks/python/apache_beam/__init__.py 85.00% <100.00%> (ø)
...apache_beam/runners/dataflow/internal/apiclient.py 77.34% <100.00%> (ø)
...s/python/apache_beam/typehints/sharded_key_type.py 93.54% <100.00%> (ø)
sdks/python/apache_beam/typehints/typehints.py 93.37% <100.00%> (-0.06%) ⬇️
.../python/apache_beam/testing/test_stream_service.py 88.09% <0.00%> (-4.77%) ⬇️
... and 14 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@AnandInguva AnandInguva marked this pull request as ready for review October 11, 2022 23:33
@AnandInguva
Copy link
Contributor Author

R: @tvalentyn

@github-actions
Copy link
Contributor

Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control

}

tasks.register("python310PostCommit") {
dependsOn(":sdks:python:test-suites:dataflow:py310:postCommitIT")
Copy link
Contributor

Choose a reason for hiding this comment

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

do these run on RunnerV2 by default?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. Default is runner_v2

@AnandInguva
Copy link
Contributor Author

Run Python Dataflow ValidatesRunner

@AnandInguva
Copy link
Contributor Author

I added dataflow runner v1 tests with explicit disable_runner_v2 option. PTAL @tvalentyn. Also, addressed the comments

@AnandInguva
Copy link
Contributor Author

Run Portable_Python PreCommit

@AnandInguva
Copy link
Contributor Author

Run Python Dataflow ValidatesRunner

@AnandInguva
Copy link
Contributor Author

Run Python 3.10 PostCommit

@AnandInguva
Copy link
Contributor Author

Run Python Dataflow ValidatesRunner

@AnandInguva
Copy link
Contributor Author

Run Python Dataflow ValidatesContainer

1 similar comment
@AnandInguva
Copy link
Contributor Author

Run Python Dataflow ValidatesContainer

@@ -38,6 +38,7 @@ PostcommitJobBuilder.postCommitJob('beam_PostCommit_Py_VR_Dataflow', 'Run Python
rootBuildScriptDir(commonJobProperties.checkoutDir)
tasks(':sdks:python:test-suites:dataflow:validatesRunnerBatchTests')
tasks(':sdks:python:test-suites:dataflow:validatesRunnerStreamingTests')
switches('-PdisableRunnerV2')
Copy link
Contributor

Choose a reason for hiding this comment

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

good catch!

@AnandInguva
Copy link
Contributor Author

Run Python 3.10 PostCommit

@AnandInguva
Copy link
Contributor Author

Run Python Dataflow ValidatesContainer

@AnandInguva
Copy link
Contributor Author

Run Python Dataflow ValidatesRunner

@AnandInguva
Copy link
Contributor Author

Run Python Dataflow V2 ValidatesRunner

@AnandInguva
Copy link
Contributor Author

Run Python 3.10 PostCommit

1 similar comment
@AnandInguva
Copy link
Contributor Author

Run Python 3.10 PostCommit

@AnandInguva
Copy link
Contributor Author

Run Python 3.9 PostCommit

@AnandInguva
Copy link
Contributor Author

Run Python PreCommit

@tvalentyn
Copy link
Contributor

Run Python Dataflow ValidatesContainer

2 similar comments
@AnandInguva
Copy link
Contributor Author

Run Python Dataflow ValidatesContainer

@tvalentyn
Copy link
Contributor

Run Python Dataflow ValidatesContainer

@tvalentyn
Copy link
Contributor

Remaing test failures are unrealated or uncorrectly attributed to this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug in type inference for Python 3.10 Changes for Python 3.10 Replace _unified_repr with repr
3 participants