We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
conda's configuration context is not initialized in conda.exports
root cause of https://github.com/conda-forge/conda-smithy/issues/762

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `conda/exports.py`
Content:
```
1 # -*- coding: utf-8 -*-
2 from __future__ import absolute_import, division, print_function, unicode_literals
3 
4 from collections import Hashable
5 from logging import getLogger
6 import threading
7 from warnings import warn
8 
9 log = getLogger(__name__)
10 
11 from . import CondaError  # NOQA
12 CondaError = CondaError
13 
14 from . import compat, plan  # NOQA
15 compat, plan = compat, plan
16 
17 from .core.solve import Solver  # NOQA
18 Solver = Solver
19 
20 from .plan import display_actions  # NOQA
21 display_actions = display_actions
22 
23 from .cli.common import specs_from_args, spec_from_line, specs_from_url  # NOQA
24 from .cli.conda_argparse import add_parser_prefix, add_parser_channels  # NOQA
25 add_parser_channels, add_parser_prefix = add_parser_channels, add_parser_prefix
26 specs_from_args, spec_from_line = specs_from_args, spec_from_line
27 specs_from_url = specs_from_url
28 
29 from .cli.conda_argparse import ArgumentParser  # NOQA
30 ArgumentParser = ArgumentParser
31 
32 from .common.compat import PY3, StringIO,  input, iteritems, string_types, text_type  # NOQA
33 PY3, StringIO,  input, iteritems, string_types, text_type = PY3, StringIO,  input, iteritems, string_types, text_type  # NOQA
34 from .gateways.connection.session import CondaSession  # NOQA
35 CondaSession = CondaSession
36 
37 from .common.toposort import _toposort  # NOQA
38 _toposort = _toposort
39 
40 from .gateways.disk.link import lchmod  # NOQA
41 lchmod = lchmod
42 
43 from .gateways.connection.download import TmpDownload  # NOQA
44 
45 TmpDownload = TmpDownload
46 handle_proxy_407 = lambda x, y: warn("handle_proxy_407 is deprecated. "
47                                      "Now handled by CondaSession.")
48 from .core.index import dist_str_in_index, fetch_index, get_index  # NOQA
49 dist_str_in_index, fetch_index, get_index = dist_str_in_index, fetch_index, get_index  # NOQA
50 from .core.package_cache_data import download, rm_fetched  # NOQA
51 download, rm_fetched = download, rm_fetched
52 
53 from .install import package_cache, prefix_placeholder, symlink_conda  # NOQA
54 package_cache, prefix_placeholder, symlink_conda = package_cache, prefix_placeholder, symlink_conda
55 
56 from .gateways.disk.delete import delete_trash, move_to_trash  # NOQA
57 delete_trash, move_to_trash = delete_trash, move_to_trash
58 
59 from .core.prefix_data import is_linked, linked, linked_data  # NOQA
60 is_linked, linked, linked_data = is_linked, linked, linked_data
61 
62 from .misc import untracked, walk_prefix  # NOQA
63 untracked, walk_prefix = untracked, walk_prefix
64 
65 from .resolve import MatchSpec, ResolvePackageNotFound, Resolve, Unsatisfiable  # NOQA
66 MatchSpec, Resolve = MatchSpec, Resolve
67 Unsatisfiable = Unsatisfiable
68 NoPackagesFound = NoPackagesFoundError = ResolvePackageNotFound
69 
70 from .utils import hashsum_file, human_bytes, unix_path_to_win, url_path  # NOQA
71 from .common.path import win_path_to_unix  # NOQA
72 hashsum_file, human_bytes = hashsum_file, human_bytes
73 unix_path_to_win = unix_path_to_win
74 win_path_to_unix, url_path = win_path_to_unix, url_path
75 
76 from .gateways.disk.read import compute_md5sum  # NOQA
77 md5_file = compute_md5sum
78 
79 from .models.version import VersionOrder, normalized_version  # NOQA
80 VersionOrder, normalized_version = VersionOrder, normalized_version  # NOQA
81 
82 import conda.base.context  # NOQA
83 from .base.context import get_prefix, non_x86_linux_machines, sys_rc_path  # NOQA
84 non_x86_linux_machines, sys_rc_path = non_x86_linux_machines, sys_rc_path
85 get_prefix = get_prefix
86 
87 from ._vendor.auxlib.entity import EntityEncoder # NOQA
88 EntityEncoder = EntityEncoder
89 from .base.constants import DEFAULT_CHANNELS, DEFAULT_CHANNELS_WIN, DEFAULT_CHANNELS_UNIX  # NOQA
90 DEFAULT_CHANNELS, DEFAULT_CHANNELS_WIN, DEFAULT_CHANNELS_UNIX = DEFAULT_CHANNELS, DEFAULT_CHANNELS_WIN, DEFAULT_CHANNELS_UNIX  # NOQA
91 get_default_urls = lambda: DEFAULT_CHANNELS
92 
93 arch_name = conda.base.context.context.arch_name
94 binstar_upload = conda.base.context.context.anaconda_upload
95 bits = conda.base.context.context.bits
96 default_prefix = conda.base.context.context.default_prefix
97 default_python = conda.base.context.context.default_python
98 envs_dirs = conda.base.context.context.envs_dirs
99 pkgs_dirs = conda.base.context.context.pkgs_dirs
100 platform = conda.base.context.context.platform
101 root_dir = conda.base.context.context.root_prefix
102 root_writable = conda.base.context.context.root_writable
103 subdir = conda.base.context.context.subdir
104 conda_private = conda.base.context.context.conda_private
105 from .models.channel import get_conda_build_local_url  # NOQA
106 get_rc_urls = lambda: list(conda.base.context.context.channels)
107 get_local_urls = lambda: list(get_conda_build_local_url()) or []
108 load_condarc = lambda fn: conda.base.context.reset_context([fn])
109 from .exceptions import PaddingError, LinkError, CondaOSError, PathNotFoundError  # NOQA
110 PaddingError = PaddingError
111 LinkError = LinkError
112 CondaOSError = CondaOSError
113 # PathNotFoundError is the conda 4.4.x name for it - let's plan ahead.
114 PathNotFoundError = CondaFileNotFoundError = PathNotFoundError
115 from .gateways.disk.link import CrossPlatformStLink  # NOQA
116 CrossPlatformStLink = CrossPlatformStLink
117 
118 from .models.enums import FileMode  # NOQA
119 FileMode = FileMode
120 from .models.enums import PathType  # NOQA
121 PathType = PathType
122 
123 from .models.records import PackageRecord  # NOQA
124 PackageRecord = IndexRecord = PackageRecord
125 
126 from .compat import TemporaryDirectory  # NOQA
127 TemporaryDirectory = TemporaryDirectory
128 
129 from .gateways.subprocess import ACTIVE_SUBPROCESSES, subprocess_call  # NOQA
130 ACTIVE_SUBPROCESSES, subprocess_call = ACTIVE_SUBPROCESSES, subprocess_call
131 
132 from .core.subdir_data import cache_fn_url  # NOQA
133 cache_fn_url = cache_fn_url
134 
135 
136 class Completer(object):  # pragma: no cover
137     def get_items(self):
138         return self._get_items()
139 
140     def __contains__(self, item):
141         return True
142 
143     def __iter__(self):
144         return iter(self.get_items())
145 
146 
147 class InstalledPackages(object):
148     pass
149 
150 
151 class memoized(object):  # pragma: no cover
152     """Decorator. Caches a function's return value each time it is called.
153     If called later with the same arguments, the cached value is returned
154     (not reevaluated).
155     """
156     def __init__(self, func):
157         self.func = func
158         self.cache = {}
159         self.lock = threading.Lock()
160 
161     def __call__(self, *args, **kw):
162         newargs = []
163         for arg in args:
164             if isinstance(arg, list):
165                 newargs.append(tuple(arg))
166             elif not isinstance(arg, Hashable):
167                 # uncacheable. a list, for instance.
168                 # better to not cache than blow up.
169                 return self.func(*args, **kw)
170             else:
171                 newargs.append(arg)
172         newargs = tuple(newargs)
173         key = (newargs, frozenset(sorted(kw.items())))
174         with self.lock:
175             if key in self.cache:
176                 return self.cache[key]
177             else:
178                 value = self.func(*args, **kw)
179                 self.cache[key] = value
180                 return value
181 
182 
183 from .gateways.disk.delete import rm_rf as _rm_rf  # NOQA
184 from .core.prefix_data import delete_prefix_from_linked_data  # NOQA
185 
186 
187 def rm_rf(path, max_retries=5, trash=True):
188     _rm_rf(path, max_retries, trash)
189     delete_prefix_from_linked_data(path)
190 
191 
192 # ######################
193 # signature.py
194 # ######################
195 KEYS = None
196 KEYS_DIR = None
197 
198 
199 def hash_file(_):
200     return None  # pragma: no cover
201 
202 
203 def verify(_):
204     return False  # pragma: no cover
205 
206 
207 from .plan import execute_actions, execute_instructions, execute_plan, install_actions  # NOQA
208 execute_actions, execute_instructions = execute_actions, execute_instructions
209 execute_plan, install_actions = execute_plan, install_actions
210
```
--- 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/conda/exports.py b/conda/exports.py
--- a/conda/exports.py
+++ b/conda/exports.py
@@ -11,6 +11,9 @@
 from . import CondaError  # NOQA
 CondaError = CondaError
 
