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-108927: Fix test_import + test_importlib + test_unittest problem #108929

Merged
merged 2 commits into from
Sep 5, 2023

Conversation

sobolevn
Copy link
Member

@sobolevn sobolevn commented Sep 5, 2023

After:

» ./python.exe -m test test_import test_importlib test_unittest
0:00:00 load avg: 3.43 Run tests sequentially
0:00:00 load avg: 3.43 [1/3] test_import
0:00:01 load avg: 3.43 [2/3] test_importlib
0:00:05 load avg: 3.55 [3/3] test_unittest

== Tests result: SUCCESS ==

All 3 tests OK.

Total duration: 9.4 sec
Total tests: run=2,413 skipped=11
Total test files: run=3/3
Result: SUCCESS

This is more like "hidding things under the carpet" and not a "proper fix", I think.
But, it should be enough to unblock the release.

@@ -6,7 +6,6 @@
import pickle
from test import support
from test.support import import_helper
import test.test_importlib.util
Copy link
Member

Choose a reason for hiding this comment

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

I'm curious why such standard import triggers a bug. Maybe give a try to test.bisect_cmd to isolate exactly which tests are the bare minimum to trigger it.

@Yhg1s
Copy link
Member

Yhg1s commented Sep 5, 2023

#108952 is a more proper fix, but I think it needs a bit more discussion. I'm going to land this so the 3.12.0rc2 release process is a bit more clean, but we should still try to solve the more structural problem.

@Yhg1s Yhg1s added the needs backport to 3.12 bug and security fixes label Sep 5, 2023
@Yhg1s Yhg1s enabled auto-merge (squash) September 5, 2023 18:24
@Yhg1s Yhg1s merged commit 3f89b25 into python:main Sep 5, 2023
15 checks passed
@miss-islington
Copy link
Contributor

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

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 5, 2023
…blem (pythonGH-108929)

(cherry picked from commit 3f89b25)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
@bedevere-bot
Copy link

GH-108954 is a backport of this pull request to the 3.12 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.12 bug and security fixes label Sep 5, 2023
Yhg1s pushed a commit that referenced this pull request Sep 5, 2023
…oblem (GH-108929) (#108954)

gh-108927: Fix test_import + test_importlib + test_unittest problem (GH-108929)
(cherry picked from commit 3f89b25)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
@lordmauve
Copy link
Contributor

Please can we backport this to 3.11 as well? I'm seeing this issue in 3.11.6 and earlier.

@vstinner vstinner added the needs backport to 3.11 only security fixes label Oct 4, 2023
@miss-islington
Copy link
Contributor

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

@bedevere-app
Copy link

bedevere-app bot commented Oct 4, 2023

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

@bedevere-app bedevere-app bot removed the needs backport to 3.11 only security fixes label Oct 4, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 4, 2023
…blem (pythonGH-108929)

(cherry picked from commit 3f89b25)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
@vstinner
Copy link
Member

vstinner commented Oct 4, 2023

Please can we backport this to 3.11 as well? I'm seeing this issue in 3.11.6 and earlier.

Done. It was forgotten, tests should be backported to all bugfix branches.

vstinner pushed a commit that referenced this pull request Oct 4, 2023
…oblem (GH-108929) (#110347)

gh-108927: Fix test_import + test_importlib + test_unittest problem (GH-108929)
(cherry picked from commit 3f89b25)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
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.

6 participants