Skip to content

Commit

Permalink
Merge 92bb43a into 73dd27e
Browse files Browse the repository at this point in the history
  • Loading branch information
scop committed Oct 19, 2019
2 parents 73dd27e + 92bb43a commit a842973
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
11 changes: 9 additions & 2 deletions foobot_async/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@
from datetime import datetime, timezone
from math import trunc


try:
DEFAULT_TIMEOUT = aiohttp.client.DEFAULT_TIMEOUT.total # aiohttp >= 3.3
except AttributeError:
DEFAULT_TIMEOUT = aiohttp.client.DEFAULT_TIMEOUT


class FoobotClient(object):
"""
Foobot API client
Expand All @@ -21,11 +28,11 @@ class FoobotClient(object):
:param session: aiohttp session to use or None
:type session: object or None
:param timeout: seconds to wait for before triggering a timeout
:type timeout: integer
:type timeout: float
"""

def __init__(self, token, username, session=None,
timeout=aiohttp.client.DEFAULT_TIMEOUT):
timeout=DEFAULT_TIMEOUT):
"""
Creates a new :class:`FoobotClient` instance.
"""
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

packages=setuptools.find_packages(),

install_requires=['aiohttp>=2.3.10', 'async_timeout', 'typing>=3,<4'],
install_requires=['aiohttp>=2.3.10', 'async_timeout'],
zip_safe=True,

classifiers=[
Expand Down

0 comments on commit a842973

Please sign in to comment.