Skip to content

Don't require _testcapi for test_code - #152185

Merged
StanFromIreland merged 3 commits into
python:mainfrom
ShaharNaveh:test-code-testcapi
Jun 25, 2026
Merged

Don't require _testcapi for test_code#152185
StanFromIreland merged 3 commits into
python:mainfrom
ShaharNaveh:test-code-testcapi

Conversation

@ShaharNaveh

Copy link
Copy Markdown
Contributor

@bedevere-appbedevere-appBot added tests Tests in the Lib/test dir awaiting review labels Jun 25, 2026

@StanFromIrelandStanFromIreland left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please do:

code_offset_to_line=import_helper.import_module("_testcapi").code_offset_to_line

like we have in test_newempty.

Comment threadLib/test/test_code.py

def test_co_branches(self):
_testcapi = import_helper.import_module("_testcapi")
code_offset_to_line = _testcapi.code_offset_to_line

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

I can make it to a single line if that's preferred, I think it looks better this way but I don't feel strongly about it

@StanFromIreland
StanFromIreland merged commit 11c241e into python:mainJun 25, 2026
52 checks passed
@StanFromIrelandStanFromIreland added awaiting merge needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes labels Jun 25, 2026
@miss-islington-app

Copy link
Copy Markdown

Thanks @ShaharNaveh for the PR, and @StanFromIreland for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

@miss-islington-app

Copy link
Copy Markdown

Thanks @ShaharNaveh for the PR, and @StanFromIreland for merging it 🌮🎉.. I'm working now to backport this PR to: 3.15.
🐍🍒⛏🤖

@miss-islington-app

Copy link
Copy Markdown

Thanks @ShaharNaveh for the PR, and @StanFromIreland for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

@bedevere-app

Copy link
Copy Markdown

GH-152201 is a backport of this pull request to the 3.14 branch.

@bedevere-appbedevere-appBot removed the needs backport to 3.14 bugs and security fixes label Jun 25, 2026
@miss-islington-app

Copy link
Copy Markdown

Sorry, @ShaharNaveh and @StanFromIreland, I could not cleanly backport this to 3.13 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 11c241e1a8a71b5f25a304b1f428467b746f5d43 3.13

@bedevere-app

Copy link
Copy Markdown

GH-152202 is a backport of this pull request to the 3.15 branch.

@bedevere-appbedevere-appBot removed the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Jun 25, 2026
@StanFromIrelandStanFromIreland removed the needs backport to 3.13 bugs and security fixes label Jun 25, 2026
StanFromIreland added a commit that referenced this pull request Jun 25, 2026
(cherry picked from commit 11c241e)
Co-authored-by: Shahar Naveh <50263213+ShaharNaveh@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <stan@python.org>
StanFromIreland added a commit that referenced this pull request Jun 25, 2026
(cherry picked from commit 11c241e)
Co-authored-by: Shahar Naveh <50263213+ShaharNaveh@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <stan@python.org>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@ShaharNaveh@StanFromIreland