aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_logging.py
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2024-06-05 07:25:47 +0100
committerGitHub <noreply@github.com>2024-06-05 07:25:47 +0100
commit983efcf15b2503fe0c05d5e03762385967962b33 (patch)
treecd2ec5cd1d56cbee9ac2729d40264c88b4f82cd7 /Lib/test/test_logging.py
parentb6b0dcbfc054f581b6f78602e4c2e9474e3efe21 (diff)
downloadcpython-983efcf15b2503fe0c05d5e03762385967962b33.tar.gz
cpython-983efcf15b2503fe0c05d5e03762385967962b33.zip
gh-119819: Update logging configuration to support joinable multiproc… (GH-120090)
gh-119819: Update logging configuration to support joinable multiprocessing manager queues.
Diffstat (limited to 'Lib/test/test_logging.py')
-rw-r--r--Lib/test/test_logging.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py
index 0c9a24e58df..ef2d4a621be 100644
--- a/Lib/test/test_logging.py
+++ b/Lib/test/test_logging.py
@@ -3928,12 +3928,16 @@ class ConfigDictTest(BaseTest):
def test_multiprocessing_queues(self):
# See gh-119819
- import_helper.import_module('_multiprocessing') # will skip test if it's not available
+
+ # will skip test if it's not available
+ import_helper.import_module('_multiprocessing')
+
cd = copy.deepcopy(self.config_queue_handler)
from multiprocessing import Queue as MQ, Manager as MM
q1 = MQ() # this can't be pickled
q2 = MM().Queue() # a proxy queue for use when pickling is needed
- for qspec in (q1, q2):
+ q3 = MM().JoinableQueue() # a joinable proxy queue
+ for qspec in (q1, q2, q3):
fn = make_temp_file('.log', 'test_logging-cmpqh-')
cd['handlers']['h1']['filename'] = fn
cd['handlers']['ah']['queue'] = qspec