Skip to content

Commit

Permalink
monkey-patch Python 3.5.2 to disable broken asyncio.base_events._ipad…
Browse files Browse the repository at this point in the history
…dr_info optimization (#506)
sbourdeauducq committed Jul 13, 2016
1 parent c5ba44b commit 1c32d4f
Showing 5 changed files with 17 additions and 0 deletions.
13 changes: 13 additions & 0 deletions artiq/monkey_patches.py
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions artiq/protocols/broadcast.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import asyncio

from artiq.monkey_patches import *
from artiq.protocols import pyon
from artiq.protocols.asyncio_server import AsyncioServer

1 change: 1 addition & 0 deletions artiq/protocols/logging.py
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@
import logging
import re

from artiq.monkey_patches import *
from artiq.protocols.asyncio_server import AsyncioServer
from artiq.tools import TaskObject, MultilineFormatter

1 change: 1 addition & 0 deletions artiq/protocols/pc_rpc.py
Original file line number Diff line number Diff line change
@@ -19,6 +19,7 @@
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 *
1 change: 1 addition & 0 deletions artiq/protocols/sync_struct.py
Original file line number Diff line number Diff line change
@@ -14,6 +14,7 @@
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

0 comments on commit 1c32d4f

Please sign in to comment.