[issue42544] In windows, asyncio.run_in_executor strips logger class information from modified logging.Logger objects

Alex Sherman report at bugs.python.org
Wed Dec 2 15:45:17 EST 2020


New submission from Alex Sherman <adsherman09 at gmail.com>:

IN WINDOWS asyncio's loop.run_in_executor(pool, callback, logger, *args) strips the subclass information about logging.Loggers when passed into concurrent.futures.ProcessPoolExecutor. The logger behaves as a default logging.Logger object as far as I can tell.

Run the attached file to see via print statements that the logger information (such as additional verbosity and file handling) is all removed from the logger but only inside the loop.run_in_executor call. 

This is a windows specific error. Tested on windows 10 (misbehaved) and ubuntu 18.04 (behaved as expected).

----------
components: IO, asyncio
files: example_logger_behavior.py
messages: 382335
nosy: adsherman09, asvetlov, yselivanov
priority: normal
severity: normal
status: open
title: In windows, asyncio.run_in_executor strips logger class information from modified logging.Logger objects
type: behavior
versions: Python 3.8
Added file: https://bugs.python.org/file49648/example_logger_behavior.py

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42544>
_______________________________________


More information about the Python-bugs-list mailing list