We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN 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`

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `pipenv/patched/dotenv/__init__.py`
Content:
```
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
```

Path: `pipenv/patched/dotenv/ipython.py`
Content:
```
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 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/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)

{"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"}], "after_files": [{"content": "from .cli import get_cli_string\nfrom .main import load_dotenv, get_key, set_key, unset_key, find_dotenv\n\n__all__ = ['get_cli_string', 'load_dotenv', 'get_key', 'set_key', 'unset_key', 'find_dotenv']\n", "path": "pipenv/patched/dotenv/__init__.py"}, {"content": null, "path": "pipenv/patched/dotenv/ipython.py"}]}