From e1b6c4b7b76fb82804dc59e6f0077725799a71f8 Mon Sep 17 00:00:00 2001 From: Juergen Eckel Date: Sat, 5 Oct 2019 01:18:51 +0200 Subject: [PATCH] added types_pb2 proxy to abci module, thereby avoiding the ugly github.com imports Signed-off-by: Juergen Eckel --- bigchaindb/core.py | 2 +- bigchaindb/parallel_validation.py | 2 +- bigchaindb/upsert_validator/validator_utils.py | 3 +-- setup.py | 2 +- tests/tendermint/conftest.py | 2 +- tests/tendermint/test_core.py | 2 +- tests/tendermint/test_integration.py | 2 +- 7 files changed, 7 insertions(+), 8 deletions(-) diff --git a/bigchaindb/core.py b/bigchaindb/core.py index 36332be9..5c5f6186 100644 --- a/bigchaindb/core.py +++ b/bigchaindb/core.py @@ -9,7 +9,7 @@ import logging import sys from abci.application import BaseApplication -from github.com.tendermint.tendermint.abci.types.types_pb2 import ( +from abci import ( ResponseInitChain, ResponseInfo, ResponseCheckTx, diff --git a/bigchaindb/parallel_validation.py b/bigchaindb/parallel_validation.py index 424d0ca2..8e3be2c8 100644 --- a/bigchaindb/parallel_validation.py +++ b/bigchaindb/parallel_validation.py @@ -5,7 +5,7 @@ import multiprocessing as mp from collections import defaultdict -from github.com.tendermint.tendermint.abci.types.types_pb2 import ResponseCheckTx, ResponseDeliverTx +from abci import ResponseCheckTx, ResponseDeliverTx from bigchaindb import BigchainDB, App from bigchaindb.tendermint_utils import decode_transaction diff --git a/bigchaindb/upsert_validator/validator_utils.py b/bigchaindb/upsert_validator/validator_utils.py index 98c3187f..5e48bc5a 100644 --- a/bigchaindb/upsert_validator/validator_utils.py +++ b/bigchaindb/upsert_validator/validator_utils.py @@ -2,8 +2,7 @@ import codecs import base64 import binascii -from github.com.tendermint.tendermint.abci.types.types_pb2 import (ValidatorUpdate, - PubKey) +from abci import (ValidatorUpdate, PubKey) from bigchaindb.common.exceptions import InvalidPublicKey diff --git a/setup.py b/setup.py index 0dbddee2..a2ec29ab 100644 --- a/setup.py +++ b/setup.py @@ -85,7 +85,7 @@ install_requires = [ 'jsonschema~=2.5.1', 'pyyaml>=4.2b1', 'aiohttp~=3.0', - 'bigchaindb-abci==0.7.0', + 'bigchaindb-abci==0.7.1', 'setproctitle~=1.1.0', 'packaging~=18.0', ] diff --git a/tests/tendermint/conftest.py b/tests/tendermint/conftest.py index 996f3fe6..6ca2f032 100644 --- a/tests/tendermint/conftest.py +++ b/tests/tendermint/conftest.py @@ -5,7 +5,7 @@ import pytest import codecs -import github.com.tendermint.tendermint.abci.types.types_pb2 as types +import abci as types @pytest.fixture diff --git a/tests/tendermint/test_core.py b/tests/tendermint/test_core.py index 3dc9400f..30133b3b 100644 --- a/tests/tendermint/test_core.py +++ b/tests/tendermint/test_core.py @@ -6,7 +6,7 @@ import json import pytest import random -from github.com.tendermint.tendermint.abci.types.types_pb2 import ( +from abci import ( PubKey, ResponseInitChain, RequestInitChain, diff --git a/tests/tendermint/test_integration.py b/tests/tendermint/test_integration.py index c7f18a10..5d5787f5 100644 --- a/tests/tendermint/test_integration.py +++ b/tests/tendermint/test_integration.py @@ -4,7 +4,7 @@ import codecs -import github.com.tendermint.tendermint.abci.types.types_pb2 as types +import abci as types import json import pytest