From 972a74219dfa7e2c11ed3247f2de42998f1edbbc Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Wed, 13 Jul 2016 11:26:35 +0800 Subject: [PATCH] monkey-patch Python 3.5.2 to disable broken asyncio.base_events._ipaddr_info optimization (#506) --- artiq/monkey_patches.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/artiq/monkey_patches.py b/artiq/monkey_patches.py index 43504daaf..9882eb348 100644 --- a/artiq/monkey_patches.py +++ b/artiq/monkey_patches.py @@ -155,3 +155,12 @@ if sys.version_info[:3] == (3, 5, 1): from asyncio import proactor_events proactor_events._ProactorBaseWritePipeTransport._loop_writing = _loop_writing + + +if sys.version_info[:3] == (3, 5, 2): + import asyncio + + # See https://github.com/m-labs/artiq/issues/506 + def _ipaddr_info(host, port, family, type, proto): + return None + asyncio.base_events._ipaddr_info = _ipaddr_info