From 550ff753640bf2b06217576ea648c996a98ec6f3 Mon Sep 17 00:00:00 2001 From: Waldemar Quevedo Date: Wed, 11 Jul 2018 09:45:07 -0700 Subject: [PATCH 1/3] Fix INFO handling for latest server version Signed-off-by: Waldemar Quevedo --- nats/io/client.py | 2 +- tests/client_test.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/nats/io/client.py b/nats/io/client.py index 554143d..429b0a3 100644 --- a/nats/io/client.py +++ b/nats/io/client.py @@ -818,7 +818,7 @@ def _process_connect_init(self): self._max_payload_size = self._server_info["max_payload"] # Check whether we need to upgrade to TLS first of all - if self._server_info['tls_required']: + if 'tls_required' in self._server_info and self._server_info['tls_required']: # Detach and prepare for upgrading the TLS connection. self._loop.remove_handler(self._socket.fileno()) diff --git a/tests/client_test.py b/tests/client_test.py index 3cd1df5..7d7f8d5 100644 --- a/tests/client_test.py +++ b/tests/client_test.py @@ -277,9 +277,8 @@ def test_parse_info(self): self.assertIn("go", info_keys) self.assertIn("host", info_keys) self.assertIn("port", info_keys) - self.assertIn("auth_required", info_keys) - self.assertIn("tls_required", info_keys) self.assertIn("max_payload", info_keys) + self.assertIn("client_id", info_keys) @tornado.testing.gen_test(timeout=5) def test_connect_fails(self): From 0bf4195993d0c845f63c5f23e5ab257b524a1448 Mon Sep 17 00:00:00 2001 From: Waldemar Quevedo Date: Wed, 11 Jul 2018 09:46:52 -0700 Subject: [PATCH 2/3] Update server version used in tests Signed-off-by: Waldemar Quevedo --- script/install_gnatsd.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/install_gnatsd.sh b/script/install_gnatsd.sh index 192c5fd..f7154cd 100755 --- a/script/install_gnatsd.sh +++ b/script/install_gnatsd.sh @@ -2,7 +2,7 @@ set -e -export DEFAULT_NATS_SERVER_VERSION=v0.9.4 +export DEFAULT_NATS_SERVER_VERSION=v1.2.0 export NATS_SERVER_VERSION="${NATS_SERVER_VERSION:=$DEFAULT_NATS_SERVER_VERSION}" # check to see if gnatsd folder is empty From 09a15c60e7491d1345a54eb66291f9d2f72874e4 Mon Sep 17 00:00:00 2001 From: Waldemar Quevedo Date: Wed, 11 Jul 2018 10:01:23 -0700 Subject: [PATCH 3/3] Update client version Signed-off-by: Waldemar Quevedo --- nats/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nats/__init__.py b/nats/__init__.py index 0a9c05b..e944472 100644 --- a/nats/__init__.py +++ b/nats/__init__.py @@ -12,5 +12,5 @@ # limitations under the License. # -__version__ = b'0.7.0' +__version__ = b'0.7.2' __lang__ = b'python2'