From 18400e61c25e8010fabeefec39c2538823861a3a Mon Sep 17 00:00:00 2001 From: Ahmed Bilal Khalid Date: Sun, 1 Sep 2019 22:03:22 +0500 Subject: [PATCH 1/6] a --- etcd_wrapper.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/etcd_wrapper.py b/etcd_wrapper.py index 8559b34..ebcc291 100755 --- a/etcd_wrapper.py +++ b/etcd_wrapper.py @@ -5,6 +5,7 @@ import copy from collections import namedtuple from dataclasses import dataclass +from typing import Union PseudoEtcdMeta = namedtuple("PseudoEtcdMeta", ["key"]) @@ -23,14 +24,14 @@ class EtcdEntry: print(f"Json Error: {e}, value={value}") key: str - value: str + value: Union[str, dict] class Etcd3Wrapper(object): def __init__(self, *args, **kwargs): self.client = etcd3.client(*args, **kwargs) - def get(self, *args, value_in_json=False, **kwargs): + def get(self, *args, value_in_json=False, **kwargs) -> Union[EtcdEntry, None]: _value, _key = self.client.get(*args, **kwargs) if _key is None or _value is None: return None From 92483821a76094a6bd6041c696c101381dc509b3 Mon Sep 17 00:00:00 2001 From: Ahmed Bilal Khalid Date: Fri, 13 Sep 2019 23:28:59 +0500 Subject: [PATCH 2/6] a --- Pipfile | 2 +- Pipfile.lock | 14 ++++++-------- setup.py | 6 ++---- 3 files changed, 9 insertions(+), 13 deletions(-) diff --git a/Pipfile b/Pipfile index cae3c06..713e4df 100644 --- a/Pipfile +++ b/Pipfile @@ -6,7 +6,7 @@ verify_ssl = true [dev-packages] [packages] -etcd3 = "*" +python-etcd3 = {editable = true,git = "https://github.com/kragniz/python-etcd3.git"} [requires] python_version = "3.5" diff --git a/Pipfile.lock b/Pipfile.lock index 2fc2265..06cacc9 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "14cc97a4eba6bb9f5cb1267b0c4ab89b5af44b952c090232e54c1cbd84d094bc" + "sha256": "96b0d4c9f6534a0c2a5f28c91f4bb78eb0cc549c5874c05eea7902abc1c60f6e" }, "pipfile-spec": 6, "requires": { @@ -16,13 +16,6 @@ ] }, "default": { - "etcd3": { - "hashes": [ - "sha256:25a524b9f032c6631ff0097532907dea81243eaa63c3744510fd1598cc4e0e87" - ], - "index": "pypi", - "version": "==0.10.0" - }, "grpcio": { "hashes": [ "sha256:1303578092f1f6e4bfbc354c04ac422856c393723d3ffa032fff0f7cb5cfd693", @@ -81,6 +74,11 @@ ], "version": "==3.9.1" }, + "python-etcd3": { + "editable": true, + "git": "https://github.com/kragniz/python-etcd3.git", + "ref": "cdc4c48bde88a795230a02aa574df84ed9ccfa52" + }, "six": { "hashes": [ "sha256:3350809f0555b11f552448330d0b52d5f24c91a322ea4a15ef22629740f3761c", diff --git a/setup.py b/setup.py index d1c1c8f..7ecc161 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ with open('README.md') as fh: setuptools.setup( name='etcd3_wrapper', - version='0.5.2', + version='0.5.3', description='A wrapper around etcd3 package', long_description=long_description, long_description_content_type='text/markdown', @@ -13,9 +13,7 @@ setuptools.setup( author='ungleich', author_email='hacking@ungleich.ch', packages=setuptools.find_packages(), - install_requires=[ - 'etcd3', - ], + install_requires=['python-etcd3 @ https://github.com/ahmedbilal/python-etcd3.git@v0.11.0#egg=python-etcd3'], classifiers=[ 'Programming Language :: Python :: 3', ], From d3515485c367a51f7f79ae6222691a1e05732aa3 Mon Sep 17 00:00:00 2001 From: Ahmed Bilal Khalid Date: Sat, 14 Sep 2019 20:09:18 +0500 Subject: [PATCH 3/6] a --- Pipfile | 2 +- Pipfile.lock | 14 ++++++++------ etcd3_wrapper/etcd3_wrapper.py | 1 + setup.py | 4 ++-- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/Pipfile b/Pipfile index 713e4df..cae3c06 100644 --- a/Pipfile +++ b/Pipfile @@ -6,7 +6,7 @@ verify_ssl = true [dev-packages] [packages] -python-etcd3 = {editable = true,git = "https://github.com/kragniz/python-etcd3.git"} +etcd3 = "*" [requires] python_version = "3.5" diff --git a/Pipfile.lock b/Pipfile.lock index 06cacc9..2fc2265 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "96b0d4c9f6534a0c2a5f28c91f4bb78eb0cc549c5874c05eea7902abc1c60f6e" + "sha256": "14cc97a4eba6bb9f5cb1267b0c4ab89b5af44b952c090232e54c1cbd84d094bc" }, "pipfile-spec": 6, "requires": { @@ -16,6 +16,13 @@ ] }, "default": { + "etcd3": { + "hashes": [ + "sha256:25a524b9f032c6631ff0097532907dea81243eaa63c3744510fd1598cc4e0e87" + ], + "index": "pypi", + "version": "==0.10.0" + }, "grpcio": { "hashes": [ "sha256:1303578092f1f6e4bfbc354c04ac422856c393723d3ffa032fff0f7cb5cfd693", @@ -74,11 +81,6 @@ ], "version": "==3.9.1" }, - "python-etcd3": { - "editable": true, - "git": "https://github.com/kragniz/python-etcd3.git", - "ref": "cdc4c48bde88a795230a02aa574df84ed9ccfa52" - }, "six": { "hashes": [ "sha256:3350809f0555b11f552448330d0b52d5f24c91a322ea4a15ef22629740f3761c", diff --git a/etcd3_wrapper/etcd3_wrapper.py b/etcd3_wrapper/etcd3_wrapper.py index 1c4df52..f105c71 100755 --- a/etcd3_wrapper/etcd3_wrapper.py +++ b/etcd3_wrapper/etcd3_wrapper.py @@ -3,6 +3,7 @@ import json import queue import copy +import etcd3.utils as utils from collections import namedtuple PseudoEtcdMeta = namedtuple("PseudoEtcdMeta", ["key"]) diff --git a/setup.py b/setup.py index 7ecc161..31f7ece 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ with open('README.md') as fh: setuptools.setup( name='etcd3_wrapper', - version='0.5.3', + version='0.5.4', description='A wrapper around etcd3 package', long_description=long_description, long_description_content_type='text/markdown', @@ -13,7 +13,7 @@ setuptools.setup( author='ungleich', author_email='hacking@ungleich.ch', packages=setuptools.find_packages(), - install_requires=['python-etcd3 @ https://github.com/ahmedbilal/python-etcd3.git@v0.11.0#egg=python-etcd3'], + install_requires=['etcd3'], classifiers=[ 'Programming Language :: Python :: 3', ], From b1893fc286e9ed59876a526d81094edd796d6815 Mon Sep 17 00:00:00 2001 From: Ahmed Bilal Khalid Date: Sat, 14 Sep 2019 20:18:21 +0500 Subject: [PATCH 4/6] a --- Pipfile | 2 +- Pipfile.lock | 14 ++++++-------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/Pipfile b/Pipfile index cae3c06..713e4df 100644 --- a/Pipfile +++ b/Pipfile @@ -6,7 +6,7 @@ verify_ssl = true [dev-packages] [packages] -etcd3 = "*" +python-etcd3 = {editable = true,git = "https://github.com/kragniz/python-etcd3.git"} [requires] python_version = "3.5" diff --git a/Pipfile.lock b/Pipfile.lock index 2fc2265..06cacc9 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "14cc97a4eba6bb9f5cb1267b0c4ab89b5af44b952c090232e54c1cbd84d094bc" + "sha256": "96b0d4c9f6534a0c2a5f28c91f4bb78eb0cc549c5874c05eea7902abc1c60f6e" }, "pipfile-spec": 6, "requires": { @@ -16,13 +16,6 @@ ] }, "default": { - "etcd3": { - "hashes": [ - "sha256:25a524b9f032c6631ff0097532907dea81243eaa63c3744510fd1598cc4e0e87" - ], - "index": "pypi", - "version": "==0.10.0" - }, "grpcio": { "hashes": [ "sha256:1303578092f1f6e4bfbc354c04ac422856c393723d3ffa032fff0f7cb5cfd693", @@ -81,6 +74,11 @@ ], "version": "==3.9.1" }, + "python-etcd3": { + "editable": true, + "git": "https://github.com/kragniz/python-etcd3.git", + "ref": "cdc4c48bde88a795230a02aa574df84ed9ccfa52" + }, "six": { "hashes": [ "sha256:3350809f0555b11f552448330d0b52d5f24c91a322ea4a15ef22629740f3761c", From 24c53ba969bda8d58e38373310eb41914dd566fd Mon Sep 17 00:00:00 2001 From: Ahmed Bilal Khalid Date: Sat, 14 Sep 2019 21:40:42 +0500 Subject: [PATCH 5/6] a --- etcd3_wrapper/etcd3_wrapper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etcd3_wrapper/etcd3_wrapper.py b/etcd3_wrapper/etcd3_wrapper.py index fa9f285..0814b61 100755 --- a/etcd3_wrapper/etcd3_wrapper.py +++ b/etcd3_wrapper/etcd3_wrapper.py @@ -22,7 +22,7 @@ class Etcd3Wrapper: def __init__(self, *args, **kwargs): self.client = etcd3.client(*args, **kwargs) - def get(self, *args, value_in_json=False, **kwargs) -> Union[EtcdEntry, None]: + def get(self, *args, value_in_json=False, **kwargs): _value, _key = self.client.get(*args, **kwargs) if _key is None or _value is None: return None From 76fb0bdf797199e9ea161dad1d004eea9b4520f8 Mon Sep 17 00:00:00 2001 From: Ahmed Bilal Khalid Date: Sun, 22 Sep 2019 15:53:21 +0500 Subject: [PATCH 6/6] a --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 31f7ece..6dcff58 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ with open('README.md') as fh: setuptools.setup( name='etcd3_wrapper', - version='0.5.4', + version='0.5.5', description='A wrapper around etcd3 package', long_description=long_description, long_description_content_type='text/markdown',