# -*- coding: utf-8 -*-

import os
import subprocess

from setuptools import find_packages, setup

__version__ = "0.3.0"

extras_require = {
    "test": [
        "pytest>=5.4,<6.0",
        "pytest-cov>=2.10,<3.0",
        "pytest-instafail>=0.4,<1.0",
        "pytest-xdist>=1.32,<2.0",
        "eth-tester[py-evm]>=0.5.0b1,<0.6",
        "py-evm==0.4.0a4",  # NOTE: temporarily pinned until we have support for py-evm 0.5.0a0+
        "web3==5.12.3",
        "tox>=3.15,<4.0",
        "lark-parser==0.10.0",
        "hypothesis[lark]>=5.37.1,<6.0",
    ],
    "lint": [
        "black==21.9b0",
        "flake8==3.9.2",
        "flake8-bugbear==20.1.4",
        "flake8-use-fstring==1.1",
        "isort==5.9.3",
        "mypy==0.910",
    ],
    "docs": ["recommonmark", "sphinx>=3.0,<4.0", "sphinx_rtd_theme>=0.5,<0.6"],
    "dev": ["ipython", "pre-commit", "pyinstaller", "twine"],
}

extras_require["dev"] = (
    extras_require["test"] + extras_require["lint"] + extras_require["docs"] + extras_require["dev"]
)

hash_file_rel_path = os.path.join("vyper", "vyper_git_version.txt")
hashfile = os.path.relpath(hash_file_rel_path)

try:
    commithash = subprocess.check_output("git rev-parse HEAD".split())
    commithash_str = commithash.decode("utf-8").strip()
    with open(hashfile, "w") as fh:
        fh.write(f"{__version__}\n{commithash_str}")
except subprocess.CalledProcessError:
    pass

with open("README.md", "r") as f:
    long_description = f.read()

setup(
    name="vyper",
    version=__version__,
    description="Vyper: the Pythonic Programming Language for the EVM",
    long_description=long_description,
    long_description_content_type="text/markdown",
    author="Vyper Team",
    author_email="",
    url="https://github.com/vyperlang/vyper",
    license="Apache License 2.0",
    keywords="ethereum evm smart contract language",
    include_package_data=True,
    packages=find_packages(exclude=("tests", "docs")),
    python_requires=">=3.7,<3.10",
    py_modules=["vyper"],
    install_requires=[
        "asttokens==2.0.4",
        "pycryptodome>=3.5.1,<4",
        "semantic-version==2.8.5",
        "cached-property==1.5.2 ; python_version<'3.8'",
    ],
    setup_requires=["pytest-runner"],
    tests_require=extras_require["test"],
    extras_require=extras_require,
    entry_points={
        "console_scripts": [
            "vyper=vyper.cli.vyper_compile:_parse_cli_args",
            "vyper-serve=vyper.cli.vyper_serve:_parse_cli_args",
            "vyper-lll=vyper.cli.vyper_lll:_parse_cli_args",
            "vyper-json=vyper.cli.vyper_json:_parse_cli_args",
        ]
    },
    classifiers=[
        "Intended Audience :: Developers",
        "License :: OSI Approved :: Apache Software License",
        "Programming Language :: Python :: 3.7",
        "Programming Language :: Python :: 3.8",
        "Programming Language :: Python :: 3.9",
    ],
    data_files=[("", [hash_file_rel_path])],
)

setup.py
# -*- coding: utf-8 -*-

import os
import subprocess

from setuptools import find_packages, setup

__version__ = "0.3.0"

extras_require = {
    "test": [
        "pytest>=5.4,<6.0",
        "pytest-cov>=2.10,<3.0",
        "pytest-instafail>=0.4,<1.0",
        "pytest-xdist>=1.32,<2.0",
        "eth-tester[py-evm]>=0.5.0b1,<0.6",
        "py-evm==0.4.0a4",  # NOTE: temporarily pinned until we have support for py-evm 0.5.0a0+
        "web3==5.21.0",
        "tox>=3.15,<4.0",
        "lark-parser==0.10.0",
        "hypothesis[lark]>=5.37.1,<6.0",
    ],
    "lint": [
        "black==21.9b0",
        "flake8==3.9.2",
        "flake8-bugbear==20.1.4",
        "flake8-use-fstring==1.1",
        "isort==5.9.3",
        "mypy==0.910",
    ],
    "docs": ["recommonmark", "sphinx>=3.0,<4.0", "sphinx_rtd_theme>=0.5,<0.6"],
    "dev": ["ipython", "pre-commit", "pyinstaller", "twine"],
}

extras_require["dev"] = (
    extras_require["test"] + extras_require["lint"] + extras_require["docs"] + extras_require["dev"]
)

hash_file_rel_path = os.path.join("vyper", "vyper_git_version.txt")
hashfile = os.path.relpath(hash_file_rel_path)

try:
    commithash = subprocess.check_output("git rev-parse HEAD".split())
    commithash_str = commithash.decode("utf-8").strip()
    with open(hashfile, "w") as fh:
        fh.write(f"{__version__}\n{commithash_str}")
except subprocess.CalledProcessError:
    pass

with open("README.md", "r") as f:
    long_description = f.read()

