diff --git a/micropip/package_index.py b/micropip/package_index.py index 490684d..f706d41 100644 --- a/micropip/package_index.py +++ b/micropip/package_index.py @@ -1,7 +1,7 @@ import json +import logging import string import sys -import logging from collections import defaultdict from collections.abc import Callable, Generator from dataclasses import dataclass @@ -235,6 +235,7 @@ class UnsupportedParserContentTypeError(BaseException): pass + def _select_parser(content_type: str, pkgname: str) -> Callable[[str], ProjectInfo]: """ Select the function to parse the response based on the content type. @@ -267,6 +268,7 @@ def _select_parser(content_type: str, pkgname: str) -> Callable[[str], ProjectIn class IndexMetadataFetchError(BaseException): pass + async def query_package( name: str, fetch_kwargs: dict[str, Any] | None = None, diff --git a/micropip/transaction.py b/micropip/transaction.py index 7e1e778..299583d 100644 --- a/micropip/transaction.py +++ b/micropip/transaction.py @@ -14,7 +14,7 @@ from ._utils import best_compatible_tag_index, check_compatible from .constants import FAQ_URLS from .package import PackageMetadata -from .package_index import ProjectInfo, IndexMetadataFetchError +from .package_index import ProjectInfo from .wheelinfo import WheelInfo logger = logging.getLogger("micropip")