code
stringlengths
0
21.5M
repo_name
stringlengths
4
92
path
stringlengths
1
189
language
stringlengths
0
26
license
stringclasses
11 values
size
int64
0
21.5M
"""For modules related to installing packages. """
castiel248/Convert
Lib/site-packages/pip/_internal/operations/install/__init__.py
Python
mit
51
"""Legacy editable installation process, i.e. `setup.py develop`. """ import logging from typing import List, Optional, Sequence from pip._internal.build_env import BuildEnvironment from pip._internal.utils.logging import indent_log from pip._internal.utils.setuptools_build import make_setuptools_develop_args from pip...
castiel248/Convert
Lib/site-packages/pip/_internal/operations/install/editable_legacy.py
Python
mit
1,354
"""Legacy installation process, i.e. `setup.py install`. """ import logging import os from typing import List, Optional, Sequence from pip._internal.build_env import BuildEnvironment from pip._internal.exceptions import InstallationError, LegacyInstallFailure from pip._internal.locations.base import change_root from ...
castiel248/Convert
Lib/site-packages/pip/_internal/operations/install/legacy.py
Python
mit
4,105
"""Support for installing and building the "wheel" binary package format. """ import collections import compileall import contextlib import csv import importlib import logging import os.path import re import shutil import sys import warnings from base64 import urlsafe_b64encode from email.message import Message from i...
castiel248/Convert
Lib/site-packages/pip/_internal/operations/install/wheel.py
Python
mit
27,407
"""Prepares a distribution for installation """ # The following comment should be removed at some point in the future. # mypy: strict-optional=False import logging import mimetypes import os import shutil from typing import Dict, Iterable, List, Optional from pip._vendor.packaging.utils import canonicalize_name fro...
castiel248/Convert
Lib/site-packages/pip/_internal/operations/prepare.py
Python
mit
25,091
import importlib.util import os from collections import namedtuple from typing import Any, List, Optional from pip._vendor import tomli from pip._vendor.packaging.requirements import InvalidRequirement, Requirement from pip._internal.exceptions import ( InstallationError, InvalidPyProjectBuildRequires, Mi...
castiel248/Convert
Lib/site-packages/pip/_internal/pyproject.py
Python
mit
7,074
import collections import logging from typing import Generator, List, Optional, Sequence, Tuple from pip._internal.utils.logging import indent_log from .req_file import parse_requirements from .req_install import InstallRequirement from .req_set import RequirementSet __all__ = [ "RequirementSet", "InstallReq...
castiel248/Convert
Lib/site-packages/pip/_internal/req/__init__.py
Python
mit
2,807
"""Backing implementation for InstallRequirement's various constructors The idea here is that these formed a major chunk of InstallRequirement's size so, moving them and support code dedicated to them outside of that class helps creates for better understandability for the rest of the code. These are meant to be used...
castiel248/Convert
Lib/site-packages/pip/_internal/req/constructors.py
Python
mit
16,611
""" Requirements file parsing """ import optparse import os import re import shlex import urllib.parse from optparse import Values from typing import ( TYPE_CHECKING, Any, Callable, Dict, Generator, Iterable, List, Optional, Tuple, ) from pip._internal.cli import cmdoptions from pi...
castiel248/Convert
Lib/site-packages/pip/_internal/req/req_file.py
Python
mit
17,646
# The following comment should be removed at some point in the future. # mypy: strict-optional=False import functools import logging import os import shutil import sys import uuid import zipfile from enum import Enum from optparse import Values from typing import Any, Collection, Dict, Iterable, List, Optional, Sequen...
castiel248/Convert
Lib/site-packages/pip/_internal/req/req_install.py
Python
mit
35,600
import logging from collections import OrderedDict from typing import Dict, List from pip._vendor.packaging.utils import canonicalize_name from pip._internal.req.req_install import InstallRequirement logger = logging.getLogger(__name__) class RequirementSet: def __init__(self, check_supported_wheels: bool = Tr...
castiel248/Convert
Lib/site-packages/pip/_internal/req/req_set.py
Python
mit
2,858
import functools import os import sys import sysconfig from importlib.util import cache_from_source from typing import Any, Callable, Dict, Generator, Iterable, List, Optional, Set, Tuple from pip._internal.exceptions import UninstallationError from pip._internal.locations import get_bin_prefix, get_bin_user from pip....
castiel248/Convert
Lib/site-packages/pip/_internal/req/req_uninstall.py
Python
mit
24,045
castiel248/Convert
Lib/site-packages/pip/_internal/resolution/__init__.py
Python
mit
0
from typing import Callable, List, Optional from pip._internal.req.req_install import InstallRequirement from pip._internal.req.req_set import RequirementSet InstallRequirementProvider = Callable[ [str, Optional[InstallRequirement]], InstallRequirement ] class BaseResolver: def resolve( self, root_r...
castiel248/Convert
Lib/site-packages/pip/_internal/resolution/base.py
Python
mit
583
castiel248/Convert
Lib/site-packages/pip/_internal/resolution/legacy/__init__.py
Python
mit
0
"""Dependency Resolution The dependency resolution in pip is performed as follows: for top-level requirements: a. only one spec allowed per project, regardless of conflicts or not. otherwise a "double requirement" exception is raised b. they override sub-dependency requirements. for sub-dependencies ...
castiel248/Convert
Lib/site-packages/pip/_internal/resolution/legacy/resolver.py
Python
mit
24,129
castiel248/Convert
Lib/site-packages/pip/_internal/resolution/resolvelib/__init__.py
Python
mit
0
from typing import FrozenSet, Iterable, Optional, Tuple, Union from pip._vendor.packaging.specifiers import SpecifierSet from pip._vendor.packaging.utils import NormalizedName, canonicalize_name from pip._vendor.packaging.version import LegacyVersion, Version from pip._internal.models.link import Link, links_equivale...
castiel248/Convert
Lib/site-packages/pip/_internal/resolution/resolvelib/base.py
Python
mit
5,220
import logging import sys from typing import TYPE_CHECKING, Any, FrozenSet, Iterable, Optional, Tuple, Union, cast from pip._vendor.packaging.utils import NormalizedName, canonicalize_name from pip._vendor.packaging.version import Version from pip._internal.exceptions import ( HashError, InstallationSubproces...
castiel248/Convert
Lib/site-packages/pip/_internal/resolution/resolvelib/candidates.py
Python
mit
18,963
import contextlib import functools import logging from typing import ( TYPE_CHECKING, Dict, FrozenSet, Iterable, Iterator, List, Mapping, NamedTuple, Optional, Sequence, Set, Tuple, TypeVar, cast, ) from pip._vendor.packaging.requirements import InvalidRequiremen...
castiel248/Convert
Lib/site-packages/pip/_internal/resolution/resolvelib/factory.py
Python
mit
27,878
"""Utilities to lazily create and visit candidates found. Creating and visiting a candidate is a *very* costly operation. It involves fetching, extracting, potentially building modules from source, and verifying distribution metadata. It is therefore crucial for performance to keep everything here lazy all the way dow...
castiel248/Convert
Lib/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py
Python
mit
5,705
import collections import math from typing import ( TYPE_CHECKING, Dict, Iterable, Iterator, Mapping, Sequence, TypeVar, Union, ) from pip._vendor.resolvelib.providers import AbstractProvider from .base import Candidate, Constraint, Requirement from .candidates import REQUIRES_PYTHON_I...
castiel248/Convert
Lib/site-packages/pip/_internal/resolution/resolvelib/provider.py
Python
mit
9,914
from collections import defaultdict from logging import getLogger from typing import Any, DefaultDict from pip._vendor.resolvelib.reporters import BaseReporter from .base import Candidate, Requirement logger = getLogger(__name__) class PipReporter(BaseReporter): def __init__(self) -> None: self.backtra...
castiel248/Convert
Lib/site-packages/pip/_internal/resolution/resolvelib/reporter.py
Python
mit
2,526
from pip._vendor.packaging.specifiers import SpecifierSet from pip._vendor.packaging.utils import NormalizedName, canonicalize_name from pip._internal.req.req_install import InstallRequirement from .base import Candidate, CandidateLookup, Requirement, format_name class ExplicitRequirement(Requirement): def __in...
castiel248/Convert
Lib/site-packages/pip/_internal/resolution/resolvelib/requirements.py
Python
mit
5,455
import functools import logging import os from typing import TYPE_CHECKING, Dict, List, Optional, Set, Tuple, cast from pip._vendor.packaging.utils import canonicalize_name from pip._vendor.resolvelib import BaseReporter, ResolutionImpossible from pip._vendor.resolvelib import Resolver as RLResolver from pip._vendor.r...
castiel248/Convert
Lib/site-packages/pip/_internal/resolution/resolvelib/resolver.py
Python
mit
11,533
import datetime import functools import hashlib import json import logging import optparse import os.path import sys from dataclasses import dataclass from typing import Any, Callable, Dict, Optional from pip._vendor.packaging.version import parse as parse_version from pip._vendor.rich.console import Group from pip._v...
castiel248/Convert
Lib/site-packages/pip/_internal/self_outdated_check.py
Python
mit
8,020
castiel248/Convert
Lib/site-packages/pip/_internal/utils/__init__.py
Python
mit
0
"""Customize logging Defines custom logger class for the `logger.verbose(...)` method. init_logging() must be called before any other modules that call logging.getLogger. """ import logging from typing import Any, cast # custom log level for `--verbose` output # between DEBUG and INFO VERBOSE = 15 class VerboseLo...
castiel248/Convert
Lib/site-packages/pip/_internal/utils/_log.py
Python
mit
1,015
""" This code wraps the vendored appdirs module to so the return values are compatible for the current pip code base. The intention is to rewrite current usages gradually, keeping the tests pass, and eventually drop this after all usages are changed. """ import os import sys from typing import List from pip._vendor ...
castiel248/Convert
Lib/site-packages/pip/_internal/utils/appdirs.py
Python
mit
1,665
"""Stuff that differs in different Python versions and platform distributions.""" import logging import os import sys __all__ = ["get_path_uid", "stdlib_pkgs", "WINDOWS"] logger = logging.getLogger(__name__) def has_tls() -> bool: try: import _ssl # noqa: F401 # ignore unused return True ...
castiel248/Convert
Lib/site-packages/pip/_internal/utils/compat.py
Python
mit
1,884
"""Generate and work with PEP 425 Compatibility Tags. """ import re from typing import List, Optional, Tuple from pip._vendor.packaging.tags import ( PythonVersion, Tag, compatible_tags, cpython_tags, generic_tags, interpreter_name, interpreter_version, mac_platforms, ) _osx_arch_pat ...
castiel248/Convert
Lib/site-packages/pip/_internal/utils/compatibility_tags.py
Python
mit
5,377
"""For when pip wants to check the date or time. """ import datetime def today_is_later_than(year: int, month: int, day: int) -> bool: today = datetime.date.today() given = datetime.date(year, month, day) return today > given
castiel248/Convert
Lib/site-packages/pip/_internal/utils/datetime.py
Python
mit
242
""" A module that implements tooling to enable easy warnings about deprecations. """ import logging import warnings from typing import Any, Optional, TextIO, Type, Union from pip._vendor.packaging.version import parse from pip import __version__ as current_version # NOTE: tests patch this name. DEPRECATION_MSG_PRE...
castiel248/Convert
Lib/site-packages/pip/_internal/utils/deprecation.py
Python
mit
5,764
from typing import Optional from pip._internal.models.direct_url import ArchiveInfo, DirectUrl, DirInfo, VcsInfo from pip._internal.models.link import Link from pip._internal.utils.urls import path_to_url from pip._internal.vcs import vcs def direct_url_as_pep440_direct_reference(direct_url: DirectUrl, name: str) ->...
castiel248/Convert
Lib/site-packages/pip/_internal/utils/direct_url_helpers.py
Python
mit
3,206
from getopt import GetoptError, getopt from typing import Dict, List _options = [ "exec-prefix=", "home=", "install-base=", "install-data=", "install-headers=", "install-lib=", "install-platlib=", "install-purelib=", "install-scripts=", "prefix=", "root=", "user", ] de...
castiel248/Convert
Lib/site-packages/pip/_internal/utils/distutils_args.py
Python
mit
1,115
# The following comment should be removed at some point in the future. # mypy: strict-optional=False import os import re import sys from typing import Optional from pip._internal.locations import site_packages, user_site from pip._internal.utils.virtualenv import ( running_under_virtualenv, virtualenv_no_glob...
castiel248/Convert
Lib/site-packages/pip/_internal/utils/egg_link.py
Python
mit
2,203
import codecs import locale import re import sys from typing import List, Tuple BOMS: List[Tuple[bytes, str]] = [ (codecs.BOM_UTF8, "utf-8"), (codecs.BOM_UTF16, "utf-16"), (codecs.BOM_UTF16_BE, "utf-16-be"), (codecs.BOM_UTF16_LE, "utf-16-le"), (codecs.BOM_UTF32, "utf-32"), (codecs.BOM_UTF32_BE,...
castiel248/Convert
Lib/site-packages/pip/_internal/utils/encoding.py
Python
mit
1,169
import itertools import os import shutil import sys from typing import List, Optional from pip._internal.cli.main import main from pip._internal.utils.compat import WINDOWS _EXECUTABLE_NAMES = [ "pip", f"pip{sys.version_info.major}", f"pip{sys.version_info.major}.{sys.version_info.minor}", ] if WINDOWS: ...
castiel248/Convert
Lib/site-packages/pip/_internal/utils/entrypoints.py
Python
mit
3,064
import fnmatch import os import os.path import random import sys from contextlib import contextmanager from tempfile import NamedTemporaryFile from typing import Any, BinaryIO, Generator, List, Union, cast from pip._vendor.tenacity import retry, stop_after_delay, wait_fixed from pip._internal.utils.compat import get_...
castiel248/Convert
Lib/site-packages/pip/_internal/utils/filesystem.py
Python
mit
5,122
"""Filetype information. """ from typing import Tuple from pip._internal.utils.misc import splitext WHEEL_EXTENSION = ".whl" BZ2_EXTENSIONS: Tuple[str, ...] = (".tar.bz2", ".tbz") XZ_EXTENSIONS: Tuple[str, ...] = ( ".tar.xz", ".txz", ".tlz", ".tar.lz", ".tar.lzma", ) ZIP_EXTENSIONS: Tuple[str, .....
castiel248/Convert
Lib/site-packages/pip/_internal/utils/filetypes.py
Python
mit
716
# The following comment should be removed at some point in the future. # mypy: strict-optional=False import os import sys from typing import Optional, Tuple def glibc_version_string() -> Optional[str]: "Returns glibc version string, or None if not using glibc." return glibc_version_string_confstr() or glibc_...
castiel248/Convert
Lib/site-packages/pip/_internal/utils/glibc.py
Python
mit
3,110
import hashlib from typing import TYPE_CHECKING, BinaryIO, Dict, Iterable, List, Optional from pip._internal.exceptions import HashMismatch, HashMissing, InstallationError from pip._internal.utils.misc import read_chunks if TYPE_CHECKING: from hashlib import _Hash # NoReturn introduced in 3.6.2; imported onl...
castiel248/Convert
Lib/site-packages/pip/_internal/utils/hashes.py
Python
mit
4,831
"""A helper module that injects SecureTransport, on import. The import should be done as early as possible, to ensure all requests and sessions (or whatever) are created after injecting SecureTransport. Note that we only do the injection on macOS, when the linked OpenSSL is too old to handle TLSv1.2. """ import sys ...
castiel248/Convert
Lib/site-packages/pip/_internal/utils/inject_securetransport.py
Python
mit
795
import contextlib import errno import logging import logging.handlers import os import sys import threading from dataclasses import dataclass from io import TextIOWrapper from logging import Filter from typing import Any, ClassVar, Generator, List, Optional, TextIO, Type from pip._vendor.rich.console import ( Cons...
castiel248/Convert
Lib/site-packages/pip/_internal/utils/logging.py
Python
mit
11,632
# The following comment should be removed at some point in the future. # mypy: strict-optional=False import contextlib import errno import getpass import hashlib import io import logging import os import posixpath import shutil import stat import sys import urllib.parse from io import StringIO from itertools import fi...
castiel248/Convert
Lib/site-packages/pip/_internal/utils/misc.py
Python
mit
21,617
"""Utilities for defining models """ import operator from typing import Any, Callable, Type class KeyBasedCompareMixin: """Provides comparison capabilities that is based on a key""" __slots__ = ["_compare_key", "_defining_class"] def __init__(self, key: Any, defining_class: Type["KeyBasedCompareMixin"]...
castiel248/Convert
Lib/site-packages/pip/_internal/utils/models.py
Python
mit
1,193
import functools import logging import re from typing import NewType, Optional, Tuple, cast from pip._vendor.packaging import specifiers, version from pip._vendor.packaging.requirements import Requirement NormalizedExtra = NewType("NormalizedExtra", str) logger = logging.getLogger(__name__) def check_requires_pyth...
castiel248/Convert
Lib/site-packages/pip/_internal/utils/packaging.py
Python
mit
2,108
import sys import textwrap from typing import List, Optional, Sequence # Shim to wrap setup.py invocation with setuptools # Note that __file__ is handled via two {!r} *and* %r, to ensure that paths on # Windows are correctly handled (it should be "C:\\Users" not "C:\Users"). _SETUPTOOLS_SHIM = textwrap.dedent( """...
castiel248/Convert
Lib/site-packages/pip/_internal/utils/setuptools_build.py
Python
mit
5,662
import logging import os import shlex import subprocess from typing import ( TYPE_CHECKING, Any, Callable, Iterable, List, Mapping, Optional, Union, ) from pip._vendor.rich.markup import escape from pip._internal.cli.spinners import SpinnerInterface, open_spinner from pip._internal.exc...
castiel248/Convert
Lib/site-packages/pip/_internal/utils/subprocess.py
Python
mit
9,197
import errno import itertools import logging import os.path import tempfile from contextlib import ExitStack, contextmanager from typing import Any, Dict, Generator, Optional, TypeVar, Union from pip._internal.utils.misc import enum, rmtree logger = logging.getLogger(__name__) _T = TypeVar("_T", bound="TempDirectory...
castiel248/Convert
Lib/site-packages/pip/_internal/utils/temp_dir.py
Python
mit
7,702
"""Utilities related archives. """ import logging import os import shutil import stat import tarfile import zipfile from typing import Iterable, List, Optional from zipfile import ZipInfo from pip._internal.exceptions import InstallationError from pip._internal.utils.filetypes import ( BZ2_EXTENSIONS, TAR_EXT...
castiel248/Convert
Lib/site-packages/pip/_internal/utils/unpacking.py
Python
mit
8,821
import os import string import urllib.parse import urllib.request from typing import Optional from .compat import WINDOWS def get_url_scheme(url: str) -> Optional[str]: if ":" not in url: return None return url.split(":", 1)[0].lower() def path_to_url(path: str) -> str: """ Convert a path t...
castiel248/Convert
Lib/site-packages/pip/_internal/utils/urls.py
Python
mit
1,759
import logging import os import re import site import sys from typing import List, Optional logger = logging.getLogger(__name__) _INCLUDE_SYSTEM_SITE_PACKAGES_REGEX = re.compile( r"include-system-site-packages\s*=\s*(?P<value>true|false)" ) def _running_under_venv() -> bool: """Checks if sys.base_prefix and ...
castiel248/Convert
Lib/site-packages/pip/_internal/utils/virtualenv.py
Python
mit
3,459
"""Support functions for working with wheel files. """ import logging from email.message import Message from email.parser import Parser from typing import Tuple from zipfile import BadZipFile, ZipFile from pip._vendor.packaging.utils import canonicalize_name from pip._internal.exceptions import UnsupportedWheel VER...
castiel248/Convert
Lib/site-packages/pip/_internal/utils/wheel.py
Python
mit
4,549
# Expose a limited set of classes and functions so callers outside of # the vcs package don't need to import deeper than `pip._internal.vcs`. # (The test directory may still need to import from a vcs sub-package.) # Import all vcs modules to register each VCS in the VcsSupport object. import pip._internal.vcs.bazaar im...
castiel248/Convert
Lib/site-packages/pip/_internal/vcs/__init__.py
Python
mit
596
import logging from typing import List, Optional, Tuple from pip._internal.utils.misc import HiddenText, display_path from pip._internal.utils.subprocess import make_command from pip._internal.utils.urls import path_to_url from pip._internal.vcs.versioncontrol import ( AuthInfo, RemoteNotFoundError, RevOpt...
castiel248/Convert
Lib/site-packages/pip/_internal/vcs/bazaar.py
Python
mit
3,518
import logging import os.path import pathlib import re import urllib.parse import urllib.request from typing import List, Optional, Tuple from pip._internal.exceptions import BadCommand, InstallationError from pip._internal.utils.misc import HiddenText, display_path, hide_url from pip._internal.utils.subprocess import...
castiel248/Convert
Lib/site-packages/pip/_internal/vcs/git.py
Python
mit
18,116
import configparser import logging import os from typing import List, Optional, Tuple from pip._internal.exceptions import BadCommand, InstallationError from pip._internal.utils.misc import HiddenText, display_path from pip._internal.utils.subprocess import make_command from pip._internal.utils.urls import path_to_url...
castiel248/Convert
Lib/site-packages/pip/_internal/vcs/mercurial.py
Python
mit
5,238
import logging import os import re from typing import List, Optional, Tuple from pip._internal.utils.misc import ( HiddenText, display_path, is_console_interactive, is_installable_dir, split_auth_from_netloc, ) from pip._internal.utils.subprocess import CommandArgs, make_command from pip._internal....
castiel248/Convert
Lib/site-packages/pip/_internal/vcs/subversion.py
Python
mit
11,728
"""Handles all VCS (version control) support""" import logging import os import shutil import sys import urllib.parse from typing import ( TYPE_CHECKING, Any, Dict, Iterable, Iterator, List, Mapping, Optional, Tuple, Type, Union, ) from pip._internal.cli.spinners import Spi...
castiel248/Convert
Lib/site-packages/pip/_internal/vcs/versioncontrol.py
Python
mit
22,811
"""Orchestrator for building wheels from InstallRequirements. """ import logging import os.path import re import shutil from typing import Callable, Iterable, List, Optional, Tuple from pip._vendor.packaging.utils import canonicalize_name, canonicalize_version from pip._vendor.packaging.version import InvalidVersion,...
castiel248/Convert
Lib/site-packages/pip/_internal/wheel_builder.py
Python
mit
13,079
""" pip._vendor is for vendoring dependencies of pip to prevent needing pip to depend on something external. Files inside of pip._vendor should be considered immutable and should only be updated to versions from upstream. """ from __future__ import absolute_import import glob import os.path import sys # Downstream r...
castiel248/Convert
Lib/site-packages/pip/_vendor/__init__.py
Python
mit
4,966
# SPDX-FileCopyrightText: 2015 Eric Larson # # SPDX-License-Identifier: Apache-2.0 """CacheControl import Interface. Make it easy to import from cachecontrol without long namespaces. """ __author__ = "Eric Larson" __email__ = "eric@ionrock.org" __version__ = "0.12.11" from .wrapper import CacheControl from .adapter ...
castiel248/Convert
Lib/site-packages/pip/_vendor/cachecontrol/__init__.py
Python
mit
465
# SPDX-FileCopyrightText: 2015 Eric Larson # # SPDX-License-Identifier: Apache-2.0 import logging from pip._vendor import requests from pip._vendor.cachecontrol.adapter import CacheControlAdapter from pip._vendor.cachecontrol.cache import DictCache from pip._vendor.cachecontrol.controller import logger from argpars...
castiel248/Convert
Lib/site-packages/pip/_vendor/cachecontrol/_cmd.py
Python
mit
1,379
# SPDX-FileCopyrightText: 2015 Eric Larson # # SPDX-License-Identifier: Apache-2.0 import types import functools import zlib from pip._vendor.requests.adapters import HTTPAdapter from .controller import CacheController, PERMANENT_REDIRECT_STATUSES from .cache import DictCache from .filewrapper import CallbackFileWra...
castiel248/Convert
Lib/site-packages/pip/_vendor/cachecontrol/adapter.py
Python
mit
5,033
# SPDX-FileCopyrightText: 2015 Eric Larson # # SPDX-License-Identifier: Apache-2.0 """ The cache object API for implementing caches. The default is a thread safe in-memory dictionary. """ from threading import Lock class BaseCache(object): def get(self, key): raise NotImplementedError() def set(sel...
castiel248/Convert
Lib/site-packages/pip/_vendor/cachecontrol/cache.py
Python
mit
1,535
# SPDX-FileCopyrightText: 2015 Eric Larson # # SPDX-License-Identifier: Apache-2.0 from .file_cache import FileCache, SeparateBodyFileCache from .redis_cache import RedisCache __all__ = ["FileCache", "SeparateBodyFileCache", "RedisCache"]
castiel248/Convert
Lib/site-packages/pip/_vendor/cachecontrol/caches/__init__.py
Python
mit
242
# SPDX-FileCopyrightText: 2015 Eric Larson # # SPDX-License-Identifier: Apache-2.0 import hashlib import os from textwrap import dedent from ..cache import BaseCache, SeparateBodyBaseCache from ..controller import CacheController try: FileNotFoundError except NameError: # py2.X FileNotFoundError = (IOErr...
castiel248/Convert
Lib/site-packages/pip/_vendor/cachecontrol/caches/file_cache.py
Python
mit
5,271
# SPDX-FileCopyrightText: 2015 Eric Larson # # SPDX-License-Identifier: Apache-2.0 from __future__ import division from datetime import datetime from pip._vendor.cachecontrol.cache import BaseCache class RedisCache(BaseCache): def __init__(self, conn): self.conn = conn def get(self, key): ...
castiel248/Convert
Lib/site-packages/pip/_vendor/cachecontrol/caches/redis_cache.py
Python
mit
1,033
# SPDX-FileCopyrightText: 2015 Eric Larson # # SPDX-License-Identifier: Apache-2.0 try: from urllib.parse import urljoin except ImportError: from urlparse import urljoin try: import cPickle as pickle except ImportError: import pickle # Handle the case where the requests module has been patched to no...
castiel248/Convert
Lib/site-packages/pip/_vendor/cachecontrol/compat.py
Python
mit
778
# SPDX-FileCopyrightText: 2015 Eric Larson # # SPDX-License-Identifier: Apache-2.0 """ The httplib2 algorithms ported for use with requests. """ import logging import re import calendar import time from email.utils import parsedate_tz from pip._vendor.requests.structures import CaseInsensitiveDict from .cache import...
castiel248/Convert
Lib/site-packages/pip/_vendor/cachecontrol/controller.py
Python
mit
16,416
# SPDX-FileCopyrightText: 2015 Eric Larson # # SPDX-License-Identifier: Apache-2.0 from tempfile import NamedTemporaryFile import mmap class CallbackFileWrapper(object): """ Small wrapper around a fp object which will tee everything read into a buffer, and when that file is closed it will execute a callb...
castiel248/Convert
Lib/site-packages/pip/_vendor/cachecontrol/filewrapper.py
Python
mit
3,946
# SPDX-FileCopyrightText: 2015 Eric Larson # # SPDX-License-Identifier: Apache-2.0 import calendar import time from email.utils import formatdate, parsedate, parsedate_tz from datetime import datetime, timedelta TIME_FMT = "%a, %d %b %Y %H:%M:%S GMT" def expire_after(delta, date=None): date = date or datetime...
castiel248/Convert
Lib/site-packages/pip/_vendor/cachecontrol/heuristics.py
Python
mit
4,154
# SPDX-FileCopyrightText: 2015 Eric Larson # # SPDX-License-Identifier: Apache-2.0 import base64 import io import json import zlib from pip._vendor import msgpack from pip._vendor.requests.structures import CaseInsensitiveDict from .compat import HTTPResponse, pickle, text_type def _b64_decode_bytes(b): return...
castiel248/Convert
Lib/site-packages/pip/_vendor/cachecontrol/serialize.py
Python
mit
7,105
# SPDX-FileCopyrightText: 2015 Eric Larson # # SPDX-License-Identifier: Apache-2.0 from .adapter import CacheControlAdapter from .cache import DictCache def CacheControl( sess, cache=None, cache_etags=True, serializer=None, heuristic=None, controller_class=None, adapter_class=None, ca...
castiel248/Convert
Lib/site-packages/pip/_vendor/cachecontrol/wrapper.py
Python
mit
774
from .core import contents, where __all__ = ["contents", "where"] __version__ = "2022.09.24"
castiel248/Convert
Lib/site-packages/pip/_vendor/certifi/__init__.py
Python
mit
94
import argparse from pip._vendor.certifi import contents, where parser = argparse.ArgumentParser() parser.add_argument("-c", "--contents", action="store_true") args = parser.parse_args() if args.contents: print(contents()) else: print(where())
castiel248/Convert
Lib/site-packages/pip/_vendor/certifi/__main__.py
Python
mit
255
# Issuer: CN=GlobalSign Root CA O=GlobalSign nv-sa OU=Root CA # Subject: CN=GlobalSign Root CA O=GlobalSign nv-sa OU=Root CA # Label: "GlobalSign Root CA" # Serial: 4835703278459707669005204 # MD5 Fingerprint: 3e:45:52:15:09:51:92:e1:b7:5d:37:9f:b1:87:29:8a # SHA1 Fingerprint: b1:bc:96:8b:d4:f4:9d:62:2a:a8:9a:81:f2:15...
castiel248/Convert
Lib/site-packages/pip/_vendor/certifi/cacert.pem
pem
mit
286,370
""" certifi.py ~~~~~~~~~~ This module returns the installation location of cacert.pem or its contents. """ import sys if sys.version_info >= (3, 11): from importlib.resources import as_file, files _CACERT_CTX = None _CACERT_PATH = None def where() -> str: # This is slightly terrible, but w...
castiel248/Convert
Lib/site-packages/pip/_vendor/certifi/core.py
Python
mit
4,279
######################## BEGIN LICENSE BLOCK ######################## # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later ve...
castiel248/Convert
Lib/site-packages/pip/_vendor/chardet/__init__.py
Python
mit
3,705
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
castiel248/Convert
Lib/site-packages/pip/_vendor/chardet/big5freq.py
Python
mit
31,274
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
castiel248/Convert
Lib/site-packages/pip/_vendor/chardet/big5prober.py
Python
mit
1,741
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
castiel248/Convert
Lib/site-packages/pip/_vendor/chardet/chardistribution.py
Python
mit
9,608
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
castiel248/Convert
Lib/site-packages/pip/_vendor/chardet/charsetgroupprober.py
Python
mit
3,817
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
castiel248/Convert
Lib/site-packages/pip/_vendor/chardet/charsetprober.py
Python
mit
4,801
castiel248/Convert
Lib/site-packages/pip/_vendor/chardet/cli/__init__.py
Python
mit
0
""" Script which takes one or more file paths and reports on their detected encodings Example:: % chardetect somefile someotherfile somefile: windows-1252 with confidence 0.5 someotherfile: ascii with confidence 1.0 If no paths are provided, it takes its input from stdin. """ import argparse import sy...
castiel248/Convert
Lib/site-packages/pip/_vendor/chardet/cli/chardetect.py
Python
mit
2,406
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. # # Con...
castiel248/Convert
Lib/site-packages/pip/_vendor/chardet/codingstatemachine.py
Python
mit
3,559
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. # # Con...
castiel248/Convert
Lib/site-packages/pip/_vendor/chardet/cp949prober.py
Python
mit
1,838
""" All of the Enums that are used throughout the chardet package. :author: Dan Blanchard (dan.blanchard@gmail.com) """ class InputState: """ This enum represents the different states a universal detector can be in. """ PURE_ASCII = 0 ESC_ASCII = 1 HIGH_BYTE = 2 class LanguageFilter: "...
castiel248/Convert
Lib/site-packages/pip/_vendor/chardet/enums.py
Python
mit
1,619
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. # # Con...
castiel248/Convert
Lib/site-packages/pip/_vendor/chardet/escprober.py
Python
mit
3,864
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. # # Con...
castiel248/Convert
Lib/site-packages/pip/_vendor/chardet/escsm.py
Python
mit
12,021
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. # # Con...
castiel248/Convert
Lib/site-packages/pip/_vendor/chardet/eucjpprober.py
Python
mit
3,676
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
castiel248/Convert
Lib/site-packages/pip/_vendor/chardet/euckrfreq.py
Python
mit
13,566
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. # # Con...
castiel248/Convert
Lib/site-packages/pip/_vendor/chardet/euckrprober.py
Python
mit
1,731
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
castiel248/Convert
Lib/site-packages/pip/_vendor/chardet/euctwfreq.py
Python
mit
36,913
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. # # Con...
castiel248/Convert
Lib/site-packages/pip/_vendor/chardet/euctwprober.py
Python
mit
1,731
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
castiel248/Convert
Lib/site-packages/pip/_vendor/chardet/gb2312freq.py
Python
mit
20,735
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. # # Con...
castiel248/Convert
Lib/site-packages/pip/_vendor/chardet/gb2312prober.py
Python
mit
1,737
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Shy Shalom # Portions created by the Initial Developer are Copyright (C) 2005 # the Initial Developer. All Rights Reserved. #...
castiel248/Convert
Lib/site-packages/pip/_vendor/chardet/hebrewprober.py
Python
mit
13,919