prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  pipenv starts slow when IPython is installed.
  IPython is imported when importing dotenv. 
  (ref: theskumar/python-dotenv#84 and [import profile](https://paste.ubuntu.com/26409167/))
  
  Since pipenv uses patched version of dotenv, pipenv should port upstream fix
  or patch `dotenv/__init__.py` to stop importing dotenv.ipython.
  
  ##### Describe your environment
  
  1. Ubuntu 17.10
  1. Python version: 3.7.0a4
  1. Pipenv version: 9.0.3
  
  ##### Steps to replicate
  
  * Install Python 3.7.0a4 or newer
  * ` PYTHONPROFILEIMPORTTIME=1 path/to/pipenv --version 2>pipenv-version`
  
  </issue>
  <code>
  [start of pipenv/patched/dotenv/__init__.py]
  1 from .cli import get_cli_string
  2 from .main import load_dotenv, get_key, set_key, unset_key, find_dotenv
  3 try:
  4     from .ipython import load_ipython_extension
  5 except ImportError:
  6     pass
  7 
  8 __all__ = ['get_cli_string', 'load_dotenv', 'get_key', 'set_key', 'unset_key', 'find_dotenv', 'load_ipython_extension']
  9
  [end of pipenv/patched/dotenv/__init__.py]
  [start of pipenv/patched/dotenv/ipython.py]
  1 from __future__ import print_function
  2 from .main import load_dotenv, find_dotenv
  3 
  4 from IPython.core.magic import Magics, magics_class, line_magic
  5 from IPython.core.magic_arguments import (argument, magic_arguments,
  6                                           parse_argstring)
  7 
  8 
  9 @magics_class
  10 class IPythonDotEnv(Magics):
  11 
  12     @magic_arguments()
  13     @argument(
  14         '-o', '--override', action='store_true',
  15         help="Indicate to override existing variables"
  16     )
  17     @argument(
  18         '-v', '--verbose', action='store_true',
  19         help="Indicate function calls to be verbose"
  20     )
  21     @argument('dotenv_path', nargs='?', type=str, default='.env',
  22               help='Search in increasingly higher folders for the `dotenv_path`')
  23     @line_magic
  24     def dotenv(self, line):
  25         args = parse_argstring(self.dotenv, line)
  26         # Locate the .env file
  27         dotenv_path = args.dotenv_path
  28         try:
  29             dotenv_path = find_dotenv(dotenv_path, True, True)
  30         except IOError:
  31             print("cannot find .env file")
  32             return
  33 
  34         # Load the .env file
  35         load_dotenv(dotenv_path, verbose=args.verbose, override=args.override)
  36 
  37 
  38 def load_ipython_extension(ipython):
  39     """Register the %dotenv magic."""
  40     ipython.register_magics(IPythonDotEnv)
  41
  [end of pipenv/patched/dotenv/ipython.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/pipenv/patched/dotenv/__init__.py b/pipenv/patched/dotenv/__init__.py
  --- a/pipenv/patched/dotenv/__init__.py
  +++ b/pipenv/patched/dotenv/__init__.py
  @@ -1,8 +1,4 @@
   from .cli import get_cli_string
   from .main import load_dotenv, get_key, set_key, unset_key, find_dotenv
  -try:
  -    from .ipython import load_ipython_extension
  -except ImportError:
  -    pass
   
  -__all__ = ['get_cli_string', 'load_dotenv', 'get_key', 'set_key', 'unset_key', 'find_dotenv', 'load_ipython_extension']
  +__all__ = ['get_cli_string', 'load_dotenv', 'get_key', 'set_key', 'unset_key', 'find_dotenv']
  diff --git a/pipenv/patched/dotenv/ipython.py b/pipenv/patched/dotenv/ipython.py
  deleted file mode 100644
  --- a/pipenv/patched/dotenv/ipython.py
  +++ /dev/null
  @@ -1,40 +0,0 @@
  -from __future__ import print_function
  -from .main import load_dotenv, find_dotenv
  -
  -from IPython.core.magic import Magics, magics_class, line_magic
  -from IPython.core.magic_arguments import (argument, magic_arguments,
  -                                          parse_argstring)
  -
  -
  -@magics_class
  -class IPythonDotEnv(Magics):
  -
  -    @magic_arguments()
  -    @argument(
  -        '-o', '--override', action='store_true',
  -        help="Indicate to override existing variables"
  -    )
  -    @argument(
  -        '-v', '--verbose', action='store_true',
  -        help="Indicate function calls to be verbose"
  -    )
  -    @argument('dotenv_path', nargs='?', type=str, default='.env',
  -              help='Search in increasingly higher folders for the `dotenv_path`')
  -    @line_magic
  -    def dotenv(self, line):
  -        args = parse_argstring(self.dotenv, line)
  -        # Locate the .env file
  -        dotenv_path = args.dotenv_path
  -        try:
  -            dotenv_path = find_dotenv(dotenv_path, True, True)
  -        except IOError:
  -            print("cannot find .env file")
  -            return
  -
  -        # Load the .env file
  -        load_dotenv(dotenv_path, verbose=args.verbose, override=args.override)
  -
  -
  -def load_ipython_extension(ipython):
  -    """Register the %dotenv magic."""
  -    ipython.register_magics(IPythonDotEnv)
  
verification_info: {"golden_diff": "diff --git a/pipenv/patched/dotenv/__init__.py b/pipenv/patched/dotenv/__init__.py\n--- a/pipenv/patched/dotenv/__init__.py\n+++ b/pipenv/patched/dotenv/__init__.py\n@@ -1,8 +1,4 @@\n from .cli import get_cli_string\n from .main import load_dotenv, get_key, set_key, unset_key, find_dotenv\n-try:\n-    from .ipython import load_ipython_extension\n-except ImportError:\n-    pass\n \n-__all__ = ['get_cli_string', 'load_dotenv', 'get_key', 'set_key', 'unset_key', 'find_dotenv', 'load_ipython_extension']\n+__all__ = ['get_cli_string', 'load_dotenv', 'get_key', 'set_key', 'unset_key', 'find_dotenv']\ndiff --git a/pipenv/patched/dotenv/ipython.py b/pipenv/patched/dotenv/ipython.py\ndeleted file mode 100644\n--- a/pipenv/patched/dotenv/ipython.py\n+++ /dev/null\n@@ -1,40 +0,0 @@\n-from __future__ import print_function\n-from .main import load_dotenv, find_dotenv\n-\n-from IPython.core.magic import Magics, magics_class, line_magic\n-from IPython.core.magic_arguments import (argument, magic_arguments,\n-                                          parse_argstring)\n-\n-\n-@magics_class\n-class IPythonDotEnv(Magics):\n-\n-    @magic_arguments()\n-    @argument(\n-        '-o', '--override', action='store_true',\n-        help=\"Indicate to override existing variables\"\n-    )\n-    @argument(\n-        '-v', '--verbose', action='store_true',\n-        help=\"Indicate function calls to be verbose\"\n-    )\n-    @argument('dotenv_path', nargs='?', type=str, default='.env',\n-              help='Search in increasingly higher folders for the `dotenv_path`')\n-    @line_magic\n-    def dotenv(self, line):\n-        args = parse_argstring(self.dotenv, line)\n-        # Locate the .env file\n-        dotenv_path = args.dotenv_path\n-        try:\n-            dotenv_path = find_dotenv(dotenv_path, True, True)\n-        except IOError:\n-            print(\"cannot find .env file\")\n-            return\n-\n-        # Load the .env file\n-        load_dotenv(dotenv_path, verbose=args.verbose, override=args.override)\n-\n-\n-def load_ipython_extension(ipython):\n-    \"\"\"Register the %dotenv magic.\"\"\"\n-    ipython.register_magics(IPythonDotEnv)\n", "issue": "pipenv starts slow when IPython is installed.\nIPython is imported when importing dotenv. \r\n(ref: theskumar/python-dotenv#84 and [import profile](https://paste.ubuntu.com/26409167/))\r\n\r\nSince pipenv uses patched version of dotenv, pipenv should port upstream fix\r\nor patch `dotenv/__init__.py` to stop importing dotenv.ipython.\r\n\r\n##### Describe your environment\r\n\r\n1. Ubuntu 17.10\r\n1. Python version: 3.7.0a4\r\n1. Pipenv version: 9.0.3\r\n\r\n##### Steps to replicate\r\n\r\n* Install Python 3.7.0a4 or newer\r\n* ` PYTHONPROFILEIMPORTTIME=1 path/to/pipenv --version 2>pipenv-version`\n", "before_files": [{"content": "from .cli import get_cli_string\nfrom .main import load_dotenv, get_key, set_key, unset_key, find_dotenv\ntry:\n    from .ipython import load_ipython_extension\nexcept ImportError:\n    pass\n\n__all__ = ['get_cli_string', 'load_dotenv', 'get_key', 'set_key', 'unset_key', 'find_dotenv', 'load_ipython_extension']\n", "path": "pipenv/patched/dotenv/__init__.py"}, {"content": "from __future__ import print_function\nfrom .main import load_dotenv, find_dotenv\n\nfrom IPython.core.magic import Magics, magics_class, line_magic\nfrom IPython.core.magic_arguments import (argument, magic_arguments,\n                                          parse_argstring)\n\n\n@magics_class\nclass IPythonDotEnv(Magics):\n\n    @magic_arguments()\n    @argument(\n        '-o', '--override', action='store_true',\n        help=\"Indicate to override existing variables\"\n    )\n    @argument(\n        '-v', '--verbose', action='store_true',\n        help=\"Indicate function calls to be verbose\"\n    )\n    @argument('dotenv_path', nargs='?', type=str, default='.env',\n              help='Search in increasingly higher folders for the `dotenv_path`')\n    @line_magic\n    def dotenv(self, line):\n        args = parse_argstring(self.dotenv, line)\n        # Locate the .env file\n        dotenv_path = args.dotenv_path\n        try:\n            dotenv_path = find_dotenv(dotenv_path, True, True)\n        except IOError:\n            print(\"cannot find .env file\")\n            return\n\n        # Load the .env file\n        load_dotenv(dotenv_path, verbose=args.verbose, override=args.override)\n\n\ndef load_ipython_extension(ipython):\n    \"\"\"Register the %dotenv magic.\"\"\"\n    ipython.register_magics(IPythonDotEnv)\n", "path": "pipenv/patched/dotenv/ipython.py"}]}