We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Remove shh from default list of modules
The whisper protocol is not standardized enough to be in the default list.

Also, note in the docs the current fractured nature of whisper.

See #384 

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `web3/main.py`
Content:
```
1 from __future__ import absolute_import
2 
3 from eth_utils import (
4     apply_to_return_value,
5     add_0x_prefix,
6     from_wei,
7     is_address,
8     is_checksum_address,
9     keccak,
10     remove_0x_prefix,
11     to_checksum_address,
12     to_wei,
13 )
14 
15 from web3.admin import Admin
16 from web3.eth import Eth
17 from web3.iban import Iban
18 from web3.miner import Miner
19 from web3.net import Net
20 from web3.personal import Personal
21 from web3.shh import Shh
22 from web3.testing import Testing
23 from web3.txpool import TxPool
24 from web3.version import Version
25 
26 from web3.providers.ipc import (
27     IPCProvider,
28 )
29 from web3.providers.rpc import (
30     HTTPProvider,
31 )
32 from web3.providers.tester import (
33     TestRPCProvider,
34     EthereumTesterProvider,
35 )
36 
37 from web3.manager import (
38     RequestManager,
39 )
40 
41 from web3.utils.datastructures import (
42     HexBytes,
43 )
44 from web3.utils.encoding import (
45     hex_encode_abi_type,
46     to_bytes,
47     to_int,
48     to_hex,
49     to_text,
50 )
51 
52 
53 def get_default_modules():
54     return {
55         "eth": Eth,
56         "shh": Shh,
57         "net": Net,
58         "personal": Personal,
59         "version": Version,
60         "txpool": TxPool,
61         "miner": Miner,
62         "admin": Admin,
63         "testing": Testing,
64     }
65 
66 
67 class Web3(object):
68     # Providers
69     HTTPProvider = HTTPProvider
70     IPCProvider = IPCProvider
71     TestRPCProvider = TestRPCProvider
72     EthereumTesterProvider = EthereumTesterProvider
73 
74     # Managers
75     RequestManager = RequestManager
76 
77     # Iban
78     Iban = Iban
79 
80     # Encoding and Decoding
81     toBytes = staticmethod(to_bytes)
82     toInt = staticmethod(to_int)
83     toHex = staticmethod(to_hex)
84     toText = staticmethod(to_text)
85 
86     # Currency Utility
87     toWei = staticmethod(to_wei)
88     fromWei = staticmethod(from_wei)
89 
90     # Address Utility
91     isAddress = staticmethod(is_address)
92     isChecksumAddress = staticmethod(is_checksum_address)
93     toChecksumAddress = staticmethod(to_checksum_address)
94 
95     def __init__(self, providers, middlewares=None, modules=None):
96         self.manager = RequestManager(self, providers, middlewares)
97 
98         if modules is None:
99             modules = get_default_modules()
100 
101         for module_name, module_class in modules.items():
102             module_class.attach(self, module_name)
103 
104     @property
105     def middleware_stack(self):
106         return self.manager.middleware_stack
107 
108     @property
109     def providers(self):
110         return self.manager.providers
111 
112     def setProviders(self, providers):
113         self.manager.setProvider(providers)
114 
115     @staticmethod
116     @apply_to_return_value(HexBytes)
117     def sha3(primitive=None, text=None, hexstr=None):
118         if isinstance(primitive, (bytes, int, type(None))):
119             input_bytes = to_bytes(primitive, hexstr=hexstr, text=text)
120             return keccak(input_bytes)
121 
122         raise TypeError(
123             "You called sha3 with first arg %r and keywords %r. You must call it with one of "
124             "these approaches: sha3(text='txt'), sha3(hexstr='0x747874'), "
125             "sha3(b'\\x74\\x78\\x74'), or sha3(0x747874)." % (
126                 primitive,
127                 {'text': text, 'hexstr': hexstr}
128             )
129         )
130 
131     @classmethod
132     def soliditySha3(cls, abi_types, values):
133         """
134         Executes sha3 (keccak256) exactly as Solidity does.
135         Takes list of abi_types as inputs -- `[uint24, int8[], bool]`
136         and list of corresponding values  -- `[20, [-1, 5, 0], True]`
137         """
138         if len(abi_types) != len(values):
139             raise ValueError(
140                 "Length mismatch between provided abi types and values.  Got "
141                 "{0} types and {1} values.".format(len(abi_types), len(values))
142             )
143 
144         hex_string = add_0x_prefix(''.join(
145             remove_0x_prefix(hex_encode_abi_type(abi_type, value))
146             for abi_type, value
147             in zip(abi_types, values)
148         ))
149         return cls.sha3(hexstr=hex_string)
150 
151     def isConnected(self):
152         for provider in self.providers:
153             if provider.isConnected():
154                 return True
155         else:
156             return False
157
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/web3/main.py b/web3/main.py
--- a/web3/main.py
+++ b/web3/main.py
@@ -18,7 +18,6 @@
 from web3.miner import Miner
 from web3.net import Net
 from web3.personal import Personal
-from web3.shh import Shh
 from web3.testing import Testing
 from web3.txpool import TxPool
 from web3.version import Version
@@ -53,7 +52,6 @@
 def get_default_modules():
     return {
         "eth": Eth,
-        "shh": Shh,
         "net": Net,
         "personal": Personal,
         "version": Version,

{"golden_diff": "diff --git a/web3/main.py b/web3/main.py\n--- a/web3/main.py\n+++ b/web3/main.py\n@@ -18,7 +18,6 @@\n from web3.miner import Miner\n from web3.net import Net\n from web3.personal import Personal\n-from web3.shh import Shh\n from web3.testing import Testing\n from web3.txpool import TxPool\n from web3.version import Version\n@@ -53,7 +52,6 @@\n def get_default_modules():\n     return {\n         \"eth\": Eth,\n-        \"shh\": Shh,\n         \"net\": Net,\n         \"personal\": Personal,\n         \"version\": Version,\n", "issue": "Remove shh from default list of modules\nThe whisper protocol is not standardized enough to be in the default list.\r\n\r\nAlso, note in the docs the current fractured nature of whisper.\r\n\r\nSee #384 \n", "before_files": [{"content": "from __future__ import absolute_import\n\nfrom eth_utils import (\n    apply_to_return_value,\n    add_0x_prefix,\n    from_wei,\n    is_address,\n    is_checksum_address,\n    keccak,\n    remove_0x_prefix,\n    to_checksum_address,\n    to_wei,\n)\n\nfrom web3.admin import Admin\nfrom web3.eth import Eth\nfrom web3.iban import Iban\nfrom web3.miner import Miner\nfrom web3.net import Net\nfrom web3.personal import Personal\nfrom web3.shh import Shh\nfrom web3.testing import Testing\nfrom web3.txpool import TxPool\nfrom web3.version import Version\n\nfrom web3.providers.ipc import (\n    IPCProvider,\n)\nfrom web3.providers.rpc import (\n    HTTPProvider,\n)\nfrom web3.providers.tester import (\n    TestRPCProvider,\n    EthereumTesterProvider,\n)\n\nfrom web3.manager import (\n    RequestManager,\n)\n\nfrom web3.utils.datastructures import (\n    HexBytes,\n)\nfrom web3.utils.encoding import (\n    hex_encode_abi_type,\n    to_bytes,\n    to_int,\n    to_hex,\n    to_text,\n)\n\n\ndef get_default_modules():\n    return {\n        \"eth\": Eth,\n        \"shh\": Shh,\n        \"net\": Net,\n        \"personal\": Personal,\n        \"version\": Version,\n        \"txpool\": TxPool,\n        \"miner\": Miner,\n        \"admin\": Admin,\n        \"testing\": Testing,\n    }\n\n\nclass Web3(object):\n    # Providers\n    HTTPProvider = HTTPProvider\n    IPCProvider = IPCProvider\n    TestRPCProvider = TestRPCProvider\n    EthereumTesterProvider = EthereumTesterProvider\n\n    # Managers\n    RequestManager = RequestManager\n\n    # Iban\n    Iban = Iban\n\n    # Encoding and Decoding\n    toBytes = staticmethod(to_bytes)\n    toInt = staticmethod(to_int)\n    toHex = staticmethod(to_hex)\n    toText = staticmethod(to_text)\n\n    # Currency Utility\n    toWei = staticmethod(to_wei)\n    fromWei = staticmethod(from_wei)\n\n    # Address Utility\n    isAddress = staticmethod(is_address)\n    isChecksumAddress = staticmethod(is_checksum_address)\n    toChecksumAddress = staticmethod(to_checksum_address)\n\n    def __init__(self, providers, middlewares=None, modules=None):\n        self.manager = RequestManager(self, providers, middlewares)\n\n        if modules is None:\n            modules = get_default_modules()\n\n        for module_name, module_class in modules.items():\n            module_class.attach(self, module_name)\n\n    @property\n    def middleware_stack(self):\n        return self.manager.middleware_stack\n\n    @property\n    def providers(self):\n        return self.manager.providers\n\n    def setProviders(self, providers):\n        self.manager.setProvider(providers)\n\n    @staticmethod\n    @apply_to_return_value(HexBytes)\n    def sha3(primitive=None, text=None, hexstr=None):\n        if isinstance(primitive, (bytes, int, type(None))):\n            input_bytes = to_bytes(primitive, hexstr=hexstr, text=text)\n            return keccak(input_bytes)\n\n        raise TypeError(\n            \"You called sha3 with first arg %r and keywords %r. You must call it with one of \"\n            \"these approaches: sha3(text='txt'), sha3(hexstr='0x747874'), \"\n            \"sha3(b'\\\\x74\\\\x78\\\\x74'), or sha3(0x747874).\" % (\n                primitive,\n                {'text': text, 'hexstr': hexstr}\n            )\n        )\n\n    @classmethod\n    def soliditySha3(cls, abi_types, values):\n        \"\"\"\n        Executes sha3 (keccak256) exactly as Solidity does.\n        Takes list of abi_types as inputs -- `[uint24, int8[], bool]`\n        and list of corresponding values  -- `[20, [-1, 5, 0], True]`\n        \"\"\"\n        if len(abi_types) != len(values):\n            raise ValueError(\n                \"Length mismatch between provided abi types and values.  Got \"\n                \"{0} types and {1} values.\".format(len(abi_types), len(values))\n            )\n\n        hex_string = add_0x_prefix(''.join(\n            remove_0x_prefix(hex_encode_abi_type(abi_type, value))\n            for abi_type, value\n            in zip(abi_types, values)\n        ))\n        return cls.sha3(hexstr=hex_string)\n\n    def isConnected(self):\n        for provider in self.providers:\n            if provider.isConnected():\n                return True\n        else:\n            return False\n", "path": "web3/main.py"}], "after_files": [{"content": "from __future__ import absolute_import\n\nfrom eth_utils import (\n    apply_to_return_value,\n    add_0x_prefix,\n    from_wei,\n    is_address,\n    is_checksum_address,\n    keccak,\n    remove_0x_prefix,\n    to_checksum_address,\n    to_wei,\n)\n\nfrom web3.admin import Admin\nfrom web3.eth import Eth\nfrom web3.iban import Iban\nfrom web3.miner import Miner\nfrom web3.net import Net\nfrom web3.personal import Personal\nfrom web3.testing import Testing\nfrom web3.txpool import TxPool\nfrom web3.version import Version\n\nfrom web3.providers.ipc import (\n    IPCProvider,\n)\nfrom web3.providers.rpc import (\n    HTTPProvider,\n)\nfrom web3.providers.tester import (\n    TestRPCProvider,\n    EthereumTesterProvider,\n)\n\nfrom web3.manager import (\n    RequestManager,\n)\n\nfrom web3.utils.datastructures import (\n    HexBytes,\n)\nfrom web3.utils.encoding import (\n    hex_encode_abi_type,\n    to_bytes,\n    to_int,\n    to_hex,\n    to_text,\n)\n\n\ndef get_default_modules():\n    return {\n        \"eth\": Eth,\n        \"net\": Net,\n        \"personal\": Personal,\n        \"version\": Version,\n        \"txpool\": TxPool,\n        \"miner\": Miner,\n        \"admin\": Admin,\n        \"testing\": Testing,\n    }\n\n\nclass Web3(object):\n    # Providers\n    HTTPProvider = HTTPProvider\n    IPCProvider = IPCProvider\n    TestRPCProvider = TestRPCProvider\n    EthereumTesterProvider = EthereumTesterProvider\n\n    # Managers\n    RequestManager = RequestManager\n\n    # Iban\n    Iban = Iban\n\n    # Encoding and Decoding\n    toBytes = staticmethod(to_bytes)\n    toInt = staticmethod(to_int)\n    toHex = staticmethod(to_hex)\n    toText = staticmethod(to_text)\n\n    # Currency Utility\n    toWei = staticmethod(to_wei)\n    fromWei = staticmethod(from_wei)\n\n    # Address Utility\n    isAddress = staticmethod(is_address)\n    isChecksumAddress = staticmethod(is_checksum_address)\n    toChecksumAddress = staticmethod(to_checksum_address)\n\n    def __init__(self, providers, middlewares=None, modules=None):\n        self.manager = RequestManager(self, providers, middlewares)\n\n        if modules is None:\n            modules = get_default_modules()\n\n        for module_name, module_class in modules.items():\n            module_class.attach(self, module_name)\n\n    @property\n    def middleware_stack(self):\n        return self.manager.middleware_stack\n\n    @property\n    def providers(self):\n        return self.manager.providers\n\n    def setProviders(self, providers):\n        self.manager.setProvider(providers)\n\n    @staticmethod\n    @apply_to_return_value(HexBytes)\n    def sha3(primitive=None, text=None, hexstr=None):\n        if isinstance(primitive, (bytes, int, type(None))):\n            input_bytes = to_bytes(primitive, hexstr=hexstr, text=text)\n            return keccak(input_bytes)\n\n        raise TypeError(\n            \"You called sha3 with first arg %r and keywords %r. You must call it with one of \"\n            \"these approaches: sha3(text='txt'), sha3(hexstr='0x747874'), \"\n            \"sha3(b'\\\\x74\\\\x78\\\\x74'), or sha3(0x747874).\" % (\n                primitive,\n                {'text': text, 'hexstr': hexstr}\n            )\n        )\n\n    @classmethod\n    def soliditySha3(cls, abi_types, values):\n        \"\"\"\n        Executes sha3 (keccak256) exactly as Solidity does.\n        Takes list of abi_types as inputs -- `[uint24, int8[], bool]`\n        and list of corresponding values  -- `[20, [-1, 5, 0], True]`\n        \"\"\"\n        if len(abi_types) != len(values):\n            raise ValueError(\n                \"Length mismatch between provided abi types and values.  Got \"\n                \"{0} types and {1} values.\".format(len(abi_types), len(values))\n            )\n\n        hex_string = add_0x_prefix(''.join(\n            remove_0x_prefix(hex_encode_abi_type(abi_type, value))\n            for abi_type, value\n            in zip(abi_types, values)\n        ))\n        return cls.sha3(hexstr=hex_string)\n\n    def isConnected(self):\n        for provider in self.providers:\n            if provider.isConnected():\n                return True\n        else:\n            return False\n", "path": "web3/main.py"}]}