mirror of
https://github.com/python/cpython.git
synced 2025-08-09 19:38:42 +00:00
[3.12] gh-119819: Fix regression to allow logging configuration with multipr… (GH-120030) (GH-120034)
(cherry picked from commit 99d945c0c0
)
This commit is contained in:
parent
fe68908c54
commit
0e150c36de
3 changed files with 31 additions and 1 deletions
|
@ -788,8 +788,10 @@ class DictConfigurator(BaseConfigurator):
|
|||
# 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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue