Пример #1
0
def cachecontrol_logging_hook(app):
    """
    Reroute cachecontrol logger to use cement log handlers.
    """
    from cachecontrol.controller import logger
    formatter = logging.Formatter(LOG_FORMAT)

    for handler in app.log.backend.handlers:
        handler.setFormatter(formatter)
        logger.addHandler(handler)

    logger.setLevel(logging.DEBUG)
Пример #2
0
def cachecontrol_logging_hook(app):
    """
    Reroute cachecontrol logger to use cement log handlers.
    """
    from cachecontrol.controller import logger
    formatter = logging.Formatter(LOG_FORMAT)

    for handler in app.log.backend.handlers:
        handler.setFormatter(formatter)
        logger.addHandler(handler)

    logger.setLevel(logging.DEBUG)
Пример #3
0
def setup_logging():
    logger.setLevel(logging.DEBUG)
    handler = logging.StreamHandler()
    logger.addHandler(handler)
Пример #4
0
from poetry.core.semver import VersionConstraint
from poetry.core.semver import VersionRange
from poetry.core.semver import parse_constraint
from poetry.core.semver.exceptions import ParseVersionError
from poetry.core.version.markers import parse_marker
from poetry.locations import REPOSITORY_CACHE_DIR
from poetry.utils._compat import to_str
from poetry.utils.helpers import download_file
from poetry.utils.helpers import temporary_directory
from poetry.utils.patterns import wheel_file_re

from ..inspection.info import PackageInfo
from .exceptions import PackageNotFound
from .remote_repository import RemoteRepository

cache_control_logger.setLevel(logging.ERROR)

logger = logging.getLogger(__name__)


class PyPiRepository(RemoteRepository):

    CACHE_VERSION = parse_constraint("1.0.0")

    def __init__(
        self,
        url: str = "https://pypi.org/",
        disable_cache: bool = False,
        fallback: bool = True,
    ) -> None:
        super(PyPiRepository, self).__init__(url.rstrip("/") + "/simple/")
Пример #5
0
def setup_logging():
    logger.setLevel(logging.DEBUG)
    handler = logging.StreamHandler()
    logger.addHandler(handler)