From 6c5a6dc7ca482132834e3e553c67a0d6f3d4bdd8 Mon Sep 17 00:00:00 2001 From: Seth Foster Date: Thu, 29 Feb 2024 15:42:54 -0500 Subject: [PATCH] fix(api): Do not pass loop arg to subproc (#14570) asyncio subprocess used to need loop; now it doesn't. For a minimum-affected fix, just don't pass loop to the subprocess invocations while keeping it in the top level environment. Closes RQA-2417 --- api/src/opentrons/hardware_control/modules/update.py | 1 - api/tests/opentrons/hardware_control/test_modules.py | 1 - 2 files changed, 2 deletions(-) diff --git a/api/src/opentrons/hardware_control/modules/update.py b/api/src/opentrons/hardware_control/modules/update.py index 519bb9bbf2a..6f5a5cbe230 100644 --- a/api/src/opentrons/hardware_control/modules/update.py +++ b/api/src/opentrons/hardware_control/modules/update.py @@ -34,7 +34,6 @@ async def update_firmware( kwargs: Dict[str, Any] = { "stdout": asyncio.subprocess.PIPE, "stderr": asyncio.subprocess.PIPE, - "loop": loop, } successful, res = await module.bootloader()( flash_port_or_dfu_serial, str(firmware_file), kwargs diff --git a/api/tests/opentrons/hardware_control/test_modules.py b/api/tests/opentrons/hardware_control/test_modules.py index 49e6ba4b766..f2471bb1bc8 100644 --- a/api/tests/opentrons/hardware_control/test_modules.py +++ b/api/tests/opentrons/hardware_control/test_modules.py @@ -240,7 +240,6 @@ def async_return(result): bootloader_kwargs = { "stdout": asyncio.subprocess.PIPE, "stderr": asyncio.subprocess.PIPE, - "loop": loop, } upload_via_avrdude_mock = mock.Mock(