mirror of
https://github.com/aljazceru/bitfinex-api-py.git
synced 2025-12-19 14:54:21 +01:00
added support per py 3.9 and 3.10
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
1.2.7
|
||||
-) Added ws support for Python 3.9 and 3.10
|
||||
|
||||
1.2.6
|
||||
-) Updated websockets to 9.1
|
||||
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
This module contains the current version of the bfxapi lib
|
||||
"""
|
||||
|
||||
__version__ = '1.2.6'
|
||||
__version__ = '1.2.7'
|
||||
|
||||
@@ -7,6 +7,7 @@ import websockets
|
||||
import socket
|
||||
import json
|
||||
import time
|
||||
import nest_asyncio
|
||||
from threading import Thread, Lock
|
||||
|
||||
from pyee import AsyncIOEventEmitter
|
||||
@@ -14,6 +15,7 @@ from ..utils.custom_logger import CustomLogger
|
||||
|
||||
# websocket exceptions
|
||||
from websockets.exceptions import ConnectionClosed, InvalidStatusCode
|
||||
nest_asyncio.apply()
|
||||
|
||||
class AuthError(Exception):
|
||||
"""
|
||||
@@ -94,12 +96,7 @@ class GenericWebsocket:
|
||||
def _start_new_socket(self, socketId=None):
|
||||
if not socketId:
|
||||
socketId = len(self.sockets)
|
||||
def start_loop(loop):
|
||||
asyncio.set_event_loop(loop)
|
||||
loop.run_until_complete(self._run_socket())
|
||||
worker_loop = asyncio.new_event_loop()
|
||||
worker = Thread(target=start_loop, args=(worker_loop,))
|
||||
worker.start()
|
||||
asyncio.run(self._run_socket())
|
||||
return socketId
|
||||
|
||||
def _wait_for_socket(self, socket_id):
|
||||
|
||||
@@ -6,3 +6,4 @@ six==1.12.0
|
||||
pyee==8.0.1
|
||||
aiohttp==3.4.4
|
||||
isort==4.3.21
|
||||
nest_asyncio==1.5.1
|
||||
2
setup.py
2
setup.py
@@ -11,7 +11,7 @@ from os import path
|
||||
here = path.abspath(path.dirname(__file__))
|
||||
setup(
|
||||
name='bitfinex-api-py',
|
||||
version='1.2.6',
|
||||
version='1.2.7',
|
||||
description='Official Bitfinex Python API',
|
||||
long_description='A Python reference implementation of the Bitfinex API for both REST and websocket interaction',
|
||||
long_description_content_type='text/markdown',
|
||||
|
||||
Reference in New Issue
Block a user