13
13
from ._compat import REPODATA_PACKAGES
14
14
from ._utils import best_compatible_tag_index , check_compatible
15
15
from .constants import FAQ_URLS
16
+ from .error import NoCompatibleWheelError
16
17
from .package import PackageMetadata
17
- from .package_index import NoValidIndexForPackageError , ProjectInfo
18
+ from .package_index import PackageNotFoundOnAnyIndexError , ProjectInfo
18
19
from .wheelinfo import WheelInfo
19
20
20
21
logger = logging .getLogger ("micropip" )
@@ -153,7 +154,7 @@ def eval_marker(e: dict[str, str]) -> bool:
153
154
else :
154
155
try :
155
156
await self ._add_requirement_from_package_index (req )
156
- except NoValidIndexForPackageError :
157
+ except PackageNotFoundOnAnyIndexError :
157
158
logger .warning (
158
159
"Transaction: package %r was not found in any index, "
159
160
"falling back to pyodide lock file" ,
@@ -178,7 +179,7 @@ def eval_marker(e: dict[str, str]) -> bool:
178
179
)
179
180
180
181
raise
181
- except (NoCompatibleWheelError , NoValidIndexForPackageError ):
182
+ except (NoCompatibleWheelError , PackageNotFoundOnAnyIndexError ):
182
183
self .failed .append (req )
183
184
if not self .keep_going :
184
185
raise
@@ -263,10 +264,6 @@ async def add_wheel(
263
264
self .wheels .append (wheel )
264
265
265
266
266
- class NoCompatibleWheelError (Exception ):
267
- pass
268
-
269
-
270
267
def find_wheel (metadata : ProjectInfo , req : Requirement ) -> WheelInfo :
271
268
"""Parse metadata to find the latest version of pure python wheel.
272
269
Parameters
0 commit comments