setup(
    name="vyper",
    version=__version__,
    description="Vyper: the Pythonic Programming Language for the EVM",
    long_description=long_description,
    long_description_content_type="text/markdown",
    author="Vyper Team",
    author_email="",
    url="https://github.com/vyperlang/vyper",
    license="Apache License 2.0",
    keywords="ethereum evm smart contract language",
    include_package_data=True,
    packages=find_packages(exclude=("tests", "docs")),
    python_requires=">=3.7,<3.10",
    py_modules=["vyper"],
    install_requires=[
        "asttokens==2.0.4",
        "pycryptodome>=3.5.1,<4",
        "semantic-version==2.8.5",
        "cached-property==1.5.2 ; python_version<'3.8'",
    ],
    setup_requires=["pytest-runner"],
    tests_require=extras_require["test"],
    extras_require=extras_require,
    entry_points={
        "console_scripts": [
            "vyper=vyper.cli.vyper_compile:_parse_cli_args",
            "vyper-serve=vyper.cli.vyper_serve:_parse_cli_args",
            "vyper-lll=vyper.cli.vyper_lll:_parse_cli_args",
            "vyper-json=vyper.cli.vyper_json:_parse_cli_args",
        ]
    },
    classifiers=[
        "Intended Audience :: Developers",
        "License :: OSI Approved :: Apache Software License",
        "Programming Language :: Python :: 3.7",
        "Programming Language :: Python :: 3.8",
        "Programming Language :: Python :: 3.9",
    ],
    data_files=[("", [hash_file_rel_path])],
)

setup.py
diff --git a/setup.py b/setup.py
index 3231e310d5..44f27fa37f 100644
--- a/setup.py
+++ b/setup.py
@@ -15,7 +15,7 @@
         "pytest-xdist>=1.32,<2.0",
         "eth-tester[py-evm]>=0.5.0b1,<0.6",
         "py-evm==0.4.0a4",  # NOTE: temporarily pinned until we have support for py-evm 0.5.0a0+
-        "web3==5.12.3",
+        "web3==5.21.0",
         "tox>=3.15,<4.0",
         "lark-parser==0.10.0",
         "hypothesis[lark]>=5.37.1,<6.0",
diff --git a/tests/parser/features/test_assert.py b/tests/parser/features/test_assert.py
index d31edc74a4..de4b7359f7 100644
--- a/tests/parser/features/test_assert.py
+++ b/tests/parser/features/test_assert.py
@@ -3,6 +3,11 @@
 from eth_tester.exceptions import TransactionFailed
 
 
+# web3 returns f"execution reverted: {err_str}"
+def _fixup_err_str(s):
+    return s.replace("execution reverted: ", "")
+
+
 def test_assert_refund(w3, get_contract_with_gas_estimation, assert_tx_failed):
     code = """
 @external
@@ -45,21 +50,21 @@ def test3(reason_str: String[32]):
     with pytest.raises(TransactionFailed) as e_info:
         c.test(0)
 
-    assert e_info.value.args[0] == "larger than one please"
+    assert _fixup_err_str(e_info.value.args[0]) == "larger than one please"
     # a = 0, b = 1
     with pytest.raises(TransactionFailed) as e_info:
         c.test2(0, 1, "")
-    assert e_info.value.args[0] == "a is not large enough"
+    assert _fixup_err_str(e_info.value.args[0]) == "a is not large enough"
     # a = 1, b = 0
     with pytest.raises(TransactionFailed) as e_info:
         c.test2(2, 2, " because I said so")
-    assert e_info.value.args[0] == "b may only be 1" + " because I said so"
+    assert _fixup_err_str(e_info.value.args[0]) == "b may only be 1" + " because I said so"
     # return correct value
     assert c.test2(5, 1, "") == 17
 
     with pytest.raises(TransactionFailed) as e_info:
         c.test3("An exception")
-    assert e_info.value.args[0] == "An exception"
+    assert _fixup_err_str(e_info.value.args[0]) == "An exception"
 
 
 invalid_code = [
@@ -183,7 +188,7 @@ def test(x: uint256[3]) -> bool:
     assert_tx_failed(lambda: c.test([1, 3, 5]))
 
 
-def test_assest_reason_revert_length(w3, get_contract, memory_mocker):
+def test_assert_reason_revert_length(w3, get_contract, memory_mocker):
     code = """
 @external
 def test() -> int128:
@@ -194,7 +199,7 @@ def test() -> int128:
     w3.manager.provider.ethereum_tester.backend.is_eip838_error = lambda err: False
     with pytest.raises(TransactionFailed) as e_info:
         c.test()
-    error_bytes = eval(e_info.value.args[0])
+    error_bytes = eval(_fixup_err_str(e_info.value.args[0]))
     assert len(error_bytes) == 100
     msg = decode_single("string", error_bytes[36:])
     assert msg == "oops"

test fail with web3.py 5.21.0
### Version Information

* vyper Version (output of `vyper --version`): latest master (cff69d63)
* OS: macos
* Python Version (output of `python --version`): 3.9.6

### What's your issue about?

tests fail

tests/cli/vyper_json/test_parse_args_vyperjson.py::test_pretty_json - json.decoder.J...
FAILED tests/cli/vyper_json/test_parse_args_vyperjson.py::test_to_stdout - json.decoder.JSO...
FAILED tests/parser/features/test_assert.py::test_assert_reason[False] - AssertionError: as...
FAILED tests/parser/features/test_assert.py::test_assest_reason_revert

misses the string "execution reverted"

