GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [3.11] gh-94816: Improve coverage of decode_linetable (GH-94853) by miss-islington · Pull Request #94884 · python/cpython

Conversation

@miss-islington

@miss-islington miss-islington commented Jul 15, 2022 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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 [email protected]

  • Issue: [coverage] codeobject.c: decode_linetable #94816

Automerge-Triggered-By: GH:brandtbucher

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@mdboom @miss-islington
pythongh-94816: Improve coverage of decode_linetable (pythonGH-94853)
f8d5018
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 <[email protected]>
@miss-islington

miss-islington commented Jul 15, 2022

Copy link
Copy Markdown
Contributor Author

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot mentioned this pull request Jul 15, 2022
gh-94816: Improve coverage of decode_linetable #94853
Merged
@bedevere-bot bedevere-bot added skip news tests Tests in the Lib/test dir awaiting review labels Jul 15, 2022
@brandtbucher brandtbucher added the 🤖 automerge label Jul 15, 2022
@brandtbucher

brandtbucher commented Jul 15, 2022

Copy link
Copy Markdown
Member

Hm, this backport revealed a weakness in the test: every time we change the number of instructions (including caches) in any of these code objects, these tests will need to be updated. I don't even think that just checking the length is future-proof?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@miss-islington

miss-islington commented Jul 15, 2022

Copy link
Copy Markdown
Contributor Author

@mdboom: Status check is done, and it's a success ❌ .

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mdboom

mdboom commented Jul 18, 2022 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Yikes. Yes, perhaps we revert this. My main concern for coverage here was that when there are 4-byte line numbers that things still make sense / don't crash. I think as long as we can assert that somehow, we can remove the doctest part of this entirely.

EDIT: I confused this with another coverage issue. In this case, we just don't call decode_linetable at all.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@iritkatriel

iritkatriel commented Jul 18, 2022

Copy link
Copy Markdown
Member

@markshannon has created #90916, and I guess the same applies to test_code as well.

We should have a test for each of the features, but not a large number of test cases that all test many things.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mdboom mdboom mentioned this pull request Jul 18, 2022
Revert "gh-94816: Improve coverage of decode_linetable" #94982
Merged
@mdboom

mdboom commented Jul 18, 2022

Copy link
Copy Markdown
Contributor

We should close this (I don't have permissions) and I filed a PR to revert this on main: #94982

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@iritkatriel iritkatriel closed this Jul 18, 2022
@miss-islington
miss-islington deleted the backport-20b9d2a-3.11 branch January 2, 2026 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

awaiting review skip news tests Tests in the Lib/test dir

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@miss-islington @brandtbucher @mdboom @iritkatriel @bedevere-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.