+from .base.context import reset_context  # NOQA
+reset_context()  # initialize context when conda.exports is imported
+
 from . import compat, plan  # NOQA
 compat, plan = compat, plan

{"golden_diff": "diff --git a/conda/exports.py b/conda/exports.py\n--- a/conda/exports.py\n+++ b/conda/exports.py\n@@ -11,6 +11,9 @@\n from . import CondaError  # NOQA\n CondaError = CondaError\n \n+from .base.context import reset_context  # NOQA\n+reset_context()  # initialize context when conda.exports is imported\n+\n from . import compat, plan  # NOQA\n compat, plan = compat, plan\n", "issue": "conda's configuration context is not initialized in conda.exports\nroot cause of https://github.com/conda-forge/conda-smithy/issues/762\n", "before_files": [{"content": "# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nfrom collections import Hashable\nfrom logging import getLogger\nimport threading\nfrom warnings import warn\n\nlog = getLogger(__name__)\n\nfrom . import CondaError  # NOQA\nCondaError = CondaError\n\nfrom . import compat, plan  # NOQA\ncompat, plan = compat, plan\n\nfrom .core.solve import Solver  # NOQA\nSolver = Solver\n\nfrom .plan import display_actions  # NOQA\ndisplay_actions = display_actions\n\nfrom .cli.common import specs_from_args, spec_from_line, specs_from_url  # NOQA\nfrom .cli.conda_argparse import add_parser_prefix, add_parser_channels  # NOQA\nadd_parser_channels, add_parser_prefix = add_parser_channels, add_parser_prefix\nspecs_from_args, spec_from_line = specs_from_args, spec_from_line\nspecs_from_url = specs_from_url\n\nfrom .cli.conda_argparse import ArgumentParser  # NOQA\nArgumentParser = ArgumentParser\n\nfrom .common.compat import PY3, StringIO,  input, iteritems, string_types, text_type  # NOQA\nPY3, StringIO,  input, iteritems, string_types, text_type = PY3, StringIO,  input, iteritems, string_types, text_type  # NOQA\nfrom .gateways.connection.session import CondaSession  # NOQA\nCondaSession = CondaSession\n\nfrom .common.toposort import _toposort  # NOQA\n_toposort = _toposort\n\nfrom .gateways.disk.link import lchmod  # NOQA\nlchmod = lchmod\n\nfrom .gateways.connection.download import TmpDownload  # NOQA\n\nTmpDownload = TmpDownload\nhandle_proxy_407 = lambda x, y: warn(\"handle_proxy_407 is deprecated. \"\n                                     \"Now handled by CondaSession.\")\nfrom .core.index import dist_str_in_index, fetch_index, get_index  # NOQA\ndist_str_in_index, fetch_index, get_index = dist_str_in_index, fetch_index, get_index  # NOQA\nfrom .core.package_cache_data import download, rm_fetched  # NOQA\ndownload, rm_fetched = download, rm_fetched\n\nfrom .install import package_cache, prefix_placeholder, symlink_conda  # NOQA\npackage_cache, prefix_placeholder, symlink_conda = package_cache, prefix_placeholder, symlink_conda\n\nfrom .gateways.disk.delete import delete_trash, move_to_trash  # NOQA\ndelete_trash, move_to_trash = delete_trash, move_to_trash\n\nfrom .core.prefix_data import is_linked, linked, linked_data  # NOQA\nis_linked, linked, linked_data = is_linked, linked, linked_data\n\nfrom .misc import untracked, walk_prefix  # NOQA\nuntracked, walk_prefix = untracked, walk_prefix\n\nfrom .resolve import MatchSpec, ResolvePackageNotFound, Resolve, Unsatisfiable  # NOQA\nMatchSpec, Resolve = MatchSpec, Resolve\nUnsatisfiable = Unsatisfiable\nNoPackagesFound = NoPackagesFoundError = ResolvePackageNotFound\n\nfrom .utils import hashsum_file, human_bytes, unix_path_to_win, url_path  # NOQA\nfrom .common.path import win_path_to_unix  # NOQA\nhashsum_file, human_bytes = hashsum_file, human_bytes\nunix_path_to_win = unix_path_to_win\nwin_path_to_unix, url_path = win_path_to_unix, url_path\n\nfrom .gateways.disk.read import compute_md5sum  # NOQA\nmd5_file = compute_md5sum\n\nfrom .models.version import VersionOrder, normalized_version  # NOQA\nVersionOrder, normalized_version = VersionOrder, normalized_version  # NOQA\n\nimport conda.base.context  # NOQA\nfrom .base.context import get_prefix, non_x86_linux_machines, sys_rc_path  # NOQA\nnon_x86_linux_machines, sys_rc_path = non_x86_linux_machines, sys_rc_path\nget_prefix = get_prefix\n\nfrom ._vendor.auxlib.entity import EntityEncoder # NOQA\nEntityEncoder = EntityEncoder\nfrom .base.constants import DEFAULT_CHANNELS, DEFAULT_CHANNELS_WIN, DEFAULT_CHANNELS_UNIX  # NOQA\nDEFAULT_CHANNELS, DEFAULT_CHANNELS_WIN, DEFAULT_CHANNELS_UNIX = DEFAULT_CHANNELS, DEFAULT_CHANNELS_WIN, DEFAULT_CHANNELS_UNIX  # NOQA\nget_default_urls = lambda: DEFAULT_CHANNELS\n\narch_name = conda.base.context.context.arch_name\nbinstar_upload = conda.base.context.context.anaconda_upload\nbits = conda.base.context.context.bits\ndefault_prefix = conda.base.context.context.default_prefix\ndefault_python = conda.base.context.context.default_python\nenvs_dirs = conda.base.context.context.envs_dirs\npkgs_dirs = conda.base.context.context.pkgs_dirs\nplatform = conda.base.context.context.platform\nroot_dir = conda.base.context.context.root_prefix\nroot_writable = conda.base.context.context.root_writable\nsubdir = conda.base.context.context.subdir\nconda_private = conda.base.context.context.conda_private\nfrom .models.channel import get_conda_build_local_url  # NOQA\nget_rc_urls = lambda: list(conda.base.context.context.channels)\nget_local_urls = lambda: list(get_conda_build_local_url()) or []\nload_condarc = lambda fn: conda.base.context.reset_context([fn])\nfrom .exceptions import PaddingError, LinkError, CondaOSError, PathNotFoundError  # NOQA\nPaddingError = PaddingError\nLinkError = LinkError\nCondaOSError = CondaOSError\n# PathNotFoundError is the conda 4.4.x name for it - let's plan ahead.\nPathNotFoundError = CondaFileNotFoundError = PathNotFoundError\nfrom .gateways.disk.link import CrossPlatformStLink  # NOQA\nCrossPlatformStLink = CrossPlatformStLink\n\nfrom .models.enums import FileMode  # NOQA\nFileMode = FileMode\nfrom .models.enums import PathType  # NOQA\nPathType = PathType\n\nfrom .models.records import PackageRecord  # NOQA\nPackageRecord = IndexRecord = PackageRecord\n\nfrom .compat import TemporaryDirectory  # NOQA\nTemporaryDirectory = TemporaryDirectory\n\nfrom .gateways.subprocess import ACTIVE_SUBPROCESSES, subprocess_call  # NOQA\nACTIVE_SUBPROCESSES, subprocess_call = ACTIVE_SUBPROCESSES, subprocess_call\n\nfrom .core.subdir_data import cache_fn_url  # NOQA\ncache_fn_url = cache_fn_url\n\n\nclass Completer(object):  # pragma: no cover\n    def get_items(self):\n        return self._get_items()\n\n    def __contains__(self, item):\n        return True\n\n    def __iter__(self):\n        return iter(self.get_items())\n\n\nclass InstalledPackages(object):\n    pass\n\n\nclass memoized(object):  # pragma: no cover\n    \"\"\"Decorator. Caches a function's return value each time it is called.\n    If called later with the same arguments, the cached value is returned\n    (not reevaluated).\n    \"\"\"\n    def __init__(self, func):\n        self.func = func\n        self.cache = {}\n        self.lock = threading.Lock()\n\n    def __call__(self, *args, **kw):\n        newargs = []\n        for arg in args:\n            if isinstance(arg, list):\n                newargs.append(tuple(arg))\n            elif not isinstance(arg, Hashable):\n                # uncacheable. a list, for instance.\n                # better to not cache than blow up.\n                return self.func(*args, **kw)\n            else:\n                newargs.append(arg)\n        newargs = tuple(newargs)\n        key = (newargs, frozenset(sorted(kw.items())))\n        with self.lock:\n            if key in self.cache:\n                return self.cache[key]\n            else:\n                value = self.func(*args, **kw)\n                self.cache[key] = value\n                return value\n\n\nfrom .gateways.disk.delete import rm_rf as _rm_rf  # NOQA\nfrom .core.prefix_data import delete_prefix_from_linked_data  # NOQA\n\n\ndef rm_rf(path, max_retries=5, trash=True):\n    _rm_rf(path, max_retries, trash)\n    delete_prefix_from_linked_data(path)\n\n\n# ######################\n# signature.py\n# ######################\nKEYS = None\nKEYS_DIR = None\n\n\ndef hash_file(_):\n    return None  # pragma: no cover\n\n\ndef verify(_):\n    return False  # pragma: no cover\n\n\nfrom .plan import execute_actions, execute_instructions, execute_plan, install_actions  # NOQA\nexecute_actions, execute_instructions = execute_actions, execute_instructions\nexecute_plan, install_actions = execute_plan, install_actions\n", "path": "conda/exports.py"}], "after_files": [{"content": "# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nfrom collections import Hashable\nfrom logging import getLogger\nimport threading\nfrom warnings import warn\n\nlog = getLogger(__name__)\n\nfrom . import CondaError  # NOQA\nCondaError = CondaError\n\nfrom .base.context import reset_context  # NOQA\nreset_context()  # initialize context when conda.exports is imported\n\nfrom . import compat, plan  # NOQA\ncompat, plan = compat, plan\n\nfrom .core.solve import Solver  # NOQA\nSolver = Solver\n\nfrom .plan import display_actions  # NOQA\ndisplay_actions = display_actions\n\nfrom .cli.common import specs_from_args, spec_from_line, specs_from_url  # NOQA\nfrom .cli.conda_argparse import add_parser_prefix, add_parser_channels  # NOQA\nadd_parser_channels, add_parser_prefix = add_parser_channels, add_parser_prefix\nspecs_from_args, spec_from_line = specs_from_args, spec_from_line\nspecs_from_url = specs_from_url\n\nfrom .cli.conda_argparse import ArgumentParser  # NOQA\nArgumentParser = ArgumentParser\n\nfrom .common.compat import PY3, StringIO,  input, iteritems, string_types, text_type  # NOQA\nPY3, StringIO,  input, iteritems, string_types, text_type = PY3, StringIO,  input, iteritems, string_types, text_type  # NOQA\nfrom .gateways.connection.session import CondaSession  # NOQA\nCondaSession = CondaSession\n\nfrom .common.toposort import _toposort  # NOQA\n_toposort = _toposort\n\nfrom .gateways.disk.link import lchmod  # NOQA\nlchmod = lchmod\n\nfrom .gateways.connection.download import TmpDownload  # NOQA\n\nTmpDownload = TmpDownload\nhandle_proxy_407 = lambda x, y: warn(\"handle_proxy_407 is deprecated. \"\n                                     \"Now handled by CondaSession.\")\nfrom .core.index import dist_str_in_index, fetch_index, get_index  # NOQA\ndist_str_in_index, fetch_index, get_index = dist_str_in_index, fetch_index, get_index  # NOQA\nfrom .core.package_cache_data import download, rm_fetched  # NOQA\ndownload, rm_fetched = download, rm_fetched\n\nfrom .install import package_cache, prefix_placeholder, symlink_conda  # NOQA\npackage_cache, prefix_placeholder, symlink_conda = package_cache, prefix_placeholder, symlink_conda\n\nfrom .gateways.disk.delete import delete_trash, move_to_trash  # NOQA\ndelete_trash, move_to_trash = delete_trash, move_to_trash\n\nfrom .core.prefix_data import is_linked, linked, linked_data  # NOQA\nis_linked, linked, linked_data = is_linked, linked, linked_data\n\nfrom .misc import untracked, walk_prefix  # NOQA\nuntracked, walk_prefix = untracked, walk_prefix\n\nfrom .resolve import MatchSpec, ResolvePackageNotFound, Resolve, Unsatisfiable  # NOQA\nMatchSpec, Resolve = MatchSpec, Resolve\nUnsatisfiable = Unsatisfiable\nNoPackagesFound = NoPackagesFoundError = ResolvePackageNotFound\n\nfrom .utils import hashsum_file, human_bytes, unix_path_to_win, url_path  # NOQA\nfrom .common.path import win_path_to_unix  # NOQA\nhashsum_file, human_bytes = hashsum_file, human_bytes\nunix_path_to_win = unix_path_to_win\nwin_path_to_unix, url_path = win_path_to_unix, url_path\n\nfrom .gateways.disk.read import compute_md5sum  # NOQA\nmd5_file = compute_md5sum\n\nfrom .models.version import VersionOrder, normalized_version  # NOQA\nVersionOrder, normalized_version = VersionOrder, normalized_version  # NOQA\n\nimport conda.base.context  # NOQA\nfrom .base.context import get_prefix, non_x86_linux_machines, sys_rc_path  # NOQA\nnon_x86_linux_machines, sys_rc_path = non_x86_linux_machines, sys_rc_path\nget_prefix = get_prefix\n\nfrom ._vendor.auxlib.entity import EntityEncoder # NOQA\nEntityEncoder = EntityEncoder\nfrom .base.constants import DEFAULT_CHANNELS, DEFAULT_CHANNELS_WIN, DEFAULT_CHANNELS_UNIX  # NOQA\nDEFAULT_CHANNELS, DEFAULT_CHANNELS_WIN, DEFAULT_CHANNELS_UNIX = DEFAULT_CHANNELS, DEFAULT_CHANNELS_WIN, DEFAULT_CHANNELS_UNIX  # NOQA\nget_default_urls = lambda: DEFAULT_CHANNELS\n\narch_name = conda.base.context.context.arch_name\nbinstar_upload = conda.base.context.context.anaconda_upload\nbits = conda.base.context.context.bits\ndefault_prefix = conda.base.context.context.default_prefix\ndefault_python = conda.base.context.context.default_python\nenvs_dirs = conda.base.context.context.envs_dirs\npkgs_dirs = conda.base.context.context.pkgs_dirs\nplatform = conda.base.context.context.platform\nroot_dir = conda.base.context.context.root_prefix\nroot_writable = conda.base.context.context.root_writable\nsubdir = conda.base.context.context.subdir\nconda_private = conda.base.context.context.conda_private\nfrom .models.channel import get_conda_build_local_url  # NOQA\nget_rc_urls = lambda: list(conda.base.context.context.channels)\nget_local_urls = lambda: list(get_conda_build_local_url()) or []\nload_condarc = lambda fn: conda.base.context.reset_context([fn])\nfrom .exceptions import PaddingError, LinkError, CondaOSError, PathNotFoundError  # NOQA\nPaddingError = PaddingError\nLinkError = LinkError\nCondaOSError = CondaOSError\n# PathNotFoundError is the conda 4.4.x name for it - let's plan ahead.\nPathNotFoundError = CondaFileNotFoundError = PathNotFoundError\nfrom .gateways.disk.link import CrossPlatformStLink  # NOQA\nCrossPlatformStLink = CrossPlatformStLink\n\nfrom .models.enums import FileMode  # NOQA\nFileMode = FileMode\nfrom .models.enums import PathType  # NOQA\nPathType = PathType\n\nfrom .models.records import PackageRecord  # NOQA\nPackageRecord = IndexRecord = PackageRecord\n\nfrom .compat import TemporaryDirectory  # NOQA\nTemporaryDirectory = TemporaryDirectory\n\nfrom .gateways.subprocess import ACTIVE_SUBPROCESSES, subprocess_call  # NOQA\nACTIVE_SUBPROCESSES, subprocess_call = ACTIVE_SUBPROCESSES, subprocess_call\n\nfrom .core.subdir_data import cache_fn_url  # NOQA\ncache_fn_url = cache_fn_url\n\n\nclass Completer(object):  # pragma: no cover\n    def get_items(self):\n        return self._get_items()\n\n    def __contains__(self, item):\n        return True\n\n    def __iter__(self):\n        return iter(self.get_items())\n\n\nclass InstalledPackages(object):\n    pass\n\n\nclass memoized(object):  # pragma: no cover\n    \"\"\"Decorator. Caches a function's return value each time it is called.\n    If called later with the same arguments, the cached value is returned\n    (not reevaluated).\n    \"\"\"\n    def __init__(self, func):\n        self.func = func\n        self.cache = {}\n        self.lock = threading.Lock()\n\n    def __call__(self, *args, **kw):\n        newargs = []\n        for arg in args:\n            if isinstance(arg, list):\n                newargs.append(tuple(arg))\n            elif not isinstance(arg, Hashable):\n                # uncacheable. a list, for instance.\n                # better to not cache than blow up.\n                return self.func(*args, **kw)\n            else:\n                newargs.append(arg)\n        newargs = tuple(newargs)\n        key = (newargs, frozenset(sorted(kw.items())))\n        with self.lock:\n            if key in self.cache:\n                return self.cache[key]\n            else:\n                value = self.func(*args, **kw)\n                self.cache[key] = value\n                return value\n\n\nfrom .gateways.disk.delete import rm_rf as _rm_rf  # NOQA\nfrom .core.prefix_data import delete_prefix_from_linked_data  # NOQA\n\n\ndef rm_rf(path, max_retries=5, trash=True):\n    _rm_rf(path, max_retries, trash)\n    delete_prefix_from_linked_data(path)\n\n\n# ######################\n# signature.py\n# ######################\nKEYS = None\nKEYS_DIR = None\n\n\ndef hash_file(_):\n    return None  # pragma: no cover\n\n\ndef verify(_):\n    return False  # pragma: no cover\n\n\nfrom .plan import execute_actions, execute_instructions, execute_plan, install_actions  # NOQA\nexecute_actions, execute_instructions = execute_actions, execute_instructions\nexecute_plan, install_actions = execute_plan, install_actions\n", "path": "conda/exports.py"}]}