Skip to content
This repository has been archived by the owner on Oct 24, 2020. It is now read-only.

Commit

Permalink
Bringht it to live!
Browse files Browse the repository at this point in the history
  • Loading branch information
hellysmile committed Oct 1, 2018
1 parent feb10df commit 824f299
Show file tree
Hide file tree
Showing 8 changed files with 84 additions and 57 deletions.
24 changes: 19 additions & 5 deletions .travis.yml
Expand Up @@ -5,8 +5,13 @@ python:
- "3.5"
- "3.6"
env:
- AIOHTTP="2"
- AIOHTTP="1"
- AIOHTTP=3
- AIOHTTP=2
- AIOHTTP=1
matrix:
exclude:
- python: 3.4
env: AIOHTTP=3
install:
- pip install -U setuptools
- pip install -U pip
Expand All @@ -17,8 +22,17 @@ script:
- echo "$TOXENV"

- tox
cache:
directories:
- $HOME/.cache/pip
cache: pip
notifications:
email: false

deploy:
provider: pypi
user: hellysmile
password:
secure: "fMgYEBlK3npz5AMbXfTSFEZEHoGB+kpLXnO6G4Zvy47weDH14QYOxFI29Ria57Y6y+t8TSnuumytQx3vSBYy9LFYtgYOLECcTEWzdBTi2jvxEvGP/ZmA56cx1Nn6B53ZDPsk1XO9X5z34ezZiJhbrjU82AKcMmR1a4yqrZdLNE4zMDDYo46wvO6rI/xVhhufNCVfkODtr5Z4etXRV7/JfIwrwhRgbSZWm92q33cACkwPnyNZrJYhqWU67WtCeogBTj1m9zQ2gfLGGLpvxFmzOVfbOboReedi7+x4ipfo3jL3KgfjnJN1B/gz93vItr7J5WG8TaF0KR36/oZbgeVPNMjK53YkMN3bnbgLQ9OvLbmpNIgquap6wCcndzaoEDC4T6xvVpgbWfTAK7g0GA63+IrnqKIGI83X27bzl0PDcnjV+P0ivvIeb5X2UqKyZJd4DfLSEHQHXvSLnSNxcjubNEUfzP6TNfPBXtky9PdH+NhBqiiQTyP+INEe0B7/c3xbSjROs0wVfRkWbk1dnbqGdm3/xHo1omWpCgdMAlFOFlrLnO6O6hCZUJJgnbVYTr9GC0RpNKNEmsbxPVcefoSRIGvHP9qz2V2IRAnie/4aXAD0e0xgKjpvRciABZc2VpmPrJ9zN85O0QKzepLF/clNB5TxpTi2JdgfP/REFCUZmEA="
distributions: "sdist"
on:
tags: true
all_branches: true
python: 3.6
10 changes: 8 additions & 2 deletions README.rst
Expand Up @@ -3,8 +3,8 @@ aioslacker

:info: slacker wrapper for asyncio

.. image:: https://img.shields.io/travis/wikibusiness/aioslacker.svg
:target: https://travis-ci.org/wikibusiness/aioslacker
.. image:: https://travis-ci.org/aio-libs/aioslacker.svg?branch=master
:target: https://travis-ci.org/aio-libs/aioslacker

.. image:: https://img.shields.io/pypi/v/aioslacker.svg
:target: https://pypi.python.org/pypi/aioslacker
Expand Down Expand Up @@ -35,3 +35,9 @@ Usage
loop.run_until_complete(go())
loop.close()
Thanks
------

The library was donated by `Ocean S.A. <https://ocean.io/>`_

Thanks to the company for contribution.
41 changes: 33 additions & 8 deletions aioslacker/__init__.py
Expand Up @@ -8,7 +8,7 @@

from .compat import PY_350, ensure_future

__version__ = '0.0.10'
__version__ = '0.0.11'

Error = slacker.Error

Expand All @@ -21,7 +21,8 @@ def __init__(
self,
token=None,
timeout=slacker.DEFAULT_TIMEOUT,
*, loop=None
*,
loop=None
):
if loop is None:
loop = asyncio.get_event_loop()
Expand Down Expand Up @@ -111,7 +112,11 @@ def _request(self, method, api, **kwargs):
@asyncio.coroutine
def close(self):
if self.futs:
yield from asyncio.gather(*self.futs, loop=self.loop)
yield from asyncio.gather(
*self.futs,
loop=self.loop,
return_exceptions=True
)

yield from self.session.close()

Expand Down Expand Up @@ -158,7 +163,11 @@ def close(self):
super().close(),
self._profile.close(),
]
return asyncio.gather(*coros, loop=self.loop)
return asyncio.gather(
*coros,
loop=self.loop,
return_exceptions=True
)


class Pins(BaseAPI, slacker.Pins):
Expand All @@ -184,7 +193,11 @@ def close(self):
super().close(),
self._profile.close(),
]
return asyncio.gather(*coros, loop=self.loop)
return asyncio.gather(
*coros,
loop=self.loop,
return_exceptions=True
)


class FilesComments(BaseAPI, slacker.FilesComments):
Expand All @@ -202,7 +215,11 @@ def close(self):
super().close(),
self._comments.close(),
]
return asyncio.gather(*coros, loop=self.loop)
return asyncio.gather(
*coros,
loop=self.loop,
return_exceptions=True
)


class Stars(BaseAPI, slacker.Stars):
Expand Down Expand Up @@ -256,7 +273,11 @@ def close(self):
super().close(),
self._users.close(),
]
return asyncio.gather(*coros, loop=self.loop)
return asyncio.gather(
*coros,
loop=self.loop,
return_exceptions=True
)


class IncomingWebhook(BaseAPI, slacker.IncomingWebhook):
Expand Down Expand Up @@ -456,7 +477,11 @@ def close(self):
self.incomingwebhook.close(),
]

return asyncio.gather(*coros, loop=self.loop)
return asyncio.gather(
*coros,
loop=self.loop,
return_exceptions=True
)

if PY_350:
@asyncio.coroutine
Expand Down
2 changes: 0 additions & 2 deletions pytest.ini

This file was deleted.

45 changes: 9 additions & 36 deletions requirements.txt
@@ -1,36 +1,9 @@
aiohttp==2.2.3
appdirs==1.4.3
appnope==0.1.0
async-timeout==1.2.1
chardet==3.0.4
coverage==4.3.4
decorator==4.0.11
flake8==3.3.0
ipdb==0.10.2
ipython==5.3.0
ipython-genutils==0.2.0
isort==4.2.5
mccabe==0.6.1
multidict==3.1.0
packaging==16.8
pexpect==4.2.1
pickleshare==0.7.4
pluggy==0.4.0
prompt-toolkit==1.0.14
ptyprocess==0.5.1
py==1.4.33
pycodestyle==2.3.1
pyflakes==1.5.0
Pygments==2.2.0
pyparsing==2.2.0
pytest==3.0.7
pytest-cov==2.4.0
requests==2.13.0
simplegeneric==0.8.1
six==1.10.0
slacker==0.9.42
tox==2.6.0
traitlets==4.3.2
virtualenv==15.1.0
wcwidth==0.1.7
yarl==0.11.0
aiohttp==2.3.10
flake8==3.5.0
ipdb==0.10.3
ipython==6.2.1
pytest==3.4.0
pytest-cov==2.5.1
tox==2.9.1
isort==4.3.3
-e .
9 changes: 9 additions & 0 deletions setup.cfg
@@ -0,0 +1,9 @@
[coverage:run]
branch = True
omit = site-packages

[isort]
known_first_party = aioslacker

[tool:pytest]
addopts = -s --keep-duplicates --cache-clear --verbose --no-cov-on-fail --cov=aioslacker --cov-report=term --cov-report=html
6 changes: 3 additions & 3 deletions setup.py
Expand Up @@ -23,9 +23,9 @@ def read(*parts):
setup(
name='aioslacker',
version=get_version(),
author='wikibusiness',
author_email='osf@wikibusiness.org',
url='https://github.com/wikibusiness/aioslacker',
author='Victor Kovtun',
author_email='hellysmile@gmail.com',
url='https://github.com/aio-libs/aioslacker',
description='slacker wrapper for asyncio',
long_description=read('README.rst'),
install_requires=[
Expand Down
4 changes: 3 additions & 1 deletion tox.ini
@@ -1,12 +1,14 @@
[tox]
envlist =
py3{4,5,6}-aiohttp{1,2}
py3{5,6}-aiohttp{2,3}
skip_missing_interpreters = True

[testenv]
deps =
aiohttp1: aiohttp>=1.3.0,<2.0.0
aiohttp2: aiohttp>=2.2.3
aiohttp2: aiohttp>=2.0.0,<3.0.0
aiohttp2: aiohttp>=3.0.0,<4.0.0
pytest
pytest-cov
flake8
Expand Down

0 comments on commit 824f299

Please sign in to comment.