Skip to content

Commit

Permalink
fix(jobs): remove loop parameter from Event in Python 3.8+ (#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
HiPhish authored Oct 27, 2021
1 parent 71290da commit 3ab5145
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions rplugin/python3/ultest/vim_client/jobs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import sys
import traceback
from asyncio import CancelledError, Event, Semaphore
from asyncio.events import AbstractEventLoop
from collections import defaultdict
from threading import Thread
from typing import Coroutine, Dict
Expand Down Expand Up @@ -36,7 +35,7 @@ def semaphore(self) -> Semaphore:

def run(self, cor: Coroutine, job_group: str):
job_id = str(uuid4())
cancel_event = Event(loop=self._loop)
cancel_event = Event(loop=self._loop) if sys.version_info < (3, 8) else Event()
wrapped_cor = self._handle_coroutine(
cor, job_group=job_group, job_id=job_id, cancel_event=cancel_event
)
Expand Down

0 comments on commit 3ab5145

Please sign in to comment.