From 4cef04277588204245fa27a64298de2c13dad914 Mon Sep 17 00:00:00 2001 From: Panagiotis Kotsias Date: Wed, 31 Mar 2021 13:48:09 +0200 Subject: [PATCH 1/8] Updated README --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index de352d1..731341e 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,5 @@ # etherscan-python -[![Build Status](https://travis-ci.com/pcko1/etherscan-python.svg?branch=master)](https://travis-ci.com/pcko1/etherscan-python) [![Build Status](https://github.com/pcko1/etherscan-python/workflows/build/badge.svg)](https://github.com/pcko1/etherscan-python) [![codecov](https://codecov.io/gh/pcko1/etherscan-python/branch/master/graph/badge.svg)](https://codecov.io/gh/pcko1/etherscan-python) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/6db2e36886ee46f58720c6131ef58dd6)](https://app.codacy.com/gh/pcko1/etherscan-python?utm_source=github.com&utm_medium=referral&utm_content=pcko1/etherscan-python&utm_campaign=Badge_Grade) From c3262d8d85690498e7ad3659161bcc208f8ad186 Mon Sep 17 00:00:00 2001 From: pcko1 Date: Wed, 31 Mar 2021 13:49:11 +0200 Subject: [PATCH 2/8] Removed Travis --- .travis.yml | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index e0cae0b..0000000 --- a/.travis.yml +++ /dev/null @@ -1,11 +0,0 @@ -language: python -python: -- '3.8' -install: -- pip install git+https://github.com/pcko1/etherscan-python.git coverage -script: -- coverage run -m unittest discover && coverage report -m -- bash <(curl -s https://codecov.io/bash) -env: - global: - - secure: ozKF63ysgAWWsr5R47T/B+u94L6pq89onaSfmqnmzmup8gS6WVnAE5yviuM3y9Il3BihXbxw5VUBx5lIwLg6MV4fCubxcNH+4qVjxGe1kxsjoT4wW8luJkkWGbvT+afGWaWU8AGWLTgqjYZrfkgTPxmNC/ulwoAHJra297ZvoGZEAcAZ/Y2vQ4u9JP2H3C3AJMhIdH/fuPf7DwKCvU4ufAhszJNbosSsaAxSndrecgHeQCxz+4RhX+a8XqIMTjys+DahSc4b5NRc/xJ/D1KMoNgtzj0yKldkcXhL1ykKW7S541ATKOrZLUqL924tlNdtm/IOvQ1Xy8xoR47rg+xAanj5SjiW0dsI+BIw94D4mIKVpKSB4wa3/ZxRKyw5fG5NUEFT/kdqp9vVz3n+x8nSNxV9x7yS0N/2fyACT2j+75aQhXvXI55WTleX9znsLRXFuTb0g0p7s3G/Bk+GS1gfJGdp/mRzdF80A0aMI5L+CY9e2G8VerQt93Is9w7+Ny3+XA4kSt+s0w/TzUSvv9y/BobSC2ZBiLltEaLups9VW5lCaWSgQLCr42rtHgMrduwzyagDGUlKUp5F8+Q1dMn0IpHEsjzwAl5SNuw8EoT9amBbWcR4d/Q+eqQ0JiHTbR2pwNs8bjYjIq4cXlze2BgYOZGStB1oMlfH9XSA7SrH7ns= From 7bf3e633b62ae791e3c034385fd4a8d9b7cfbf98 Mon Sep 17 00:00:00 2001 From: EggPool <33421807+EggPool@users.noreply.github.com> Date: Fri, 9 Apr 2021 16:14:05 +0200 Subject: [PATCH 3/8] Fallback to backport Auto fallback to use the backport for pre 3.7 pythons. --- etherscan/etherscan.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/etherscan/etherscan.py b/etherscan/etherscan.py index 5749aa8..9238a1c 100644 --- a/etherscan/etherscan.py +++ b/etherscan/etherscan.py @@ -1,5 +1,8 @@ import json -from importlib import resources +try: + from importlib import resources +except ImportError: + import importlib_resources as resources import requests From 575a1e7d9e258bdf594e794c2ecbdf0948de6271 Mon Sep 17 00:00:00 2001 From: Panagiotis Kotsias Date: Sun, 11 Apr 2021 13:55:20 +0200 Subject: [PATCH 4/8] Fixed for 100% codecov --- etherscan/etherscan.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/etherscan/etherscan.py b/etherscan/etherscan.py index 9238a1c..5749aa8 100644 --- a/etherscan/etherscan.py +++ b/etherscan/etherscan.py @@ -1,8 +1,5 @@ import json -try: - from importlib import resources -except ImportError: - import importlib_resources as resources +from importlib import resources import requests From 3dd94721804bbcbc8d13f0e38405e2ffa41c781d Mon Sep 17 00:00:00 2001 From: Panagiotis Kotsias Date: Thu, 15 Apr 2021 09:22:57 +0200 Subject: [PATCH 5/8] Added delay because of rate-limit --- test/test_modules.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/test_modules.py b/test/test_modules.py index 65e669b..632211d 100644 --- a/test/test_modules.py +++ b/test/test_modules.py @@ -1,5 +1,6 @@ import json from datetime import datetime +import time import os from unittest import TestCase @@ -44,6 +45,7 @@ def methods(self, net): "res": res, } dump(log, fname) + time.sleep(0.1) def test_net_methods(self): for net in self._NETS: From 584cd1b2014a51dcb05ed0c5c965b4d04d3544ac Mon Sep 17 00:00:00 2001 From: Panagiotis Kotsias Date: Wed, 21 Apr 2021 23:55:21 +0200 Subject: [PATCH 6/8] =?UTF-8?q?Removed=20G=C3=B6rli=20testnet?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/test_modules.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_modules.py b/test/test_modules.py index 632211d..bf10567 100644 --- a/test/test_modules.py +++ b/test/test_modules.py @@ -23,7 +23,7 @@ def dump(data, fname): class Case(TestCase): _MODULE = "" - _NETS = ["MAIN", "GOERLI", "KOVAN", "RINKEBY", "ROPSTEN"] + _NETS = ["MAIN", "KOVAN", "RINKEBY", "ROPSTEN"] def methods(self, net): print(f"\nNET: {net}") From 06b76428efcaa4d7d147ae612cbe86429e0c719f Mon Sep 17 00:00:00 2001 From: Panagiotis Kotsias Date: Wed, 21 Apr 2021 23:58:00 +0200 Subject: [PATCH 7/8] Updated README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 731341e..3a415f6 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ A minimal, yet complete, Python API for [Etherscan.io](https://etherscan.io/). -All standard and pro endpoints are provided and Görli, Kovan, Rinkeby and Ropsten testnets are also supported. +All standard and pro endpoints are provided. Kovan, Rinkeby and Ropsten testnets are also supported. Available on [PyPI](https://pypi.org/project/etherscan-python/). Powered by [Etherscan.io APIs](https://etherscan.io/apis#misc). From e059d7c91071d8999b8aaf90edb9bf7c488a110d Mon Sep 17 00:00:00 2001 From: Panagiotis Kotsias Date: Thu, 22 Apr 2021 00:02:26 +0200 Subject: [PATCH 8/8] Added time.sleep to avoid rate limits in unittests --- test/test_modules.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_modules.py b/test/test_modules.py index bf10567..8ad9f9b 100644 --- a/test/test_modules.py +++ b/test/test_modules.py @@ -45,7 +45,7 @@ def methods(self, net): "res": res, } dump(log, fname) - time.sleep(0.1) + time.sleep(0.5) def test_net_methods(self): for net in self._NETS: