forked from M-Labs/artiq
1
0
Fork 0

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

This commit is contained in:
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 import asyncio
from artiq.monkey_patches import *
from artiq.protocols import pyon from artiq.protocols import pyon
from artiq.protocols.asyncio_server import AsyncioServer from artiq.protocols.asyncio_server import AsyncioServer

View File

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

View File

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

View File

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