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

gh-94816: Improve coverage of decode_linetable #94853

Merged
merged 4 commits into from
Jul 14, 2022

Conversation

mdboom
Copy link
Contributor

@mdboom mdboom commented Jul 14, 2022

This makes calls to co_lnotab to exercise this code, as well
as generating synthetically large code to exercise the corner
cases where line numbers need multiple bytes.

Automerge-Triggered-By: GH:brandtbucher

@bedevere-bot bedevere-bot added tests Tests in the Lib/test dir awaiting review labels Jul 14, 2022
This makes calls to co_lnotab to exercise this code, as well
as generating synthetically large code to exercise the corner
cases where line numbers need multiple bytes.
@mdboom mdboom force-pushed the codeobject-getlnotab-coverage branch from 0d9d83d to 5e8ec42 Compare July 14, 2022 15:43
Copy link
Member

@brandtbucher brandtbucher left a comment

Choose a reason for hiding this comment

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

Thanks! A few notes:

Lib/test/test_code.py Outdated Show resolved Hide resolved
Lib/test/test_code.py Outdated Show resolved Hide resolved
@mdboom mdboom requested a review from brandtbucher July 14, 2022 19:17
Copy link
Member

@brandtbucher brandtbucher left a comment

Choose a reason for hiding this comment

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

One tiny suggestion (not a big deal, though). Just let me know when you're happy with it and I'll merge.

I'm guessing we won't be backporting any of these?

Lib/test/test_code.py Outdated Show resolved Hide resolved
Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
@mdboom mdboom force-pushed the codeobject-getlnotab-coverage branch from e4e54f2 to c77f49d Compare July 14, 2022 19:46
@mdboom
Copy link
Contributor Author

mdboom commented Jul 14, 2022

One tiny suggestion (not a big deal, though). Just let me know when you're happy with it and I'll merge.

Good suggestion. I made one tweak (the first opcode is a 2, not a 0). I'm fine with this now.

I'm guessing we won't be backporting any of these?

IMHO, I think it would be good to backport these to 3.11, but I defer to those with more experience with the process. I don't have perms to add the backport label ;)

@mdboom
Copy link
Contributor Author

mdboom commented Jul 14, 2022

Windows x86 failure seems unrelated?

@brandtbucher
Copy link
Member

Windows x86 failure seems unrelated?

Rerunning it now. I'll merge on success, then we can discuss on #94808 whether these should be backported.

@miss-islington
Copy link
Contributor

Status check is done, and it's a success ✅ .

@miss-islington miss-islington merged commit 20b9d2a into python:main Jul 14, 2022
@brandtbucher brandtbucher added the needs backport to 3.11 only security fixes label Jul 15, 2022
@miss-islington
Copy link
Contributor

Thanks @mdboom for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Sorry @mdboom, I had trouble checking out the 3.11 backport branch.
Please backport using cherry_picker on command line.
cherry_picker 20b9d2a658059c8c1624400f60bb6ba19a31ee9b 3.11

@miss-islington miss-islington self-assigned this Jul 15, 2022
@brandtbucher brandtbucher added needs backport to 3.11 only security fixes and removed needs backport to 3.11 only security fixes labels Jul 15, 2022
@miss-islington
Copy link
Contributor

Thanks @mdboom for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 15, 2022
This makes calls to co_lnotab to exercise this code, as well
as generating synthetically large code to exercise the corner
cases where line numbers need multiple bytes.

Automerge-Triggered-By: GH:brandtbucher
(cherry picked from commit 20b9d2a)

Co-authored-by: Michael Droettboom <mdboom@gmail.com>
@bedevere-bot bedevere-bot removed the needs backport to 3.11 only security fixes label Jul 15, 2022
@bedevere-bot
Copy link

GH-94884 is a backport of this pull request to the 3.11 branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip news tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants