diff --git a/.travis.yml b/.travis.yml index ac69501..14344e8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 @@ -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 diff --git a/README.rst b/README.rst index 3aea7a5..32d473e 100644 --- a/README.rst +++ b/README.rst @@ -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 @@ -35,3 +35,9 @@ Usage loop.run_until_complete(go()) loop.close() +Thanks +------ + +The library was donated by `Ocean S.A. `_ + +Thanks to the company for contribution. diff --git a/aioslacker/__init__.py b/aioslacker/__init__.py index e145d8d..890ce47 100644 --- a/aioslacker/__init__.py +++ b/aioslacker/__init__.py @@ -8,7 +8,7 @@ from .compat import PY_350, ensure_future -__version__ = '0.0.10' +__version__ = '0.0.11' Error = slacker.Error @@ -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() @@ -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() @@ -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): @@ -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): @@ -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): @@ -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): @@ -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 diff --git a/pytest.ini b/pytest.ini deleted file mode 100644 index 782216f..0000000 --- a/pytest.ini +++ /dev/null @@ -1,2 +0,0 @@ -[pytest] -addopts= -s --keep-duplicates --cache-clear --verbose --maxfail=1 --no-cov-on-fail --cov=aioslacker --cov-report=term --cov-report=html --fulltrace diff --git a/requirements.txt b/requirements.txt index 1c46032..8992c9a 100644 --- a/requirements.txt +++ b/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 . diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..5177827 --- /dev/null +++ b/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 diff --git a/setup.py b/setup.py index 8e3734c..a194df5 100644 --- a/setup.py +++ b/setup.py @@ -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=[ diff --git a/tox.ini b/tox.ini index f0b9ba3..dfee159 100644 --- a/tox.ini +++ b/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