-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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 Fix jump offsets opcodes #22940
Conversation
Checks are failing. Will not request review until checks are succeeding. If you'd like to override that behavior, comment |
Codecov Report
@@ Coverage Diff @@
## master #22940 +/- ##
==========================================
+ Coverage 73.90% 73.91% +0.01%
==========================================
Files 713 714 +1
Lines 94464 94671 +207
==========================================
+ Hits 69809 69975 +166
- Misses 23358 23399 +41
Partials 1297 1297
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
R: @robertwb |
Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control |
retest this please |
R: @AnandInguva |
# Python 3.10: bpo-27129 changes jump offsets to use instruction offsets, | ||
# not byte offsets. The offsets were halved (16 bits fro instructions vs 8 | ||
# bits for bytes), so we have to double the value of arg. | ||
if (sys.version_info.major, sys.version_info.minor) == (3, 10): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we use the 2 multiplier for all minor versions >= 10 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I'll change it. When I wrote == (3, 10)
, I was thinking of GEN_START
which was added in 3.10, but then removed in 3.11.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated.
Merged into the 3.10 feature branch #22995 |
This pull request has been marked as stale due to 60 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the dev@beam.apache.org list. Thank you for your contributions. |
Fixes #21671
The issue was caused by a deliberate change in behavior in Python 3.10 due to bpo-27129. The offsets were originally byte (8 bits) offsets in Python 3.9, but instruction (16 bits) offsets in Python 3.10. The opcode numbers were halved, so to compensate, I had to double them again when reading it.
A few other tests were failing too. I had to add an opcode due to bpo-43683 in which a new bytecode GEN_START was added.
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
R: @username
).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, commentfixes #<ISSUE NUMBER>
instead.CHANGES.md
with noteworthy changes.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)
See CI.md for more information about GitHub Actions CI.