Update to pyee 8.1.0

pyee 8.1.0 adds a small change to make the once call to be more safe in
multithreaded environments.

This switches back from the now deprecated BaseEventEmitter to the
standard EventEmitter.
pull/2724/head
Åke Forslund 2020-10-14 19:18:14 +02:00
parent 8a1b989935
commit 0a9de0ab7c
5 changed files with 8 additions and 8 deletions

View File

@ -16,7 +16,7 @@ import time
from threading import Thread
import speech_recognition as sr
import pyaudio
from pyee import BaseEventEmitter
from pyee import EventEmitter
from requests import RequestException
from requests.exceptions import ConnectionError
@ -271,7 +271,7 @@ def recognizer_conf_hash(config):
return hash(json.dumps(c, sort_keys=True))
class RecognizerLoop(BaseEventEmitter):
class RecognizerLoop(EventEmitter):
""" EventEmitter loop running speech recognition.
Local wake word recognizer and remote general speech recognition.

View File

@ -18,7 +18,7 @@ import sys
import traceback
from tornado.websocket import WebSocketHandler
from pyee import BaseEventEmitter
from pyee import EventEmitter
from mycroft.messagebus.message import Message
from mycroft.util.log import LOG
@ -29,7 +29,7 @@ client_connections = []
class MessageBusEventHandler(WebSocketHandler):
def __init__(self, application, request, **kwargs):
super().__init__(application, request, **kwargs)
self.emitter = BaseEventEmitter()
self.emitter = EventEmitter()
def on(self, event_name, handler):
self.emitter.on(event_name, handler)

View File

@ -2,7 +2,7 @@ six==1.13.0
requests==2.20.0
gTTS==2.1.1
PyAudio==0.2.11
pyee==7.0.1
pyee==8.1.0
SpeechRecognition==3.8.1
tornado==6.0.3
websocket-client==0.54.0

View File

@ -39,7 +39,7 @@ import os
import re
import ast
from os.path import join, isdir, basename
from pyee import BaseEventEmitter
from pyee import EventEmitter
from numbers import Number
from mycroft.messagebus.message import Message
from mycroft.skills.core import MycroftSkill, FallbackSkill
@ -167,7 +167,7 @@ class InterceptEmitter(object):
"""
def __init__(self):
self.emitter = BaseEventEmitter()
self.emitter = EventEmitter()
self.q = None
def on(self, event, f):

View File

@ -100,7 +100,7 @@ class AudioTester:
def test_audio(self, file_name):
source = FileMockMicrophone(file_name)
ee = pyee.BaseEventEmitter()
ee = pyee.EventEmitter()
class SharedData:
times_found = 0