monkey-patch Python 3.5.2 to disable broken asyncio.base_events._ipaddr_info optimization (#506)

pull/605/head
Sebastien Bourdeauducq 2016-07-13 11:35:16 +08:00
parent c5ba44b8a6
commit 1c32d4fb71
5 changed files with 17 additions and 0 deletions

13
artiq/monkey_patches.py Normal file
View File

@ -0,0 +1,13 @@
import sys
__all__ = []
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

View File

@ -1,5 +1,6 @@
import asyncio
from artiq.monkey_patches import *
from artiq.protocols import pyon
from artiq.protocols.asyncio_server import AsyncioServer

View File

@ -2,6 +2,7 @@ import asyncio
import logging
import re
from artiq.monkey_patches import *
from artiq.protocols.asyncio_server import AsyncioServer
from artiq.tools import TaskObject, MultilineFormatter

View File

@ -19,6 +19,7 @@ import logging
import inspect
from operator import itemgetter
from artiq.monkey_patches import *
from artiq.protocols import pyon
from artiq.protocols.asyncio_server import AsyncioServer as _AsyncioServer
from artiq.protocols.packed_exceptions import *

View File

@ -14,6 +14,7 @@ import asyncio
from operator import getitem
from functools import partial
from artiq.monkey_patches import *
from artiq.protocols import pyon
from artiq.protocols.asyncio_server import AsyncioServer