prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <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 
  
  </issue>
  <code>
  [start of web3/main.py]
  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 of web3/main.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: 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,
  
verification_info: {"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"}]}