diff --git a/artiq/protocols/logging.py b/artiq/protocols/logging.py index e69f76223..e8fa71e66 100644 --- a/artiq/protocols/logging.py +++ b/artiq/protocols/logging.py @@ -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 diff --git a/artiq/protocols/sync_struct.py b/artiq/protocols/sync_struct.py index 5c82ffa07..c80555837 100644 --- a/artiq/protocols/sync_struct.py +++ b/artiq/protocols/sync_struct.py @@ -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) diff --git a/artiq/tools.py b/artiq/tools.py index f1167ab39..445399a1b 100644 --- a/artiq/tools.py +++ b/artiq/tools.py @@ -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 diff --git a/conda/artiq/meta.yaml b/conda/artiq/meta.yaml index 736a4dc26..1a9e6a19d 100644 --- a/conda/artiq/meta.yaml +++ b/conda/artiq/meta.yaml @@ -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 diff --git a/setup.py b/setup.py index ab64daa6f..a28fa8e78 100755 --- a/setup.py +++ b/setup.py @@ -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 = [