Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: m-labs/artiq
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 57691079369b
Choose a base ref
...
head repository: m-labs/artiq
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 183e855229a6
Choose a head ref
  • 3 commits
  • 6 files changed
  • 1 contributor

Commits on Dec 20, 2015

  1. Copy the full SHA
    2ae6357 View commit details
  2. Copy the full SHA
    a26ffc5 View commit details
  3. Copy the full SHA
    183e855 View commit details
Showing with 11 additions and 16 deletions.
  1. +4 −0 artiq/frontend/artiq_coretool.py
  2. +1 −2 artiq/protocols/logging.py
  3. +0 −2 artiq/protocols/sync_struct.py
  4. +1 −7 artiq/tools.py
  5. +2 −2 conda/artiq/meta.yaml
  6. +3 −3 setup.py
4 changes: 4 additions & 0 deletions artiq/frontend/artiq_coretool.py
Original file line number Diff line number Diff line change
@@ -3,6 +3,7 @@
import argparse
import struct

from artiq.tools import verbosity_args, init_logger
from artiq.master.databases import DeviceDB
from artiq.master.worker_db import DeviceManager
from artiq.coredevice.analyzer import decode_dump, messages_to_vcd
@@ -11,6 +12,8 @@
def get_argparser():
parser = argparse.ArgumentParser(description="ARTIQ core device "
"remote access tool")

verbosity_args(parser)
parser.add_argument("--device-db", default="device_db.pyon",
help="device database file (default: '%(default)s')")

@@ -58,6 +61,7 @@ def get_argparser():

def main():
args = get_argparser().parse_args()
init_logger(args)
device_mgr = DeviceManager(DeviceDB(args.device_db))
try:
comm = device_mgr.get("comm")
3 changes: 1 addition & 2 deletions artiq/protocols/logging.py
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
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 @@ async def _do(self):
while True:
message = await self._queue.get() + "\n"
writer.write(message.encode())
await workaround_asyncio263()
await writer.drain()
except asyncio.CancelledError:
return
2 changes: 0 additions & 2 deletions artiq/protocols/sync_struct.py
Original file line number Diff line number Diff line change
@@ -16,7 +16,6 @@

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 @@ async def _handle_connection_cr(self, reader, writer):
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)
8 changes: 1 addition & 7 deletions artiq/tools.py
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@
__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 @@ def notify(self):
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

4 changes: 2 additions & 2 deletions conda/artiq/meta.yaml
Original file line number Diff line number Diff line change
@@ -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
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3
#!/usr/bin/env python3.5

from setuptools import setup, find_packages
import sys
@@ -7,8 +7,8 @@
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 = [