diff --git a/.travis.yml b/.travis.yml index 27342ed..533c35d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,9 +14,13 @@ matrix: env: TOXENV=py35 - python: "3.6" env: TOXENV=py36 + - python: "3.7" + env: TOXENV=py37 + - python: "3.8" + env: TOXENV=py38 # Meta - - python: "3.6" + - python: "3.8" env: TOXENV=flake8 - python: "3.6" env: TOXENV=manifest diff --git a/CHANGELOG.md b/CHANGELOG.md index 0944dbf..2b9245d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +## [1.0.1] - 2020-05-15 +- Updated google.cloud.pubsub dependency to 1.5.0 + ## [1.0.0] - 2018-11-21 - [BREAKING] No longer supports python 2 - Cache the results of get_topic @@ -22,6 +25,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [0.3.6] - 2015-12-03 [Unreleased]: https://github.com/Superbalist/python-pubsub/compare/1.0.0...HEAD +[1.0.1]: https://github.com/Superbalist/python-pubsub/compare/1.0.0...1.0.1 [1.0.0]: https://github.com/Superbalist/python-pubsub/compare/0.3.9...1.0.0 [0.3.9]: https://github.com/Superbalist/python-pubsub/compare/0.3.8...0.3.9 [0.3.8]: https://github.com/Superbalist/python-pubsub/compare/0.3.7...0.3.8 diff --git a/pubsub/adapters/googlecloud.py b/pubsub/adapters/googlecloud.py index d5884f7..f3b0af0 100644 --- a/pubsub/adapters/googlecloud.py +++ b/pubsub/adapters/googlecloud.py @@ -37,8 +37,7 @@ def subscribe(self, topic_name, callback, create_topic=False): subscription_path = self.subscriber.subscription_path(self.project_id, '{}.{}'.format(self.client_identifier, topic_name)) log.info('Starting to listen on: %s', subscription_path) - policy = self.subscriber.subscribe(subscription_path) - return policy.open(callback=callback) + return self.subscriber.subscribe(subscription_path, callback) def get_subscription(self, topic_name, create_topic=False): if not self.client_identifier: diff --git a/requirements.txt b/requirements.txt index 9c2e5e7..3bcff89 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ -google.cloud.pubsub>=0.33.1 +google-cloud-pubsub>=1.5.0 jsonschema requests diff --git a/setup.py b/setup.py index 0a85194..cb467c8 100644 --- a/setup.py +++ b/setup.py @@ -5,12 +5,12 @@ name='pubsub.py', author='Superbalist Engineering', author_email='tech@superbalist.com', - version='1.0.0', + version='1.0.1', description='Python PubSub Adapter for gcloud', long_description='Python PubSub Adapter for gcloud', url='https://github.com/Superbalist/python-pubsub', install_requires=[ - 'google.cloud.pubsub==0.33.1', + 'google-cloud-pubsub==1.5.0', 'jsonschema', 'requests', ], diff --git a/tox.ini b/tox.ini index 137ebaf..1f805d6 100644 --- a/tox.ini +++ b/tox.ini @@ -17,12 +17,25 @@ commands = coverage run --parallel -m pytest {posargs} [testenv:py36] +basepython = python3.6 +deps = -rdev-requirements.txt +commands = coverage run --parallel -m pytest {posargs} + + +[testenv:py37] +basepython = python3.7 +deps = -rdev-requirements.txt +commands = coverage run --parallel -m pytest {posargs} + + +[testenv:py38] +basepython = python3.8 deps = -rdev-requirements.txt commands = coverage run --parallel -m pytest {posargs} [testenv:flake8] -basepython = python3.6 +basepython = python3.8 deps = flake8 commands = flake8 pubsub tests setup.py conftest.py docs/conf.py