Skip to content

Conversation

@duaneg
Copy link
Contributor

@duaneg duaneg commented Sep 8, 2025

With the fix for gh-126631 __main__ modules can be preloaded and the regression test for gh-135335 can be simplified to just use a self-contained script rather than requiring a module.

Note this assumes and implicitly tests that __main__ is preloaded by default.

With the fix for pythongh-126631 __main__ modules can be preloaded and the regression
test for pythongh-135335 can be simplified to just use a self-contained script rather
than requiring a module.

Note this assumes and implicitly tests that __main__ is preloaded by default.
@duaneg
Copy link
Contributor Author

duaneg commented Sep 8, 2025

I don't believe this needs a news entry, as it is just a refactoring/simplification of an existing regression test.

@gpshead gpshead self-assigned this Nov 23, 2025
@gpshead gpshead added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes tests Tests in the Lib/test dir labels Nov 23, 2025
@gpshead gpshead merged commit 425f24e into python:main Nov 23, 2025
54 checks passed
@miss-islington-app
Copy link

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

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Nov 23, 2025
…honGH-138686)

Simplify preload regression test using `__main__`

With the fix for pythongh-126631 `__main__` modules can be preloaded and the regression
test for pythongh-135335 can be simplified to just use a self-contained script rather
than requiring a module.

Note this assumes and implicitly tests that `__main__` is preloaded by default.
(cherry picked from commit 425f24e)

Co-authored-by: Duane Griffin <duaneg@dghda.com>
@bedevere-app
Copy link

bedevere-app bot commented Nov 23, 2025

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

@bedevere-app bedevere-app bot removed the needs backport to 3.14 bugs and security fixes label Nov 23, 2025
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Nov 23, 2025
…honGH-138686)

Simplify preload regression test using `__main__`

With the fix for pythongh-126631 `__main__` modules can be preloaded and the regression
test for pythongh-135335 can be simplified to just use a self-contained script rather
than requiring a module.

Note this assumes and implicitly tests that `__main__` is preloaded by default.
(cherry picked from commit 425f24e)

Co-authored-by: Duane Griffin <duaneg@dghda.com>
@bedevere-app
Copy link

bedevere-app bot commented Nov 23, 2025

GH-141887 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Nov 23, 2025
gpshead pushed a commit that referenced this pull request Nov 24, 2025
…-138686) (#141886)

gh-135335: Simplify preload regression test using __main__ (GH-138686)

Simplify preload regression test using `__main__`

With the fix for gh-126631 `__main__` modules can be preloaded and the regression
test for gh-135335 can be simplified to just use a self-contained script rather
than requiring a module.

Note this assumes and implicitly tests that `__main__` is preloaded by default.
(cherry picked from commit 425f24e)

Co-authored-by: Duane Griffin <duaneg@dghda.com>
gpshead pushed a commit that referenced this pull request Nov 24, 2025
…-138686) (#141887)

gh-135335: Simplify preload regression test using __main__ (GH-138686)

Simplify preload regression test using `__main__`

With the fix for gh-126631 `__main__` modules can be preloaded and the regression
test for gh-135335 can be simplified to just use a self-contained script rather
than requiring a module.

Note this assumes and implicitly tests that `__main__` is preloaded by default.
(cherry picked from commit 425f24e)

Co-authored-by: Duane Griffin <duaneg@dghda.com>
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 type-refactor Code refactoring (with no changes in behavior)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants