-
-
Notifications
You must be signed in to change notification settings - Fork 31.4k
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-119819: Fix regression to allow logging configuration with multipr… #120030
Conversation
…ultiprocessing queue types.
Thanks @vsajip for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12. |
Thanks @vsajip for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13. |
…ultipr… (pythonGH-120030) (cherry picked from commit 99d945c) Co-authored-by: Vinay Sajip <vinay_sajip@yahoo.co.uk>
GH-120034 is a backport of this pull request to the 3.12 branch. |
…ultipr… (pythonGH-120030) (cherry picked from commit 99d945c) Co-authored-by: Vinay Sajip <vinay_sajip@yahoo.co.uk>
GH-120035 is a backport of this pull request to the 3.13 branch. |
|
@@ -3926,6 +3926,32 @@ def test_config_queue_handler(self): | |||
msg = str(ctx.exception) | |||
self.assertEqual(msg, "Unable to configure handler 'ah'") | |||
|
|||
@unittest.skipIf(support.is_wasi, "WASI does not have multiprocessing.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of checking specifically for WASI, tests that use subprocesses should use @support.requires_subprocess()
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But this test doesn't use subprocess
, only multiprocessing
- I'm not sure if that requires_subprocess
is appropriate. I can't (yet) tell whether the problem is inherent to the platform (iOS ARM64 Simulator) or, if I need to tighten the skip conditions for the test, exactly what the condition should be. It doesn't appear, from the tracebacks, that multiprocessing
isn't supported - on WASI, for example, you get an error because _multiprocessing
can't be imported. I'll do some more digging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The error on iOS is exactly the same: see the bottom of the traceback above. The fact that multiprocessing
isn't available on iOS is already mentioned in the documentation.
An even more specific check would be support.skip_if_broken_multiprocessing_synchronize()
, which is already used a few times in test_logging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The error on iOS is exactly the same
Yes, I missed that for some reason. Perhaps the answer is to add a support.skip_if_no_multiprocessing
, as support.skip_if_broken_multiprocessing_synchronize
seems too specific for this particular test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than adding a specific skip function, you could just do import_helper.import_module('_multiprocessing')
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I've already done that 😄
|
…ocessing queue types.