forked from M-Labs/artiq
stop using explicit ProactorEventLoop on Windows
It is now the default in Python.
This commit is contained in:
parent
352317df11
commit
9e5e234af3
|
@ -3,7 +3,6 @@
|
||||||
import asyncio
|
import asyncio
|
||||||
import argparse
|
import argparse
|
||||||
import atexit
|
import atexit
|
||||||
import os
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from sipyco.pc_rpc import Server as RPCServer
|
from sipyco.pc_rpc import Server as RPCServer
|
||||||
|
@ -75,10 +74,6 @@ class MasterConfig:
|
||||||
def main():
|
def main():
|
||||||
args = get_argparser().parse_args()
|
args = get_argparser().parse_args()
|
||||||
log_forwarder = init_log(args)
|
log_forwarder = init_log(args)
|
||||||
if os.name == "nt":
|
|
||||||
loop = asyncio.ProactorEventLoop()
|
|
||||||
asyncio.set_event_loop(loop)
|
|
||||||
else:
|
|
||||||
loop = asyncio.get_event_loop()
|
loop = asyncio.get_event_loop()
|
||||||
atexit.register(loop.close)
|
atexit.register(loop.close)
|
||||||
bind = common_args.bind_address_from_args(args)
|
bind = common_args.bind_address_from_args(args)
|
||||||
|
|
|
@ -2,7 +2,6 @@ import unittest
|
||||||
import logging
|
import logging
|
||||||
import asyncio
|
import asyncio
|
||||||
import sys
|
import sys
|
||||||
import os
|
|
||||||
from time import time, sleep
|
from time import time, sleep
|
||||||
|
|
||||||
from artiq.experiment import *
|
from artiq.experiment import *
|
||||||
|
@ -87,9 +86,6 @@ class _RIDCounter:
|
||||||
|
|
||||||
class SchedulerCase(unittest.TestCase):
|
class SchedulerCase(unittest.TestCase):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
if os.name == "nt":
|
|
||||||
self.loop = asyncio.ProactorEventLoop()
|
|
||||||
else:
|
|
||||||
self.loop = asyncio.new_event_loop()
|
self.loop = asyncio.new_event_loop()
|
||||||
asyncio.set_event_loop(self.loop)
|
asyncio.set_event_loop(self.loop)
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,6 @@ import unittest
|
||||||
import logging
|
import logging
|
||||||
import asyncio
|
import asyncio
|
||||||
import sys
|
import sys
|
||||||
import os
|
|
||||||
from time import sleep
|
from time import sleep
|
||||||
|
|
||||||
from artiq.experiment import *
|
from artiq.experiment import *
|
||||||
|
@ -77,9 +76,6 @@ def _run_experiment(class_name):
|
||||||
|
|
||||||
class WorkerCase(unittest.TestCase):
|
class WorkerCase(unittest.TestCase):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
if os.name == "nt":
|
|
||||||
self.loop = asyncio.ProactorEventLoop()
|
|
||||||
else:
|
|
||||||
self.loop = asyncio.new_event_loop()
|
self.loop = asyncio.new_event_loop()
|
||||||
asyncio.set_event_loop(self.loop)
|
asyncio.set_event_loop(self.loop)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue