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

Narrow conditions for PEP 585 error #25084

Closed
wants to merge 11 commits into from

Conversation

jrmccluskey
Copy link
Contributor

Makes the conditions for throwing the PEP 585 generics support TypeError more narrow to avoid false positives (e.g. only built-in types can trigger the error now)

Part of work on #23366


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

  • 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 Jan 19, 2023

Codecov Report

Merging #25084 (72c9468) into master (1c4e424) will decrease coverage by 0.01%.
The diff coverage is 80.00%.

❗ Current head 72c9468 differs from pull request most recent head 29b5d45. Consider uploading reports for the commit 29b5d45 to get more accurate results

@@            Coverage Diff             @@
##           master   #25084      +/-   ##
==========================================
- Coverage   73.12%   73.12%   -0.01%     
==========================================
  Files         735      735              
  Lines       98153    98157       +4     
==========================================
+ Hits        71776    71778       +2     
- Misses      25013    25015       +2     
  Partials     1364     1364              
Flag Coverage Δ
python 82.67% <80.00%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
sdks/python/apache_beam/typehints/typehints.py 92.74% <80.00%> (-0.14%) ⬇️
.../python/apache_beam/testing/test_stream_service.py 88.09% <0.00%> (-4.77%) ⬇️
...che_beam/runners/interactive/interactive_runner.py 90.50% <0.00%> (-1.27%) ⬇️
sdks/python/apache_beam/transforms/util.py 96.24% <0.00%> (-0.16%) ⬇️
...hon/apache_beam/runners/worker/bundle_processor.py 93.54% <0.00%> (ø)
...on/apache_beam/runners/dataflow/dataflow_runner.py 81.88% <0.00%> (+0.14%) ⬆️
sdks/python/apache_beam/runners/direct/executor.py 97.01% <0.00%> (+0.54%) ⬆️
sdks/python/apache_beam/utils/interactive_utils.py 97.56% <0.00%> (+2.43%) ⬆️

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

@github-actions
Copy link
Contributor

Assigning reviewers. If you would like to opt out of this review, comment assign to next reviewer:

R: @damccorm for label python.

Available commands:

  • stop reviewer notifications - opt out of the automated review tooling
  • remind me after tests pass - tag the comment author after tests pass
  • waiting on author - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)

The PR bot will only process comments in the main thread (not review comments).

Copy link
Contributor

@damccorm damccorm left a comment

Choose a reason for hiding this comment

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

Actually, could you add a test that doesn't throw with a non-builtin generic?

Copy link
Contributor

@damccorm damccorm left a comment

Choose a reason for hiding this comment

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

Thanks!

dependabot bot and others added 8 commits January 19, 2023 13:18
…5075)

Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.107.0 to 0.108.0.
- [Release notes](https://github.com/googleapis/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md)
- [Commits](googleapis/google-api-go-client@v0.107.0...v0.108.0)

---
updated-dependencies:
- dependency-name: google.golang.org/api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* fix input type

* use sys for size
…che#25080)

* Add support for templating in Tour of Beam learning materials

* Process learning materials through the template engine

* refactoring ci/cd for templated learning materials

* adding template processing

* refactoring learning content

* fixing incorrect sample path

* minor formatting comments

* missed complexity added add code review comments

* fix possible  err overwrite

Co-authored-by: Timur Sultanov <timur.sultanov@akvelon.com>
* Add support for using builtins typing

* lint and formatting

* tests

* fix tests

* fix tests

* fix tests

* fix tests
@jrmccluskey
Copy link
Contributor Author

Something didn't work syncing to master, just going to close this PR and open a new one

@jrmccluskey jrmccluskey deleted the narrowError branch July 11, 2023 18:19
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.

6 participants