Skip to content

Commit 2be54ea

Browse files
authored
Merge pull request #34 from latortagrande/master
Update compatibility for Python3.6
2 parents 95eb70a + 517b68e commit 2be54ea

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

CHANGES.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Change Log
22

3+
## [2.0.0] 03 Nov 2021
4+
### Changed
5+
* Changed underlying consul library from `python-consul` which is no longer maintained to `python-consul2` which is maintained.
6+
* Certain Python3 libraries return byte strings. We need to decode them in order to correctly json-ify them.
7+
38
## [1.0.0] 05 Feb 2021
49

510
* Drop Python 2.7 support

actions/kv_get.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ def run(
3636

3737
if from_json and not keys:
3838
if isinstance(res, dict):
39-
res["Value"] = self.from_json(res["Value"])
39+
res["Value"] = self.from_json(res["Value"].decode('utf-8'))
4040
if isinstance(res, list):
4141
for item in res:
42-
item["Value"] = self.from_json(item["Value"])
42+
item["Value"] = self.from_json(item["Value"].decode('utf-8'))
4343

4444
return (True, [idx, res])

pack.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
ref: consul
33
name: consul
44
description: consul
5-
version: 1.0.0
5+
version: 2.0.0
66
python_versions:
77
- "3"
88
author: jfryman

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
python-consul>=1.1.0
1+
python-consul2>=0.1.5

0 commit comments

Comments
 (0)