The Wayback Machine - https://web.archive.org/web/20240111222511/https://github.com/python/cpython/pull/113704
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-113692: skip a test if multiprocessing isn't available. #113704

Merged
merged 2 commits into from Jan 9, 2024

Conversation

vsajip
Copy link
Member

@vsajip vsajip commented Jan 4, 2024

@vsajip vsajip added the tests Tests in the Lib/test dir label Jan 4, 2024
@vsajip vsajip added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Jan 4, 2024
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @vsajip for commit e923a3b 🤖

If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Jan 4, 2024
@vsajip vsajip added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Jan 5, 2024
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @vsajip for commit 0cb39ea 🤖

If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Jan 5, 2024
Copy link
Contributor

@hauntsaninja hauntsaninja left a comment

Choose a reason for hiding this comment

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

Looks good!

(should we set required_on to at least one platform as typo protection?)

@vsajip
Copy link
Member Author

vsajip commented Jan 7, 2024

Looks good!
(should we set required_on to at least one platform as typo protection?)

Thanks. Do you think that's needed for this specific issue? It seems a simple enough change. Not sure what you mean by typo protection. 

@brettcannon brettcannon added the needs backport to 3.12 bug and security fixes label Jan 8, 2024
@brettcannon
Copy link
Member

Not sure what you mean by typo protection.

I think @hauntsaninja is suggesting we require this pass on some platform to avoid a typo in the name of the module being imported since there's no error checking the module name is legitimate (although could that check be added thanks to sys.stdlib_module_names?).

@vsajip I added the backport label as I think this needs to land in 3.12 as well.

@vsajip vsajip merged commit 842b738 into python:main Jan 9, 2024
84 of 111 checks passed
@miss-islington-app
Copy link

Thanks @vsajip for the PR 🌮🎉.. 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 Jan 9, 2024
@vsajip vsajip deleted the fix-113692 branch January 9, 2024 07:47
@bedevere-app
Copy link

bedevere-app bot commented Jan 9, 2024

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

@bedevere-app bedevere-app bot removed the needs backport to 3.12 bug and security fixes label Jan 9, 2024
vsajip pushed a commit that referenced this pull request Jan 9, 2024
@hauntsaninja
Copy link
Contributor

hauntsaninja commented Jan 9, 2024

Yup, that's what I meant :-) Looks like sys.stdlib_module_names won't do the trick, it doesn't include things like _xxsubinterpreters or _wmi (and works less well for e.g. concurrent.futures)

@vsajip
Copy link
Member Author

vsajip commented Jan 9, 2024

Perhaps import_helper.import_module could be enhanced to do these checks? Wouldn't that be the best place for such?

@hauntsaninja
Copy link
Contributor

hauntsaninja commented Jan 9, 2024

Yeah, I took Brett's suggestion to mean we add a check against sys.stdlib_module_names in import_helper.import_module. Doing that naively doesn't work for the reasons I mention above, and not sure this is important enough to make an allowlist for it or whatever.

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.

None yet

4 participants