diff --git a/aiojobs/_job.py b/aiojobs/_job.py index 44f09f44..63f45837 100644 --- a/aiojobs/_job.py +++ b/aiojobs/_job.py @@ -12,10 +12,7 @@ class Job: _task = None def __init__(self, coro, scheduler): - if sys.version_info >= (3, 7): - self._loop = loop = asyncio.get_running_loop() - else: - self._loop = loop = asyncio.get_event_loop() + self._loop = loop = asyncio.get_running_loop() self._coro = coro self._scheduler = scheduler self._started = loop.create_future() diff --git a/aiojobs/_scheduler.py b/aiojobs/_scheduler.py index f5f8df93..521c59fb 100644 --- a/aiojobs/_scheduler.py +++ b/aiojobs/_scheduler.py @@ -7,10 +7,7 @@ class Scheduler(Collection): def __init__(self, *, close_timeout, limit, pending_limit, exception_handler): - if sys.version_info >= (3, 7): - self._loop = loop = asyncio.get_running_loop() - else: - self._loop = loop = asyncio.get_event_loop() + self._loop = loop = asyncio.get_running_loop() self._jobs = set() self._close_timeout = close_timeout self._limit = limit