gh-119819: Fix regression to allow logging configuration with multipr… (GH-120030)

This commit is contained in:
Vinay Sajip 2024-06-04 13:20:50 +01:00 committed by GitHub
parent dce14bb2dc
commit 99d945c0c0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 31 additions and 1 deletions

View file

@ -781,8 +781,10 @@ def configure_handler(self, config):
# raise ValueError('No handlers specified for a QueueHandler')
if 'queue' in config:
from multiprocessing.queues import Queue as MPQueue
from multiprocessing import Manager as MM
proxy_queue = MM().Queue()
qspec = config['queue']
if not isinstance(qspec, (queue.Queue, MPQueue)):
if not isinstance(qspec, (queue.Queue, MPQueue, type(proxy_queue))):
if isinstance(qspec, str):
q = self.resolve(qspec)
if not callable(q):