8000 gh-115490: Work around test.support.interpreters.channels not handling unloading by Yhg1s · Pull Request #115515 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-115490: Work around test.support.interpreters.channels not handling unloading #115515

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

Merged
merged 1 commit into from
Feb 15, 2024

Conversation

Yhg1s
Copy link
Member
@Yhg1s Yhg1s commented Feb 15, 2024

Work around test.support.interpreters.channels not handling unloading, which regrtest does when running tests sequentially, by explicitly skipping the unloads of test.support.interpreters and its submodules.

This can be rolled back once test.support.interpreters.channels supports unloading, if we are keeping sequential runs in the same process around.

…, which

regrtest does when running tests sequentially, by explicitly skipping the
unloading of test.support.interpreters and its submodules.

This can be rolled back once test.support.interpreters.channels supports
unloading, if we are keeping sequential runs in the same process around.
Copy link
Member
@vstinner vstinner left a comment

Choose a reason for hiding this comment

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

LGTM.

@ericsnowcurrently: test_interpreters should do something about that in a tearDownModule() function, or find a workaround, rather than having to use such hack in regrtest :-(

I approve this PR to unblock Python 3.13 alpha4 release.

cc @serhiy-storchaka

@Yhg1s Yhg1s merged commit b0e5c35 into python:main Feb 15, 2024
@Yhg1s Yhg1s deleted the libregrtest-interpreters branch February 15, 2024 13:24
@vstinner
Copy link
Member

@ericsnowcurrently: Is Python 3.12 affected?

@Yhg1s
Copy link
Member Author
Yhg1s commented Feb 15, 2024

No. test_interpreters.test_channels doesn't exist in 3.12, and running test_interpreters twice in the same process doesn't show any issues:

./python -m test test_interpreters test_interpreters
Using random seed: 531474967
0:00:00 load avg: 2.24 Run 2 tests sequentially
0:00:00 load avg: 2.24 [1/2] test_interpreters
0:00:03 load avg: 2.06 [2/2] test_interpreters

== Tests result: SUCCESS ==

All 2 tests OK.

@encukou
Copy link
Member
encukou commented Feb 15, 2024

test_interpreters should do something about that in a tearDownModule() function

For the record, that fix is here: #115493

@vstinner
Copy link
Member

No. test_interpreters.test_channels doesn't exist in 3.12, and running test_interpreters twice in the same process doesn't show any issues:

Thanks for the confirmation.

ericsnowcurrently added a commit to ericsnowcurrently/cpython that referenced this pull request Mar 4, 2024
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.

4 participants
0