From 70d32d5ae6f2c0bafa8ec7961eb7e9a689c5b02d Mon Sep 17 00:00:00 2001 From: Harmouch101 Date: Thu, 7 Oct 2021 21:08:52 +0300 Subject: [PATCH 01/15] :heavy_plus_sign: Add Python 3.10 support to CI Signed-off-by: Harmouch101 --- .circleci/config.yml | 107 ++++++++++++++++++++++++++++++++++++++++++- setup.py | 23 +++++----- tox.ini | 17 +++++-- 3 files changed, 130 insertions(+), 17 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c76ed67ab7..e89115523b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -420,11 +420,102 @@ jobs: - image: circleci/python:3.9 environment: TOXENV: py39-wheel-cli + # + # Python 3.10 + # + py310-core: + <<: *common + docker: + - image: circleci/python:3.10 + environment: + TOXENV: py310-core + + py310-ens: + <<: *common + docker: + - image: circleci/python:3.10 + environment: + TOXENV: py310-ens + + py310-ethpm: + <<: *ethpm_steps + docker: + - image: circleci/python:3.10 + environment: + TOXENV: py310-ethpm + # Please don't use this key for any shenanigans + WEB3_INFURA_PROJECT_ID: 7707850c2fb7465ebe6f150d67182e22 + + py310-integration-goethereum-ipc: + <<: *geth_steps + docker: + - image: circleci/python:3.10 + environment: + TOXENV: py310-integration-goethereum-ipc + GETH_VERSION: v1.10.8 + + py310-integration-goethereum-http: + <<: *geth_steps + docker: + - image: circleci/python:3.10 + environment: + TOXENV: py310-integration-goethereum-http + GETH_VERSION: v1.10.8 + + py310-integration-goethereum-ws: + <<: *geth_steps + docker: + - image: circleci/python:3.10 + environment: + TOXENV: py310-integration-goethereum-ws + GETH_VERSION: v1.10.8 + + # py310-integration-parity-ipc: + # <<: *parity_steps + # docker: + # - image: circleci/python:3.10 + # environment: + # TOXENV: py310-integration-parity-ipc + # PARITY_VERSION: v2.3.5 + # PARITY_OS: linux + + # py310-integration-parity-http: + # <<: *parity_steps + # docker: + # - image: circleci/python:3.10 + # environment: + # TOXENV: py310-integration-parity-http + # PARITY_VERSION: v2.3.5 + # PARITY_OS: linux + + # py310-integration-parity-ws: + # <<: *parity_steps + # docker: + # - image: circleci/python:3.10 + # environment: + # TOXENV: py310-integration-parity-ws + # PARITY_VERSION: v2.3.5 + # PARITY_OS: linux + + py310-integration-ethtester-pyevm: + <<: *common + docker: + - image: circleci/python:3.10 + environment: + TOXENV: py310-integration-ethtester + ETHEREUM_TESTER_CHAIN_BACKEND: eth_tester.backends.PyEVMBackend + + py310-wheel-cli: + <<: *common + docker: + - image: circleci/python:3.10 + environment: + TOXENV: py310-wheel-cli benchmark: <<: *geth_steps docker: - - image: circleci/python:3.9 + - image: circleci/python:3.10 environment: TOXENV: benchmark GETH_VERSION: v1.10.13 @@ -437,6 +528,7 @@ workflows: - py37-core - py38-core - py39-core + - py310-core - lint - docs - benchmark @@ -462,3 +554,16 @@ workflows: - py39-integration-goethereum-ws - py39-integration-ethtester-pyevm - py39-wheel-cli + - py310-integration-ethtester-pyevm + - py310-wheel-cli + - py310-ens + - py310-ethpm + - py310-integration-goethereum-ipc + - py310-integration-goethereum-http + - py310-integration-goethereum-ws + # - py310-integration-parity-ipc + # - py310-integration-parity-http + # - py310-integration-parity-ws + - py310-integration-ethtester-pyevm + - py310-wheel-cli + diff --git a/setup.py b/setup.py index dc1c816c54..a357e1ae1c 100644 --- a/setup.py +++ b/setup.py @@ -20,17 +20,17 @@ ], 'docs': [ "mock", - "sphinx-better-theme>=0.1.4", - "click>=5.1", - "configparser==3.5.0", - "contextlib2>=0.5.4", - "py-geth>=3.6.0,<4", - "py-solc>=0.4.0", - "pytest>=4.4.0,<5.0.0", - "sphinx>=3.0,<4", - "sphinx_rtd_theme>=0.1.9", - "toposort>=1.4", - "towncrier==18.5.0", + "sphinx-better-theme>=0.1.4,<=0.13", + "click>=5.1,<=8.0.1", + "configparser==3.5.0,<=5.0.2", + "contextlib2>=0.5.4,<=0.6.0", + "py-geth>=3.5.0,<4", + "py-solc>=0.4.0,<4.0.0", + "pytest>=4.4.0,<6.3.0", + "sphinx>=3.0,<=4.2.0", + "sphinx_rtd_theme>=0.1.9,<=1.0.0", + "toposort>=1.4,<=2.0.2", + "towncrier>=18.5.0,<=21.3.0", "urllib3", "wheel" ], @@ -110,5 +110,6 @@ 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', + 'Programming Language :: Python :: 3.10', ], ) diff --git a/tox.ini b/tox.ini index f91ecfe023..ada9f14247 100644 --- a/tox.ini +++ b/tox.ini @@ -1,13 +1,13 @@ [tox] envlist= - py{37,38,39}-ens - py{37,38,39}-ethpm - py{37,38,39}-core - py{37,38,39}-integration-{goethereum,ethtester} + py{37,38,39,310}-ens + py{37,38,39,310}-ethpm + py{37,38,39,310}-core + py{37,38,39,310}-integration-{goethereum,ethtester} lint docs benchmark - py{37,38,39}-wheel-cli + py{37,38,39,310}-wheel-cli [isort] combine_as_imports=True @@ -52,6 +52,7 @@ basepython = py37: python3.7 py38: python3.8 py39: python3.9 + py310: python3.10 [testenv:lint] basepython=python @@ -97,6 +98,12 @@ whitelist_externals={[common-wheel-cli]whitelist_externals} commands={[common-wheel-cli]commands} skip_install=true +[testenv:py310-wheel-cli] +deps={[common-wheel-cli]deps} +whitelist_externals={[common-wheel-cli]whitelist_externals} +commands={[common-wheel-cli]commands} +skip_install=true + [common-wheel-cli-windows] deps=wheel whitelist_externals= From 8f4e1ab950590433ecd248e5e1c87c99c64e0332 Mon Sep 17 00:00:00 2001 From: Harmouch101 Date: Fri, 8 Oct 2021 19:05:09 +0300 Subject: [PATCH 02/15] Dropped support for all parities Signed-off-by: Harmouch101 --- .circleci/config.yml | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e89115523b..e5b7c23c8a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -470,33 +470,6 @@ jobs: TOXENV: py310-integration-goethereum-ws GETH_VERSION: v1.10.8 - # py310-integration-parity-ipc: - # <<: *parity_steps - # docker: - # - image: circleci/python:3.10 - # environment: - # TOXENV: py310-integration-parity-ipc - # PARITY_VERSION: v2.3.5 - # PARITY_OS: linux - - # py310-integration-parity-http: - # <<: *parity_steps - # docker: - # - image: circleci/python:3.10 - # environment: - # TOXENV: py310-integration-parity-http - # PARITY_VERSION: v2.3.5 - # PARITY_OS: linux - - # py310-integration-parity-ws: - # <<: *parity_steps - # docker: - # - image: circleci/python:3.10 - # environment: - # TOXENV: py310-integration-parity-ws - # PARITY_VERSION: v2.3.5 - # PARITY_OS: linux - py310-integration-ethtester-pyevm: <<: *common docker: From e68f117016f558d934f935b6e225ab883378a5c2 Mon Sep 17 00:00:00 2001 From: Harmouch101 Date: Fri, 8 Oct 2021 19:07:08 +0300 Subject: [PATCH 03/15] Change the base docker image. Signed-off-by: Harmouch101 --- .circleci/config.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e5b7c23c8a..35ee7c1418 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -426,21 +426,21 @@ jobs: py310-core: <<: *common docker: - - image: circleci/python:3.10 + - image: cimg/python:3.10.0 environment: TOXENV: py310-core py310-ens: <<: *common docker: - - image: circleci/python:3.10 + - image: cimg/python:3.10.0 environment: TOXENV: py310-ens py310-ethpm: <<: *ethpm_steps docker: - - image: circleci/python:3.10 + - image: cimg/python:3.10.0 environment: TOXENV: py310-ethpm # Please don't use this key for any shenanigans @@ -449,7 +449,7 @@ jobs: py310-integration-goethereum-ipc: <<: *geth_steps docker: - - image: circleci/python:3.10 + - image: cimg/python:3.10.0 environment: TOXENV: py310-integration-goethereum-ipc GETH_VERSION: v1.10.8 @@ -457,7 +457,7 @@ jobs: py310-integration-goethereum-http: <<: *geth_steps docker: - - image: circleci/python:3.10 + - image: cimg/python:3.10.0 environment: TOXENV: py310-integration-goethereum-http GETH_VERSION: v1.10.8 @@ -465,7 +465,7 @@ jobs: py310-integration-goethereum-ws: <<: *geth_steps docker: - - image: circleci/python:3.10 + - image: cimg/python:3.10.0 environment: TOXENV: py310-integration-goethereum-ws GETH_VERSION: v1.10.8 @@ -473,7 +473,7 @@ jobs: py310-integration-ethtester-pyevm: <<: *common docker: - - image: circleci/python:3.10 + - image: cimg/python:3.10.0 environment: TOXENV: py310-integration-ethtester ETHEREUM_TESTER_CHAIN_BACKEND: eth_tester.backends.PyEVMBackend @@ -481,14 +481,14 @@ jobs: py310-wheel-cli: <<: *common docker: - - image: circleci/python:3.10 + - image: cimg/python:3.10.0 environment: TOXENV: py310-wheel-cli benchmark: <<: *geth_steps docker: - - image: circleci/python:3.10 + - image: cimg/python:3.10.0 environment: TOXENV: benchmark GETH_VERSION: v1.10.13 From ddb2f777c6caeec2df3c393485c0d29b405ea29b Mon Sep 17 00:00:00 2001 From: Harmouch101 Date: Fri, 8 Oct 2021 20:28:17 +0300 Subject: [PATCH 04/15] Removed all commented out parity references in CI Signed-off-by: Harmouch101 --- .circleci/config.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 35ee7c1418..5fc0632a6e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -534,9 +534,5 @@ workflows: - py310-integration-goethereum-ipc - py310-integration-goethereum-http - py310-integration-goethereum-ws - # - py310-integration-parity-ipc - # - py310-integration-parity-http - # - py310-integration-parity-ws - py310-integration-ethtester-pyevm - py310-wheel-cli - From 91ab57fcd808323ecf5bce71e039ad5092acca70 Mon Sep 17 00:00:00 2001 From: Harmouch101 Date: Fri, 8 Oct 2021 20:53:28 +0300 Subject: [PATCH 05/15] Changed the base docker image. Signed-off-by: Harmouch101 --- .circleci/config.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5fc0632a6e..e39deeca36 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -426,21 +426,21 @@ jobs: py310-core: <<: *common docker: - - image: cimg/python:3.10.0 + - image: circleci/python:3.10.0rc2 environment: TOXENV: py310-core py310-ens: <<: *common docker: - - image: cimg/python:3.10.0 + - image: circleci/python:3.10.0rc2 environment: TOXENV: py310-ens py310-ethpm: <<: *ethpm_steps docker: - - image: cimg/python:3.10.0 + - image: circleci/python:3.10.0rc2 environment: TOXENV: py310-ethpm # Please don't use this key for any shenanigans @@ -449,7 +449,7 @@ jobs: py310-integration-goethereum-ipc: <<: *geth_steps docker: - - image: cimg/python:3.10.0 + - image: circleci/python:3.10.0rc2 environment: TOXENV: py310-integration-goethereum-ipc GETH_VERSION: v1.10.8 @@ -457,7 +457,7 @@ jobs: py310-integration-goethereum-http: <<: *geth_steps docker: - - image: cimg/python:3.10.0 + - image: circleci/python:3.10.0rc2 environment: TOXENV: py310-integration-goethereum-http GETH_VERSION: v1.10.8 @@ -465,7 +465,7 @@ jobs: py310-integration-goethereum-ws: <<: *geth_steps docker: - - image: cimg/python:3.10.0 + - image: circleci/python:3.10.0rc2 environment: TOXENV: py310-integration-goethereum-ws GETH_VERSION: v1.10.8 @@ -473,7 +473,7 @@ jobs: py310-integration-ethtester-pyevm: <<: *common docker: - - image: cimg/python:3.10.0 + - image: circleci/python:3.10.0rc2 environment: TOXENV: py310-integration-ethtester ETHEREUM_TESTER_CHAIN_BACKEND: eth_tester.backends.PyEVMBackend @@ -481,14 +481,14 @@ jobs: py310-wheel-cli: <<: *common docker: - - image: cimg/python:3.10.0 + - image: circleci/python:3.10.0rc2 environment: TOXENV: py310-wheel-cli benchmark: <<: *geth_steps docker: - - image: cimg/python:3.10.0 + - image: circleci/python:3.10.0rc2 environment: TOXENV: benchmark GETH_VERSION: v1.10.13 From 0fec352608c64946fcc610b49587bdd87de707fe Mon Sep 17 00:00:00 2001 From: Harmouch101 Date: Fri, 8 Oct 2021 22:14:52 +0300 Subject: [PATCH 06/15] make websockets compatible with python3.10 Signed-off-by: Harmouch101 --- web3/providers/websocket.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/web3/providers/websocket.py b/web3/providers/websocket.py index e999d56d3f..bc103dcf9d 100644 --- a/web3/providers/websocket.py +++ b/web3/providers/websocket.py @@ -2,6 +2,7 @@ import json import logging import os +import sys from threading import ( Thread, ) @@ -10,6 +11,7 @@ ) from typing import ( Any, + Dict, Optional, Type, Union, From 521f325da017d895284571e2655024ec6e10611b Mon Sep 17 00:00:00 2001 From: Felipe Selmo Date: Fri, 26 Nov 2021 13:13:59 -0700 Subject: [PATCH 07/15] Change docker image to use 3.10 --- .circleci/config.yml | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e39deeca36..d77f596e7e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -420,27 +420,28 @@ jobs: - image: circleci/python:3.9 environment: TOXENV: py39-wheel-cli + # # Python 3.10 # py310-core: <<: *common docker: - - image: circleci/python:3.10.0rc2 + - image: circleci/python:3.10 environment: TOXENV: py310-core py310-ens: <<: *common docker: - - image: circleci/python:3.10.0rc2 + - image: circleci/python:3.10 environment: TOXENV: py310-ens py310-ethpm: <<: *ethpm_steps docker: - - image: circleci/python:3.10.0rc2 + - image: circleci/python:3.10 environment: TOXENV: py310-ethpm # Please don't use this key for any shenanigans @@ -449,31 +450,31 @@ jobs: py310-integration-goethereum-ipc: <<: *geth_steps docker: - - image: circleci/python:3.10.0rc2 + - image: circleci/python:3.10 environment: TOXENV: py310-integration-goethereum-ipc - GETH_VERSION: v1.10.8 + GETH_VERSION: v1.10.11 py310-integration-goethereum-http: <<: *geth_steps docker: - - image: circleci/python:3.10.0rc2 + - image: circleci/python:3.10 environment: TOXENV: py310-integration-goethereum-http - GETH_VERSION: v1.10.8 + GETH_VERSION: v1.10.11 py310-integration-goethereum-ws: <<: *geth_steps docker: - - image: circleci/python:3.10.0rc2 + - image: circleci/python:3.10 environment: TOXENV: py310-integration-goethereum-ws - GETH_VERSION: v1.10.8 + GETH_VERSION: v1.10.11 py310-integration-ethtester-pyevm: <<: *common docker: - - image: circleci/python:3.10.0rc2 + - image: circleci/python:3.10 environment: TOXENV: py310-integration-ethtester ETHEREUM_TESTER_CHAIN_BACKEND: eth_tester.backends.PyEVMBackend @@ -481,14 +482,14 @@ jobs: py310-wheel-cli: <<: *common docker: - - image: circleci/python:3.10.0rc2 + - image: circleci/python:3.10 environment: TOXENV: py310-wheel-cli benchmark: <<: *geth_steps docker: - - image: circleci/python:3.10.0rc2 + - image: circleci/python:3.10 environment: TOXENV: benchmark GETH_VERSION: v1.10.13 From 5395d90f6a7af686d096f5df0c1964c5998d076b Mon Sep 17 00:00:00 2001 From: kclowes Date: Fri, 11 Feb 2022 13:54:43 -0700 Subject: [PATCH 08/15] Fixups --- setup.py | 22 +++++++++++----------- web3/providers/websocket.py | 2 -- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/setup.py b/setup.py index a357e1ae1c..c7e5c66baa 100644 --- a/setup.py +++ b/setup.py @@ -20,17 +20,17 @@ ], 'docs': [ "mock", - "sphinx-better-theme>=0.1.4,<=0.13", - "click>=5.1,<=8.0.1", - "configparser==3.5.0,<=5.0.2", - "contextlib2>=0.5.4,<=0.6.0", - "py-geth>=3.5.0,<4", - "py-solc>=0.4.0,<4.0.0", - "pytest>=4.4.0,<6.3.0", - "sphinx>=3.0,<=4.2.0", - "sphinx_rtd_theme>=0.1.9,<=1.0.0", - "toposort>=1.4,<=2.0.2", - "towncrier>=18.5.0,<=21.3.0", + "sphinx-better-theme>=0.1.4", + "click>=5.1", + "configparser==3.5.0", + "contextlib2>=0.5.4", + "py-geth>=3.6.0,<4", + "py-solc>=0.4.0", + "pytest>=6.2.5,<7", + "sphinx>=3.0,<=4", + "sphinx_rtd_theme>=0.1.9", + "toposort>=1.4", + "towncrier>=18.5.0", "urllib3", "wheel" ], diff --git a/web3/providers/websocket.py b/web3/providers/websocket.py index bc103dcf9d..e999d56d3f 100644 --- a/web3/providers/websocket.py +++ b/web3/providers/websocket.py @@ -2,7 +2,6 @@ import json import logging import os -import sys from threading import ( Thread, ) @@ -11,7 +10,6 @@ ) from typing import ( Any, - Dict, Optional, Type, Union, From e5c60491e176c42357b2eb18d34ce0fe3d5f2704 Mon Sep 17 00:00:00 2001 From: kclowes Date: Fri, 11 Feb 2022 14:10:49 -0700 Subject: [PATCH 09/15] Fix dependencies --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index c7e5c66baa..00788354ad 100644 --- a/setup.py +++ b/setup.py @@ -38,7 +38,7 @@ "bumpversion", "flaky>=3.7.0,<4", "hypothesis>=3.31.2,<6", - "pytest>=4.4.0,<5.0.0", + "pytest>=6.2.5,<7", "pytest-asyncio>=0.10.0,<0.11", "pytest-mock>=1.10,<2", "pytest-pythonpath>=0.3", @@ -92,7 +92,7 @@ "typing-extensions>=3.7.4.1,<5;python_version<'3.8'", "websockets>=10.0.0,<11", ], - python_requires='>=3.7,<3.10', + python_requires='>=3.7,<3.11', extras_require=extras_require, py_modules=['web3', 'ens', 'ethpm'], entry_points={"pytest11": ["pytest_ethereum = web3.tools.pytest_ethereum.plugins"]}, From 44feecb1119b203b27813ae219c37d38b0c2832b Mon Sep 17 00:00:00 2001 From: kclowes Date: Fri, 11 Feb 2022 14:36:18 -0700 Subject: [PATCH 10/15] Update pytest-asyncio plugin --- pytest.ini | 1 + setup.py | 2 +- tests/core/providers/test_websocket_provider.py | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pytest.ini b/pytest.ini index f5fdc0ec93..f4b46a1453 100644 --- a/pytest.ini +++ b/pytest.ini @@ -2,6 +2,7 @@ addopts= -v --showlocals --durations 10 python_paths= . xfail_strict=true +asyncio_mode=strict [pytest-watch] runner= pytest --failed-first --maxfail=1 --no-success-flaky-report diff --git a/setup.py b/setup.py index 00788354ad..6eafd4f2ba 100644 --- a/setup.py +++ b/setup.py @@ -39,7 +39,7 @@ "flaky>=3.7.0,<4", "hypothesis>=3.31.2,<6", "pytest>=6.2.5,<7", - "pytest-asyncio>=0.10.0,<0.11", + "pytest-asyncio>=0.18.1,<0.19", "pytest-mock>=1.10,<2", "pytest-pythonpath>=0.3", "pytest-watch>=4.2,<5", diff --git a/tests/core/providers/test_websocket_provider.py b/tests/core/providers/test_websocket_provider.py index 562225fa1a..0cf475d31e 100644 --- a/tests/core/providers/test_websocket_provider.py +++ b/tests/core/providers/test_websocket_provider.py @@ -28,7 +28,7 @@ ) -@pytest.yield_fixture +@pytest.fixture def start_websocket_server(open_port): event_loop = asyncio.new_event_loop() @@ -51,7 +51,7 @@ async def empty_server(websocket, path): event_loop.call_soon_threadsafe(event_loop.stop) -@pytest.fixture() +@pytest.fixture def w3(open_port, start_websocket_server): # need new event loop as the one used by server is already running event_loop = asyncio.new_event_loop() From 6973d6ddcb3fe6a9050766516eeb4aea9d3e507c Mon Sep 17 00:00:00 2001 From: kclowes Date: Fri, 11 Feb 2022 14:57:51 -0700 Subject: [PATCH 11/15] Undo some dependency pins --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 6eafd4f2ba..e4b28448d5 100644 --- a/setup.py +++ b/setup.py @@ -27,10 +27,10 @@ "py-geth>=3.6.0,<4", "py-solc>=0.4.0", "pytest>=6.2.5,<7", - "sphinx>=3.0,<=4", + "sphinx>=3.0,<4", "sphinx_rtd_theme>=0.1.9", "toposort>=1.4", - "towncrier>=18.5.0", + "towncrier==18.5.0", "urllib3", "wheel" ], From a7189f774e974c037f6a644fc72abfc6fb6a5b67 Mon Sep 17 00:00:00 2001 From: kclowes Date: Fri, 11 Feb 2022 15:05:49 -0700 Subject: [PATCH 12/15] Mark async fixture as such, clean up pytest DeprecationWarnings --- tests/integration/conftest.py | 2 +- tests/integration/go_ethereum/conftest.py | 2 +- tests/integration/go_ethereum/test_goethereum_http.py | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/integration/conftest.py b/tests/integration/conftest.py index a9ddbbd19e..dd254c6876 100644 --- a/tests/integration/conftest.py +++ b/tests/integration/conftest.py @@ -37,7 +37,7 @@ def revert_contract_factory(web3): return contract_factory -@pytest.yield_fixture(scope="module") +@pytest.fixture(scope="module") def event_loop(request): loop = asyncio.get_event_loop_policy().new_event_loop() yield loop diff --git a/tests/integration/go_ethereum/conftest.py b/tests/integration/go_ethereum/conftest.py index 7851b2e4a5..59934890c7 100644 --- a/tests/integration/go_ethereum/conftest.py +++ b/tests/integration/go_ethereum/conftest.py @@ -181,7 +181,7 @@ def unlockable_account_dual_type(unlockable_account, address_conversion_func): return address_conversion_func(unlockable_account) -@pytest.yield_fixture +@pytest.fixture def unlocked_account_dual_type(web3, unlockable_account_dual_type, unlockable_account_pw): web3.geth.personal.unlock_account(unlockable_account_dual_type, unlockable_account_pw) yield unlockable_account_dual_type diff --git a/tests/integration/go_ethereum/test_goethereum_http.py b/tests/integration/go_ethereum/test_goethereum_http.py index a94dc8b7f7..c681e38f95 100644 --- a/tests/integration/go_ethereum/test_goethereum_http.py +++ b/tests/integration/go_ethereum/test_goethereum_http.py @@ -1,4 +1,5 @@ import pytest +import pytest_asyncio from tests.utils import ( get_open_port, @@ -94,7 +95,7 @@ def web3(geth_process, endpoint_uri): return _web3 -@pytest.fixture(scope="module") +@pytest_asyncio.fixture(scope="module") async def async_w3(geth_process, endpoint_uri): await wait_for_aiohttp(endpoint_uri) _web3 = Web3( From 24c6be39a675c4530e31b6e0bf91c5a1ec807830 Mon Sep 17 00:00:00 2001 From: kclowes Date: Fri, 11 Feb 2022 15:14:27 -0700 Subject: [PATCH 13/15] Lint --- tests/integration/go_ethereum/test_goethereum_http.py | 1 + web3/_utils/module_testing/web3_module.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/integration/go_ethereum/test_goethereum_http.py b/tests/integration/go_ethereum/test_goethereum_http.py index c681e38f95..a3ea078cac 100644 --- a/tests/integration/go_ethereum/test_goethereum_http.py +++ b/tests/integration/go_ethereum/test_goethereum_http.py @@ -1,4 +1,5 @@ import pytest + import pytest_asyncio from tests.utils import ( diff --git a/web3/_utils/module_testing/web3_module.py b/web3/_utils/module_testing/web3_module.py index a8eb73f332..17e25e1ff7 100644 --- a/web3/_utils/module_testing/web3_module.py +++ b/web3/_utils/module_testing/web3_module.py @@ -179,7 +179,7 @@ def test_solidityKeccak( self, web3: "Web3", types: Sequence[TypeStr], values: Sequence[Any], expected: HexBytes ) -> None: if isinstance(expected, type) and issubclass(expected, Exception): - with pytest.raises(expected): + with pytest.raises(expected): # type: ignore web3.solidityKeccak(types, values) return From 2de54c3d2cb094e6fc1e07737e00902f7212dfef Mon Sep 17 00:00:00 2001 From: kclowes Date: Fri, 11 Feb 2022 16:53:01 -0700 Subject: [PATCH 14/15] Add newsfragment --- newsfragments/2175.feature.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 newsfragments/2175.feature.rst diff --git a/newsfragments/2175.feature.rst b/newsfragments/2175.feature.rst new file mode 100644 index 0000000000..dd5d94db98 --- /dev/null +++ b/newsfragments/2175.feature.rst @@ -0,0 +1 @@ +Add support for Python 3.10 From 2c7731f1a85fd7d30cd1829e6a65da2ced857749 Mon Sep 17 00:00:00 2001 From: kclowes Date: Mon, 14 Feb 2022 10:54:12 -0700 Subject: [PATCH 15/15] Remove duplicate test runs --- .circleci/config.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d77f596e7e..08c9b05884 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -528,8 +528,6 @@ workflows: - py39-integration-goethereum-ws - py39-integration-ethtester-pyevm - py39-wheel-cli - - py310-integration-ethtester-pyevm - - py310-wheel-cli - py310-ens - py310-ethpm - py310-integration-goethereum-ipc