Skip to content

Commit da8cc33

Browse files
authored
Upgrade to v0.1.2
Python version 3.7 dropped. Upgraded to the new `python-fsrpcclient` lib. For the CLI the `--debug` mode disables HTTP content compression.
2 parents 698667e + 5f59059 commit da8cc33

5 files changed

Lines changed: 20 additions & 10 deletions

File tree

.github/workflows/python-package.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
strategy:
1313
fail-fast: false
1414
matrix:
15-
python-version: [3.7, 3.8, 3.9]
15+
python-version: [3.8, 3.9]
1616

1717
steps:
1818
- uses: actions/checkout@v2

feClient/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "0.1.1"
1+
__version__ = "0.1.2"
22
__doc__ = """
33
Python client for Fusion Explorer API v{}
44
Copyright (C) 2021 Fusion Solutions KFT <contact@fusionsolutions.io>

feClient/__main__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ def toInt(input:Any) -> int:
149149
raise RuntimeError
150150

151151
def main() -> None:
152+
disableCompression = False
152153
inputs:List[str] = []
153154
_inputs = sys.argv[:]
154155
selfName = os.path.basename(_inputs.pop(0))
@@ -162,6 +163,7 @@ def main() -> None:
162163
return printResult(__version__)
163164
elif inp == "--debug":
164165
SimpleLogger()
166+
disableCompression = True
165167
continue
166168
inputs.append(inp)
167169
if inputs:
@@ -183,6 +185,7 @@ def main() -> None:
183185
os.getenv(PUB_ENV_NAME, None),
184186
os.getenv(SEC_ENV_NAME, None),
185187
convertNumbers="hex" if os.getenv(CONVERTHEX_ENV_NAME, "0") == "1" else "str",
188+
disableCompression=disableCompression,
186189
log=Logger("Client")
187190
) as c:
188191
methods = {}

feClient/test/client.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
# Builtin modules
22
import os, unittest, socket
33
from time import monotonic
4-
from typing import Type
54
# Third party modules
65
from fsLogger import SimpleLogger, Logger
7-
from fsSignal import Signal, BaseSignal
6+
from fsSignal import Signal, T_Signal
87
# Local modules
98
from .. import Client, Request, FEIterator
109
# Program
1110
class ClientTest(unittest.TestCase):
12-
signal:Type[BaseSignal]
11+
signal:T_Signal
1312
@classmethod
1413
def setUpClass(cls) -> None:
1514
if os.environ.get("DEBUG") == "1":
1615
SimpleLogger("TRACE")
17-
cls.signal = Signal.getSoftSignal()
16+
cls.signal = Signal()
1817
return None
1918
def test_withStatement(self) -> None:
2019
with Client(log=Logger("test_withStatement.Client")) as fec:
@@ -48,14 +47,23 @@ def test_iterator(self) -> None:
4847
]
4948
it = fec.createIterator("iterBlocks", "btc", sortBy="blockheight", chunks=2, bitmask=1)
5049
self.assertIs(type(it), FEIterator)
50+
i = 0
5151
for i, r in islice(enumerate(it), 3):
5252
self.assertEqual(data[i], r)
53+
else:
54+
self.assertGreater(i, 0)
55+
i = 0
5356
for i, r in islice(enumerate(it, 3), 1):
5457
self.assertEqual(data[i], r)
58+
else:
59+
self.assertGreater(i, 0)
5560
#
5661
it = fec.createIterator("iterBlocks", "btc", sortBy="blockheight", fromKey=data[4][0], chunks=2, bitmask=1)
62+
i = 0
5763
for i, r in islice(enumerate(it, 5), 3):
5864
self.assertEqual(data[i], r)
65+
else:
66+
self.assertGreater(i, 0)
5967
self.assertTrue(it.hasNext())
6068
self.assertEqual(it.next(), data[8])
6169
#

setup.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
setup(
1111
name = "python-feclient",
12-
version = "0.1.1",
12+
version = "0.1.2",
1313
description = "Client for Fusion Explorer",
1414
keywords = "explorer client fusion solutions fusionsolutions fusionexplorer",
1515
author = "Andor `iFA` Rajci - Fusions Solutions KFT",
@@ -21,15 +21,14 @@
2121
long_description_content_type = "text/markdown",
2222
zip_safe = False,
2323
scripts = ["feClient/fexplorer-cli"],
24-
python_requires = ">=3.7.0",
25-
install_requires = ["python-fsrpcclient>=0.1.1"],
24+
python_requires = ">=3.8.0",
25+
install_requires = ["python-fsrpcclient~=0.2.0"],
2626
test_suite = "feClient.test",
2727
package_data = { "":["py.typed"] },
2828
classifiers = [ # https://pypi.org/pypi?%3Aaction=list_classifiers
2929
"Development Status :: 4 - Beta",
3030
"Topic :: Utilities",
3131
"Programming Language :: Python :: 3 :: Only",
32-
"Programming Language :: Python :: 3.7",
3332
"Programming Language :: Python :: 3.8",
3433
"Programming Language :: Python :: 3.9",
3534
"License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)",

0 commit comments

Comments
 (0)