Merge pull request #98 from itsdeka/master

Python 3.X compatibility
This commit is contained in:
Paolo Ardoino
2021-01-22 14:20:03 +01:00
committed by GitHub
4 changed files with 7 additions and 5 deletions

View File

@@ -1,3 +1,6 @@
1.1.9
- Updated pyee and changed deprecated class EventEmitter() -> AsyncIOEventEmitter() to make it work with all Python 3.X versions
1.1.8
- Adds support for websocket events pu, pn and pu

View File

@@ -2,4 +2,4 @@
This module contains the current version of the bfxapi lib
"""
__version__ = '1.1.7'
__version__ = '1.1.9'

View File

@@ -3,14 +3,13 @@ Module used as a interfeace to describe a generick websocket client
"""
import asyncio
import concurrent.futures
import websockets
import socket
import json
import time
from threading import Thread, Lock
from pyee import EventEmitter
from pyee import AsyncIOEventEmitter
from ..utils.custom_logger import CustomLogger
# websocket exceptions
@@ -57,7 +56,7 @@ class Socket():
await self.ws.send(data)
def _start_event_worker():
return EventEmitter(scheduler=asyncio.ensure_future)
return AsyncIOEventEmitter()
class GenericWebsocket:
"""

View File

@@ -4,6 +4,6 @@ websockets==7.0
pylint==2.3.0
pytest-asyncio==0.10.0
six==1.12.0
pyee==5.0.0
pyee==8.0.1
aiohttp==3.4.4
isort==4.3.21