From 2c251865a9046302dc1e57d468f89ef2ce04cbc3 Mon Sep 17 00:00:00 2001 From: Carl Noiseux Date: Wed, 1 Sep 2021 15:45:01 -0400 Subject: [PATCH 1/2] Instanciation of Consul instance in cli.py file uses positional arguments that do not match with the __init__ declaration of the class, resulting host parameter being used for addr, port for host and scheme for token. Using keyword arguments instead solves the issue and makes it more robust to function definition changes. --- consulate/cli.py | 10 ++++++++-- setup.py | 4 ++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/consulate/cli.py b/consulate/cli.py index e2d12ba..67e148f 100644 --- a/consulate/cli.py +++ b/consulate/cli.py @@ -620,8 +620,14 @@ def main(): if args.api_host: api_host = args.api_host - consul = consulate.Consul(api_host, port, args.dc, - args.token, args.api_scheme, adapter) + consul = consulate.Consul( + host=api_host, + port=port, + datacenter=args.dc, + token=args.token, + scheme=args.api_scheme, + adapter=adapter, + ) if args.command == 'acl': ACL_ACTIONS[args.action](consul, args) diff --git a/setup.py b/setup.py index 2eeb10e..a05773d 100644 --- a/setup.py +++ b/setup.py @@ -1,8 +1,8 @@ import setuptools setuptools.setup( - name='abaez.consulate', - version='1.1.0', + name='consulate', + version='1.1.1', description='A Client library and command line application for the Consul', maintainer='Gavin M. Roy', maintainer_email='gavinr@aweber.com', From 644ba0e1d419597dac8e0931bf8cb7302a60dd8e Mon Sep 17 00:00:00 2001 From: Leansy Date: Wed, 24 Nov 2021 12:39:51 -0500 Subject: [PATCH 2/2] consulate.models.base: fix Iterable path --- consulate/models/base.py | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/consulate/models/base.py b/consulate/models/base.py index 50802bf..e797da2 100644 --- a/consulate/models/base.py +++ b/consulate/models/base.py @@ -6,7 +6,7 @@ import collections -class Model(collections.Iterable): +class Model(collections.abc.Iterable): """A model contains an __attribute__ map that defines the name, its type for type validation, an optional validation method, a method used to diff --git a/setup.py b/setup.py index a05773d..bf062d9 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ setuptools.setup( name='consulate', - version='1.1.1', + version='1.1.2', description='A Client library and command line application for the Consul', maintainer='Gavin M. Roy', maintainer_email='gavinr@aweber.com',