diff --git a/Lib/test/test_asyncio/test_streams.py b/Lib/test/test_asyncio/test_streams.py index 0929495ea7f..ef4fe8aacaa 100644 --- a/Lib/test/test_asyncio/test_streams.py +++ b/Lib/test/test_asyncio/test_streams.py @@ -615,7 +615,7 @@ os.close(fd) logger = logging.getLogger('asyncio') log_level = logger.level try: - log_handler = logging.StreamHandler(sys.stderr) + log_handler = logging.StreamHandler(sys.__stderr__) logger.addHandler(log_handler) logger.setLevel(logging.DEBUG) # FIXME: Debug code for issue #21645 ---