remove workaround_asyncio263

This commit is contained in:
Sebastien Bourdeauducq 2015-12-20 23:26:48 +08:00
parent a26ffc5bfb
commit 183e855229
5 changed files with 6 additions and 15 deletions

View File

@ -2,7 +2,7 @@ import asyncio
import logging
from artiq.protocols.asyncio_server import AsyncioServer
from artiq.tools import TaskObject, workaround_asyncio263
from artiq.tools import TaskObject
logger = logging.getLogger(__name__)
@ -123,7 +123,6 @@ class LogForwarder(logging.Handler, TaskObject):
while True:
message = await self._queue.get() + "\n"
writer.write(message.encode())
await workaround_asyncio263()
await writer.drain()
except asyncio.CancelledError:
return

View File

@ -16,7 +16,6 @@ from functools import partial
from artiq.protocols import pyon
from artiq.protocols.asyncio_server import AsyncioServer
from artiq.tools import workaround_asyncio263
_init_string = b"ARTIQ sync_struct\n"
@ -233,7 +232,6 @@ class Publisher(AsyncioServer):
line = await queue.get()
writer.write(line)
# raise exception on connection error
await workaround_asyncio263()
await writer.drain()
finally:
self._recipients[notifier_name].remove(queue)

View File

@ -19,7 +19,7 @@ from artiq.protocols import pyon
__all__ = ["artiq_dir", "parse_arguments", "elide", "short_format", "file_import",
"get_experiment", "verbosity_args", "simple_network_args", "init_logger",
"atexit_register_coroutine", "exc_to_warning", "asyncio_wait_or_cancel",
"TaskObject", "Condition", "workaround_asyncio263", "get_windows_drives"]
"TaskObject", "Condition", "get_windows_drives"]
logger = logging.getLogger(__name__)
@ -195,12 +195,6 @@ class Condition:
fut.set_result(False)
# See: https://github.com/python/asyncio/issues/263
@asyncio.coroutine
def workaround_asyncio263():
yield
def get_windows_drives():
from ctypes import windll

View File

@ -29,13 +29,13 @@ build:
requirements:
build:
- python >=3.5.0
- python >=3.5.1
- setuptools
- numpy
- pyelftools
- binutils-or1k-linux
run:
- python >=3.5.0
- python >=3.5.1
- llvmlite-artiq
- scipy
- numpy

View File

@ -7,8 +7,8 @@ import os
import versioneer
if sys.version_info[:3] < (3, 5, 0):
raise Exception("You need Python 3.5.0+")
if sys.version_info[:3] < (3, 5, 1):
raise Exception("You need Python 3.5.1+")
requirements = [