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 |
|---|---|---|---|---|---|
from json import loads, dumps
from typing import Any, Callable, Optional, Union
from .text import Text
from .highlighter import JSONHighlighter, NullHighlighter
class JSON:
"""A renderable which pretty prints JSON.
Args:
json (str): JSON encoded data.
indent (Union[None, int, str], optional)... | castiel248/Convert | Lib/site-packages/pip/_vendor/rich/json.py | Python | mit | 5,051 |
from typing import TYPE_CHECKING, Any, Dict, Iterable, List, Sequence
if TYPE_CHECKING:
from pip._vendor.rich.console import ConsoleRenderable
from . import get_console
from .segment import Segment
from .terminal_theme import DEFAULT_TERMINAL_THEME
if TYPE_CHECKING:
from pip._vendor.rich.console import Conso... | castiel248/Convert | Lib/site-packages/pip/_vendor/rich/jupyter.py | Python | mit | 3,252 |
from abc import ABC, abstractmethod
from itertools import islice
from operator import itemgetter
from threading import RLock
from typing import (
TYPE_CHECKING,
Dict,
Iterable,
List,
NamedTuple,
Optional,
Sequence,
Tuple,
Union,
)
from ._ratio import ratio_resolve
from .align import... | castiel248/Convert | Lib/site-packages/pip/_vendor/rich/layout.py | Python | mit | 14,074 |
import sys
from threading import Event, RLock, Thread
from types import TracebackType
from typing import IO, Any, Callable, List, Optional, TextIO, Type, cast
from . import get_console
from .console import Console, ConsoleRenderable, RenderableType, RenderHook
from .control import Control
from .file_proxy import FileP... | castiel248/Convert | Lib/site-packages/pip/_vendor/rich/live.py | Python | mit | 14,172 |
import sys
from typing import Optional, Tuple
if sys.version_info >= (3, 8):
from typing import Literal
else:
from pip._vendor.typing_extensions import Literal # pragma: no cover
from ._loop import loop_last
from .console import Console, ConsoleOptions, RenderableType, RenderResult
from .control import Cont... | castiel248/Convert | Lib/site-packages/pip/_vendor/rich/live_render.py | Python | mit | 3,667 |
import logging
from datetime import datetime
from logging import Handler, LogRecord
from pathlib import Path
from types import ModuleType
from typing import ClassVar, List, Optional, Iterable, Type, Union
from . import get_console
from ._log_render import LogRender, FormatTimeCallable
from .console import Console, Con... | castiel248/Convert | Lib/site-packages/pip/_vendor/rich/logging.py | Python | mit | 11,471 |
import re
from ast import literal_eval
from operator import attrgetter
from typing import Callable, Iterable, List, Match, NamedTuple, Optional, Tuple, Union
from ._emoji_replace import _emoji_replace
from .emoji import EmojiVariant
from .errors import MarkupError
from .style import Style
from .text import Span, Text
... | castiel248/Convert | Lib/site-packages/pip/_vendor/rich/markup.py | Python | mit | 8,198 |
from operator import itemgetter
from typing import TYPE_CHECKING, Callable, NamedTuple, Optional, Sequence
from . import errors
from .protocol import is_renderable, rich_cast
if TYPE_CHECKING:
from .console import Console, ConsoleOptions, RenderableType
class Measurement(NamedTuple):
"""Stores the minimum a... | castiel248/Convert | Lib/site-packages/pip/_vendor/rich/measure.py | Python | mit | 5,305 |
from typing import cast, List, Optional, Tuple, TYPE_CHECKING, Union
if TYPE_CHECKING:
from .console import (
Console,
ConsoleOptions,
RenderableType,
RenderResult,
)
from .jupyter import JupyterMixin
from .measure import Measurement
from .style import Style
from .segment import... | castiel248/Convert | Lib/site-packages/pip/_vendor/rich/padding.py | Python | mit | 4,970 |
from abc import ABC, abstractmethod
from typing import Any
class Pager(ABC):
"""Base class for a pager."""
@abstractmethod
def show(self, content: str) -> None:
"""Show content in pager.
Args:
content (str): Content to be displayed.
"""
class SystemPager(Pager):
... | castiel248/Convert | Lib/site-packages/pip/_vendor/rich/pager.py | Python | mit | 828 |
from math import sqrt
from functools import lru_cache
from typing import Sequence, Tuple, TYPE_CHECKING
from .color_triplet import ColorTriplet
if TYPE_CHECKING:
from pip._vendor.rich.table import Table
class Palette:
"""A palette of available colors."""
def __init__(self, colors: Sequence[Tuple[int, i... | castiel248/Convert | Lib/site-packages/pip/_vendor/rich/palette.py | Python | mit | 3,396 |
from typing import TYPE_CHECKING, Optional
from .align import AlignMethod
from .box import ROUNDED, Box
from .jupyter import JupyterMixin
from .measure import Measurement, measure_renderables
from .padding import Padding, PaddingDimensions
from .segment import Segment
from .style import StyleType
from .text import Tex... | castiel248/Convert | Lib/site-packages/pip/_vendor/rich/panel.py | Python | mit | 8,744 |
import builtins
import collections
import dataclasses
import inspect
import os
import sys
from array import array
from collections import Counter, UserDict, UserList, defaultdict, deque
from dataclasses import dataclass, fields, is_dataclass
from inspect import isclass
from itertools import islice
from types import Map... | castiel248/Convert | Lib/site-packages/pip/_vendor/rich/pretty.py | Python | mit | 36,576 |
import io
import sys
import typing
import warnings
from abc import ABC, abstractmethod
from collections import deque
from collections.abc import Sized
from dataclasses import dataclass, field
from datetime import timedelta
from io import RawIOBase, UnsupportedOperation
from math import ceil
from mmap import mmap
from o... | castiel248/Convert | Lib/site-packages/pip/_vendor/rich/progress.py | Python | mit | 59,746 |
import math
from functools import lru_cache
from time import monotonic
from typing import Iterable, List, Optional
from .color import Color, blend_rgb
from .color_triplet import ColorTriplet
from .console import Console, ConsoleOptions, RenderResult
from .jupyter import JupyterMixin
from .measure import Measurement
fr... | castiel248/Convert | Lib/site-packages/pip/_vendor/rich/progress_bar.py | Python | mit | 8,161 |
from typing import Any, Generic, List, Optional, TextIO, TypeVar, Union, overload
from . import get_console
from .console import Console
from .text import Text, TextType
PromptType = TypeVar("PromptType")
DefaultType = TypeVar("DefaultType")
class PromptError(Exception):
"""Exception base class for prompt relat... | castiel248/Convert | Lib/site-packages/pip/_vendor/rich/prompt.py | Python | mit | 11,303 |
from typing import Any, cast, Set, TYPE_CHECKING
from inspect import isclass
if TYPE_CHECKING:
from pip._vendor.rich.console import RenderableType
_GIBBERISH = """aihwerij235234ljsdnp34ksodfipwoe234234jlskjdf"""
def is_renderable(check_object: Any) -> bool:
"""Check if an object may be rendered by Rich."""
... | castiel248/Convert | Lib/site-packages/pip/_vendor/rich/protocol.py | Python | mit | 1,391 |
from typing import NamedTuple
class Region(NamedTuple):
"""Defines a rectangular region of the screen."""
x: int
y: int
width: int
height: int
| castiel248/Convert | Lib/site-packages/pip/_vendor/rich/region.py | Python | mit | 166 |
from functools import partial
import inspect
import sys
from typing import (
Any,
Callable,
Iterable,
List,
Optional,
overload,
Union,
Tuple,
Type,
TypeVar,
)
T = TypeVar("T")
Result = Iterable[Union[Any, Tuple[Any], Tuple[str, Any], Tuple[str, Any, Any]]]
RichReprResult = R... | castiel248/Convert | Lib/site-packages/pip/_vendor/rich/repr.py | Python | mit | 4,449 |
from typing import Union
from .align import AlignMethod
from .cells import cell_len, set_cell_size
from .console import Console, ConsoleOptions, RenderResult
from .jupyter import JupyterMixin
from .measure import Measurement
from .style import Style
from .text import Text
class Rule(JupyterMixin):
"""A console r... | castiel248/Convert | Lib/site-packages/pip/_vendor/rich/rule.py | Python | mit | 4,773 |
from collections.abc import Mapping
from typing import TYPE_CHECKING, Any, Optional, Tuple
from .highlighter import ReprHighlighter
from .panel import Panel
from .pretty import Pretty
from .table import Table
from .text import Text, TextType
if TYPE_CHECKING:
from .console import ConsoleRenderable
def render_sc... | castiel248/Convert | Lib/site-packages/pip/_vendor/rich/scope.py | Python | mit | 2,842 |
from typing import Optional, TYPE_CHECKING
from .segment import Segment
from .style import StyleType
from ._loop import loop_last
if TYPE_CHECKING:
from .console import (
Console,
ConsoleOptions,
RenderResult,
RenderableType,
Group,
)
class Screen:
"""A renderabl... | castiel248/Convert | Lib/site-packages/pip/_vendor/rich/screen.py | Python | mit | 1,591 |
from enum import IntEnum
from functools import lru_cache
from itertools import filterfalse
from logging import getLogger
from operator import attrgetter
from typing import (
TYPE_CHECKING,
Dict,
Iterable,
List,
NamedTuple,
Optional,
Sequence,
Tuple,
Type,
Union,
)
from .cells im... | castiel248/Convert | Lib/site-packages/pip/_vendor/rich/segment.py | Python | mit | 24,224 |
from typing import cast, List, Optional, TYPE_CHECKING, Union
from ._spinners import SPINNERS
from .measure import Measurement
from .table import Table
from .text import Text
if TYPE_CHECKING:
from .console import Console, ConsoleOptions, RenderResult, RenderableType
from .style import StyleType
class Spinn... | castiel248/Convert | Lib/site-packages/pip/_vendor/rich/spinner.py | Python | mit | 4,374 |
from types import TracebackType
from typing import Optional, Type
from .console import Console, RenderableType
from .jupyter import JupyterMixin
from .live import Live
from .spinner import Spinner
from .style import StyleType
class Status(JupyterMixin):
"""Displays a status indicator with a 'spinner' animation.
... | castiel248/Convert | Lib/site-packages/pip/_vendor/rich/status.py | Python | mit | 4,425 |
import sys
from functools import lru_cache
from marshal import dumps, loads
from random import randint
from typing import Any, Dict, Iterable, List, Optional, Type, Union, cast
from . import errors
from .color import Color, ColorParseError, ColorSystem, blend_rgb
from .repr import Result, rich_repr
from .terminal_them... | castiel248/Convert | Lib/site-packages/pip/_vendor/rich/style.py | Python | mit | 26,240 |
from typing import TYPE_CHECKING
from .measure import Measurement
from .segment import Segment
from .style import StyleType
if TYPE_CHECKING:
from .console import Console, ConsoleOptions, RenderResult, RenderableType
class Styled:
"""Apply a style to a renderable.
Args:
renderable (RenderableTy... | castiel248/Convert | Lib/site-packages/pip/_vendor/rich/styled.py | Python | mit | 1,258 |
import os.path
import platform
import re
import sys
import textwrap
from abc import ABC, abstractmethod
from typing import (
Any,
Dict,
Iterable,
List,
NamedTuple,
Optional,
Sequence,
Set,
Tuple,
Type,
Union,
)
from pip._vendor.pygments.lexer import Lexer
from pip._vendor.py... | castiel248/Convert | Lib/site-packages/pip/_vendor/rich/syntax.py | Python | mit | 34,697 |
from dataclasses import dataclass, field, replace
from typing import (
TYPE_CHECKING,
Dict,
Iterable,
List,
NamedTuple,
Optional,
Sequence,
Tuple,
Union,
)
from . import box, errors
from ._loop import loop_first_last, loop_last
from ._pick import pick_bool
from ._ratio import ratio_... | castiel248/Convert | Lib/site-packages/pip/_vendor/rich/table.py | Python | mit | 39,515 |
from typing import List, Optional, Tuple
from .color_triplet import ColorTriplet
from .palette import Palette
_ColorTuple = Tuple[int, int, int]
class TerminalTheme:
"""A color theme used when exporting console content.
Args:
background (Tuple[int, int, int]): The background color.
foregrou... | castiel248/Convert | Lib/site-packages/pip/_vendor/rich/terminal_theme.py | Python | mit | 3,370 |
import re
from functools import partial, reduce
from math import gcd
from operator import itemgetter
from typing import (
TYPE_CHECKING,
Any,
Callable,
Dict,
Iterable,
List,
NamedTuple,
Optional,
Tuple,
Union,
)
from ._loop import loop_last
from ._pick import pick_bool
from ._wr... | castiel248/Convert | Lib/site-packages/pip/_vendor/rich/text.py | Python | mit | 44,666 |
import configparser
from typing import Dict, List, IO, Mapping, Optional
from .default_styles import DEFAULT_STYLES
from .style import Style, StyleType
class Theme:
"""A container for style information, used by :class:`~rich.console.Console`.
Args:
styles (Dict[str, Style], optional): A mapping of s... | castiel248/Convert | Lib/site-packages/pip/_vendor/rich/theme.py | Python | mit | 3,627 |
from .default_styles import DEFAULT_STYLES
from .theme import Theme
DEFAULT = Theme(DEFAULT_STYLES)
| castiel248/Convert | Lib/site-packages/pip/_vendor/rich/themes.py | Python | mit | 102 |
from __future__ import absolute_import
import os
import platform
import sys
from dataclasses import dataclass, field
from traceback import walk_tb
from types import ModuleType, TracebackType
from typing import Any, Callable, Dict, Iterable, List, Optional, Sequence, Type, Union
from pip._vendor.pygments.lexers import... | castiel248/Convert | Lib/site-packages/pip/_vendor/rich/traceback.py | Python | mit | 26,060 |
from typing import Iterator, List, Optional, Tuple
from ._loop import loop_first, loop_last
from .console import Console, ConsoleOptions, RenderableType, RenderResult
from .jupyter import JupyterMixin
from .measure import Measurement
from .segment import Segment
from .style import Style, StyleStack, StyleType
from .st... | castiel248/Convert | Lib/site-packages/pip/_vendor/rich/tree.py | Python | mit | 9,169 |
# Copyright (c) 2010-2020 Benjamin Peterson
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publi... | castiel248/Convert | Lib/site-packages/pip/_vendor/six.py | Python | mit | 34,549 |
# Copyright 2016-2018 Julien Danjou
# Copyright 2017 Elisey Zanko
# Copyright 2016 Étienne Bersac
# Copyright 2016 Joshua Harlow
# Copyright 2013-2014 Ray Holder
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy... | castiel248/Convert | Lib/site-packages/pip/_vendor/tenacity/__init__.py | Python | mit | 18,364 |
# Copyright 2016 Étienne Bersac
# Copyright 2016 Julien Danjou
# Copyright 2016 Joshua Harlow
# Copyright 2013-2014 Ray Holder
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.a... | castiel248/Convert | Lib/site-packages/pip/_vendor/tenacity/_asyncio.py | Python | mit | 3,314 |
# Copyright 2016 Julien Danjou
# Copyright 2016 Joshua Harlow
# Copyright 2013-2014 Ray Holder
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#... | castiel248/Convert | Lib/site-packages/pip/_vendor/tenacity/_utils.py | Python | mit | 1,944 |
# Copyright 2016 Julien Danjou
# Copyright 2016 Joshua Harlow
# Copyright 2013-2014 Ray Holder
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#... | castiel248/Convert | Lib/site-packages/pip/_vendor/tenacity/after.py | Python | mit | 1,496 |
# Copyright 2016 Julien Danjou
# Copyright 2016 Joshua Harlow
# Copyright 2013-2014 Ray Holder
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#... | castiel248/Convert | Lib/site-packages/pip/_vendor/tenacity/before.py | Python | mit | 1,376 |
# Copyright 2016 Julien Danjou
# Copyright 2016 Joshua Harlow
# Copyright 2013-2014 Ray Holder
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#... | castiel248/Convert | Lib/site-packages/pip/_vendor/tenacity/before_sleep.py | Python | mit | 1,908 |
# Copyright 2016 Étienne Bersac
# Copyright 2016 Julien Danjou
# Copyright 2016 Joshua Harlow
# Copyright 2013-2014 Ray Holder
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.a... | castiel248/Convert | Lib/site-packages/pip/_vendor/tenacity/nap.py | Python | mit | 1,383 |
# Copyright 2016–2021 Julien Danjou
# Copyright 2016 Joshua Harlow
# Copyright 2013-2014 Ray Holder
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-... | castiel248/Convert | Lib/site-packages/pip/_vendor/tenacity/retry.py | Python | mit | 7,550 |
# Copyright 2016–2021 Julien Danjou
# Copyright 2016 Joshua Harlow
# Copyright 2013-2014 Ray Holder
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-... | castiel248/Convert | Lib/site-packages/pip/_vendor/tenacity/stop.py | Python | mit | 2,790 |
# Copyright 2017 Elisey Zanko
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, sof... | castiel248/Convert | Lib/site-packages/pip/_vendor/tenacity/tornadoweb.py | Python | mit | 2,145 |
# Copyright 2016–2021 Julien Danjou
# Copyright 2016 Joshua Harlow
# Copyright 2013-2014 Ray Holder
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-... | castiel248/Convert | Lib/site-packages/pip/_vendor/tenacity/wait.py | Python | mit | 8,011 |
# SPDX-License-Identifier: MIT
# SPDX-FileCopyrightText: 2021 Taneli Hukkinen
# Licensed to PSF under a Contributor Agreement.
__all__ = ("loads", "load", "TOMLDecodeError")
__version__ = "2.0.1" # DO NOT EDIT THIS LINE MANUALLY. LET bump2version UTILITY DO IT
from ._parser import TOMLDecodeError, load, loads
# Pre... | castiel248/Convert | Lib/site-packages/pip/_vendor/tomli/__init__.py | Python | mit | 396 |
# SPDX-License-Identifier: MIT
# SPDX-FileCopyrightText: 2021 Taneli Hukkinen
# Licensed to PSF under a Contributor Agreement.
from __future__ import annotations
from collections.abc import Iterable
import string
from types import MappingProxyType
from typing import Any, BinaryIO, NamedTuple
from ._re import (
R... | castiel248/Convert | Lib/site-packages/pip/_vendor/tomli/_parser.py | Python | mit | 22,633 |
# SPDX-License-Identifier: MIT
# SPDX-FileCopyrightText: 2021 Taneli Hukkinen
# Licensed to PSF under a Contributor Agreement.
from __future__ import annotations
from datetime import date, datetime, time, timedelta, timezone, tzinfo
from functools import lru_cache
import re
from typing import Any
from ._types import... | castiel248/Convert | Lib/site-packages/pip/_vendor/tomli/_re.py | Python | mit | 2,943 |
# SPDX-License-Identifier: MIT
# SPDX-FileCopyrightText: 2021 Taneli Hukkinen
# Licensed to PSF under a Contributor Agreement.
from typing import Any, Callable, Tuple
# Type annotations
ParseFloat = Callable[[str], Any]
Key = Tuple[str, ...]
Pos = int
| castiel248/Convert | Lib/site-packages/pip/_vendor/tomli/_types.py | Python | mit | 254 |
import abc
import collections
import collections.abc
import functools
import operator
import sys
import types as _types
import typing
__all__ = [
# Super-special typing primitives.
'Any',
'ClassVar',
'Concatenate',
'Final',
'LiteralString',
'ParamSpec',
'ParamSpecArgs',
'ParamSpecK... | castiel248/Convert | Lib/site-packages/pip/_vendor/typing_extensions.py | Python | mit | 80,114 |
"""
Python HTTP library with thread-safe connection pooling, file post support, user friendly, and more
"""
from __future__ import absolute_import
# Set default logging handler to avoid "No handler found" warnings.
import logging
import warnings
from logging import NullHandler
from . import exceptions
from ._version ... | castiel248/Convert | Lib/site-packages/pip/_vendor/urllib3/__init__.py | Python | mit | 3,333 |
from __future__ import absolute_import
try:
from collections.abc import Mapping, MutableMapping
except ImportError:
from collections import Mapping, MutableMapping
try:
from threading import RLock
except ImportError: # Platform-specific: No threads available
class RLock:
def __enter__(self):
... | castiel248/Convert | Lib/site-packages/pip/_vendor/urllib3/_collections.py | Python | mit | 10,811 |
# This file is protected via CODEOWNERS
__version__ = "1.26.12"
| castiel248/Convert | Lib/site-packages/pip/_vendor/urllib3/_version.py | Python | mit | 64 |
from __future__ import absolute_import
import datetime
import logging
import os
import re
import socket
import warnings
from socket import error as SocketError
from socket import timeout as SocketTimeout
from .packages import six
from .packages.six.moves.http_client import HTTPConnection as _HTTPConnection
from .pack... | castiel248/Convert | Lib/site-packages/pip/_vendor/urllib3/connection.py | Python | mit | 20,070 |
from __future__ import absolute_import
import errno
import logging
import re
import socket
import sys
import warnings
from socket import error as SocketError
from socket import timeout as SocketTimeout
from .connection import (
BaseSSLError,
BrokenPipeError,
DummyConnection,
HTTPConnection,
HTTPEx... | castiel248/Convert | Lib/site-packages/pip/_vendor/urllib3/connectionpool.py | Python | mit | 39,093 |
castiel248/Convert | Lib/site-packages/pip/_vendor/urllib3/contrib/__init__.py | Python | mit | 0 | |
"""
This module provides means to detect the App Engine environment.
"""
import os
def is_appengine():
return is_local_appengine() or is_prod_appengine()
def is_appengine_sandbox():
"""Reports if the app is running in the first generation sandbox.
The second generation runtimes are technically still i... | castiel248/Convert | Lib/site-packages/pip/_vendor/urllib3/contrib/_appengine_environ.py | Python | mit | 957 |
castiel248/Convert | Lib/site-packages/pip/_vendor/urllib3/contrib/_securetransport/__init__.py | Python | mit | 0 | |
"""
This module uses ctypes to bind a whole bunch of functions and constants from
SecureTransport. The goal here is to provide the low-level API to
SecureTransport. These are essentially the C-level functions and constants, and
they're pretty gross to work with.
This code is a bastardised version of the code found in ... | castiel248/Convert | Lib/site-packages/pip/_vendor/urllib3/contrib/_securetransport/bindings.py | Python | mit | 17,632 |
"""
Low-level helpers for the SecureTransport bindings.
These are Python functions that are not directly related to the high-level APIs
but are necessary to get them to work. They include a whole bunch of low-level
CoreFoundation messing about and memory management. The concerns in this module
are almost entirely abou... | castiel248/Convert | Lib/site-packages/pip/_vendor/urllib3/contrib/_securetransport/low_level.py | Python | mit | 13,922 |
"""
This module provides a pool manager that uses Google App Engine's
`URLFetch Service <https://cloud.google.com/appengine/docs/python/urlfetch>`_.
Example usage::
from pip._vendor.urllib3 import PoolManager
from pip._vendor.urllib3.contrib.appengine import AppEngineManager, is_appengine_sandbox
if is_a... | castiel248/Convert | Lib/site-packages/pip/_vendor/urllib3/contrib/appengine.py | Python | mit | 11,034 |
"""
NTLM authenticating pool, contributed by erikcederstran
Issue #10, see: http://code.google.com/p/urllib3/issues/detail?id=10
"""
from __future__ import absolute_import
import warnings
from logging import getLogger
from ntlm import ntlm
from .. import HTTPSConnectionPool
from ..packages.six.moves.http_client imp... | castiel248/Convert | Lib/site-packages/pip/_vendor/urllib3/contrib/ntlmpool.py | Python | mit | 4,538 |
"""
TLS with SNI_-support for Python 2. Follow these instructions if you would
like to verify TLS certificates in Python 2. Note, the default libraries do
*not* do certificate checking; you need to do additional work to validate
certificates yourself.
This needs the following packages installed:
* `pyOpenSSL`_ (teste... | castiel248/Convert | Lib/site-packages/pip/_vendor/urllib3/contrib/pyopenssl.py | Python | mit | 17,182 |
"""
SecureTranport support for urllib3 via ctypes.
This makes platform-native TLS available to urllib3 users on macOS without the
use of a compiler. This is an important feature because the Python Package
Index is moving to become a TLSv1.2-or-higher server, and the default OpenSSL
that ships with macOS is not capable... | castiel248/Convert | Lib/site-packages/pip/_vendor/urllib3/contrib/securetransport.py | Python | mit | 34,448 |
# -*- coding: utf-8 -*-
"""
This module contains provisional support for SOCKS proxies from within
urllib3. This module supports SOCKS4, SOCKS4A (an extension of SOCKS4), and
SOCKS5. To enable its functionality, either install PySocks or install this
module with the ``socks`` extra.
The SOCKS implementation supports t... | castiel248/Convert | Lib/site-packages/pip/_vendor/urllib3/contrib/socks.py | Python | mit | 7,097 |
from __future__ import absolute_import
from .packages.six.moves.http_client import IncompleteRead as httplib_IncompleteRead
# Base Exceptions
class HTTPError(Exception):
"""Base exception used by this module."""
pass
class HTTPWarning(Warning):
"""Base warning used by this module."""
pass
clas... | castiel248/Convert | Lib/site-packages/pip/_vendor/urllib3/exceptions.py | Python | mit | 8,217 |
from __future__ import absolute_import
import email.utils
import mimetypes
import re
from .packages import six
def guess_content_type(filename, default="application/octet-stream"):
"""
Guess the "Content-Type" of a file.
:param filename:
The filename to guess the "Content-Type" of using :mod:`m... | castiel248/Convert | Lib/site-packages/pip/_vendor/urllib3/fields.py | Python | mit | 8,579 |
from __future__ import absolute_import
import binascii
import codecs
import os
from io import BytesIO
from .fields import RequestField
from .packages import six
from .packages.six import b
writer = codecs.lookup("utf-8")[3]
def choose_boundary():
"""
Our embarrassingly-simple replacement for mimetools.choo... | castiel248/Convert | Lib/site-packages/pip/_vendor/urllib3/filepost.py | Python | mit | 2,440 |
castiel248/Convert | Lib/site-packages/pip/_vendor/urllib3/packages/__init__.py | Python | mit | 0 | |
castiel248/Convert | Lib/site-packages/pip/_vendor/urllib3/packages/backports/__init__.py | Python | mit | 0 | |
# -*- coding: utf-8 -*-
"""
backports.makefile
~~~~~~~~~~~~~~~~~~
Backports the Python 3 ``socket.makefile`` method for use with anything that
wants to create a "fake" socket object.
"""
import io
from socket import SocketIO
def backport_makefile(
self, mode="r", buffering=None, encoding=None, errors=None, newli... | castiel248/Convert | Lib/site-packages/pip/_vendor/urllib3/packages/backports/makefile.py | Python | mit | 1,417 |
# Copyright (c) 2010-2020 Benjamin Peterson
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publi... | castiel248/Convert | Lib/site-packages/pip/_vendor/urllib3/packages/six.py | Python | mit | 34,665 |
from __future__ import absolute_import
import collections
import functools
import logging
from ._collections import RecentlyUsedContainer
from .connectionpool import HTTPConnectionPool, HTTPSConnectionPool, port_by_scheme
from .exceptions import (
LocationValueError,
MaxRetryError,
ProxySchemeUnknown,
... | castiel248/Convert | Lib/site-packages/pip/_vendor/urllib3/poolmanager.py | Python | mit | 19,786 |
from __future__ import absolute_import
from .filepost import encode_multipart_formdata
from .packages.six.moves.urllib.parse import urlencode
__all__ = ["RequestMethods"]
class RequestMethods(object):
"""
Convenience mixin for classes who implement a :meth:`urlopen` method, such
as :class:`urllib3.HTTPC... | castiel248/Convert | Lib/site-packages/pip/_vendor/urllib3/request.py | Python | mit | 5,985 |
from __future__ import absolute_import
import io
import logging
import sys
import zlib
from contextlib import contextmanager
from socket import error as SocketError
from socket import timeout as SocketTimeout
brotli = None
from . import util
from ._collections import HTTPHeaderDict
from .connection import BaseSSLErr... | castiel248/Convert | Lib/site-packages/pip/_vendor/urllib3/response.py | Python | mit | 30,109 |
from __future__ import absolute_import
# For backwards compatibility, provide imports that used to be here.
from .connection import is_connection_dropped
from .request import SKIP_HEADER, SKIPPABLE_HEADERS, make_headers
from .response import is_fp_closed
from .retry import Retry
from .ssl_ import (
ALPN_PROTOCOLS,... | castiel248/Convert | Lib/site-packages/pip/_vendor/urllib3/util/__init__.py | Python | mit | 1,155 |
from __future__ import absolute_import
import socket
from ..contrib import _appengine_environ
from ..exceptions import LocationParseError
from ..packages import six
from .wait import NoWayToWaitForSocketError, wait_for_read
def is_connection_dropped(conn): # Platform-specific
"""
Returns True if the connec... | castiel248/Convert | Lib/site-packages/pip/_vendor/urllib3/util/connection.py | Python | mit | 4,901 |
from .ssl_ import create_urllib3_context, resolve_cert_reqs, resolve_ssl_version
def connection_requires_http_tunnel(
proxy_url=None, proxy_config=None, destination_scheme=None
):
"""
Returns True if the connection requires an HTTP CONNECT through the proxy.
:param URL proxy_url:
URL of the p... | castiel248/Convert | Lib/site-packages/pip/_vendor/urllib3/util/proxy.py | Python | mit | 1,605 |
import collections
from ..packages import six
from ..packages.six.moves import queue
if six.PY2:
# Queue is imported for side effects on MS Windows. See issue #229.
import Queue as _unused_module_Queue # noqa: F401
class LifoQueue(queue.Queue):
def _init(self, _):
self.queue = collections.deque... | castiel248/Convert | Lib/site-packages/pip/_vendor/urllib3/util/queue.py | Python | mit | 498 |
from __future__ import absolute_import
from base64 import b64encode
from ..exceptions import UnrewindableBodyError
from ..packages.six import b, integer_types
# Pass as a value within ``headers`` to skip
# emitting some HTTP headers that are added automatically.
# The only headers that are supported are ``Accept-Enc... | castiel248/Convert | Lib/site-packages/pip/_vendor/urllib3/util/request.py | Python | mit | 3,997 |
from __future__ import absolute_import
from email.errors import MultipartInvariantViolationDefect, StartBoundaryNotFoundDefect
from ..exceptions import HeaderParsingError
from ..packages.six.moves import http_client as httplib
def is_fp_closed(obj):
"""
Checks whether a given file-like object is closed.
... | castiel248/Convert | Lib/site-packages/pip/_vendor/urllib3/util/response.py | Python | mit | 3,510 |
from __future__ import absolute_import
import email
import logging
import re
import time
import warnings
from collections import namedtuple
from itertools import takewhile
from ..exceptions import (
ConnectTimeoutError,
InvalidHeader,
MaxRetryError,
ProtocolError,
ProxyError,
ReadTimeoutError,... | castiel248/Convert | Lib/site-packages/pip/_vendor/urllib3/util/retry.py | Python | mit | 22,001 |
from __future__ import absolute_import
import hmac
import os
import sys
import warnings
from binascii import hexlify, unhexlify
from hashlib import md5, sha1, sha256
from ..exceptions import (
InsecurePlatformWarning,
ProxySchemeUnsupported,
SNIMissingWarning,
SSLError,
)
from ..packages import six
fr... | castiel248/Convert | Lib/site-packages/pip/_vendor/urllib3/util/ssl_.py | Python | mit | 17,177 |
"""The match_hostname() function from Python 3.3.3, essential when using SSL."""
# Note: This file is under the PSF license as the code comes from the python
# stdlib. http://docs.python.org/3/license.html
import re
import sys
# ipaddress has been backported to 2.6+ in pypi. If it is installed on the
# system, us... | castiel248/Convert | Lib/site-packages/pip/_vendor/urllib3/util/ssl_match_hostname.py | Python | mit | 5,758 |
import io
import socket
import ssl
from ..exceptions import ProxySchemeUnsupported
from ..packages import six
SSL_BLOCKSIZE = 16384
class SSLTransport:
"""
The SSLTransport wraps an existing socket and establishes an SSL connection.
Contrary to Python's implementation of SSLSocket, it allows you to cha... | castiel248/Convert | Lib/site-packages/pip/_vendor/urllib3/util/ssltransport.py | Python | mit | 6,895 |
from __future__ import absolute_import
import time
# The default socket timeout, used by httplib to indicate that no timeout was
# specified by the user
from socket import _GLOBAL_DEFAULT_TIMEOUT
from ..exceptions import TimeoutStateError
# A sentinel value to indicate that no timeout was specified by the user in
#... | castiel248/Convert | Lib/site-packages/pip/_vendor/urllib3/util/timeout.py | Python | mit | 10,003 |
from __future__ import absolute_import
import re
from collections import namedtuple
from ..exceptions import LocationParseError
from ..packages import six
url_attrs = ["scheme", "auth", "host", "port", "path", "query", "fragment"]
# We only want to normalize urls with an HTTP(S) scheme.
# urllib3 infers URLs withou... | castiel248/Convert | Lib/site-packages/pip/_vendor/urllib3/util/url.py | Python | mit | 14,287 |
import errno
import select
import sys
from functools import partial
try:
from time import monotonic
except ImportError:
from time import time as monotonic
__all__ = ["NoWayToWaitForSocketError", "wait_for_read", "wait_for_write"]
class NoWayToWaitForSocketError(Exception):
pass
# How should we wait on... | castiel248/Convert | Lib/site-packages/pip/_vendor/urllib3/util/wait.py | Python | mit | 5,403 |
CacheControl==0.12.11 # Make sure to update the license in pyproject.toml for this.
colorama==0.4.5
distlib==0.3.6
distro==1.7.0
msgpack==1.0.4
packaging==21.3
pep517==0.13.0
platformdirs==2.5.2
pyparsing==3.0.9
requests==2.28.1
certifi==2022.09.24
chardet==5.0.0
idna==3.4
urllib3==1.26.12
rich==12.5.1... | castiel248/Convert | Lib/site-packages/pip/_vendor/vendor.txt | Text | mit | 469 |
# coding: utf-8
"""
webencodings
~~~~~~~~~~~~
This is a Python implementation of the `WHATWG Encoding standard
<http://encoding.spec.whatwg.org/>`. See README for details.
:copyright: Copyright 2012 by Simon Sapin
:license: BSD, see LICENSE for details.
"""
from __future__ import unicode_li... | castiel248/Convert | Lib/site-packages/pip/_vendor/webencodings/__init__.py | Python | mit | 10,579 |
"""
webencodings.labels
~~~~~~~~~~~~~~~~~~~
Map encoding labels to their name.
:copyright: Copyright 2012 by Simon Sapin
:license: BSD, see LICENSE for details.
"""
# XXX Do not edit!
# This file is automatically generated by mklabels.py
LABELS = {
'unicode-1-1-utf-8': 'utf-8',
'utf-... | castiel248/Convert | Lib/site-packages/pip/_vendor/webencodings/labels.py | Python | mit | 8,979 |
"""
webencodings.mklabels
~~~~~~~~~~~~~~~~~~~~~
Regenarate the webencodings.labels module.
:copyright: Copyright 2012 by Simon Sapin
:license: BSD, see LICENSE for details.
"""
import json
try:
from urllib import urlopen
except ImportError:
from urllib.request import urlopen
def asser... | castiel248/Convert | Lib/site-packages/pip/_vendor/webencodings/mklabels.py | Python | mit | 1,305 |
# coding: utf-8
"""
webencodings.tests
~~~~~~~~~~~~~~~~~~
A basic test suite for Encoding.
:copyright: Copyright 2012 by Simon Sapin
:license: BSD, see LICENSE for details.
"""
from __future__ import unicode_literals
from . import (lookup, LABELS, decode, encode, iter_decode, iter_encode,
... | castiel248/Convert | Lib/site-packages/pip/_vendor/webencodings/tests.py | Python | mit | 6,563 |
# coding: utf-8
"""
webencodings.x_user_defined
~~~~~~~~~~~~~~~~~~~~~~~~~~~
An implementation of the x-user-defined encoding.
:copyright: Copyright 2012 by Simon Sapin
:license: BSD, see LICENSE for details.
"""
from __future__ import unicode_literals
import codecs
### Codec APIs
class Code... | castiel248/Convert | Lib/site-packages/pip/_vendor/webencodings/x_user_defined.py | Python | mit | 4,307 |
pip is a command line program. While it is implemented in Python, and so is
available for import, you must not use pip's internal APIs in this way. Typing
information is provided as a convenience only and is not a guarantee. Expect
unannounced changes to the API and types in releases.
| castiel248/Convert | Lib/site-packages/pip/py.typed | typed | mit | 286 |
"""
Package resource API
--------------------
A resource is a logical file contained within a package, or a logical
subdirectory thereof. The package resource API expects resource names
to have their path parts separated with ``/``, *not* whatever the local
path separator is. Do not use os.path operations to manipul... | castiel248/Convert | Lib/site-packages/pkg_resources/__init__.py | Python | mit | 108,568 |
castiel248/Convert | Lib/site-packages/pkg_resources/_vendor/__init__.py | Python | mit | 0 | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2005-2010 ActiveState Software Inc.
# Copyright (c) 2013 Eddy Petrișor
"""Utilities for determining application-specific dirs.
See <http://github.com/ActiveState/appdirs> for details and usage.
"""
# Dev Notes:
# - MSDN on where to store app data files:
# ... | castiel248/Convert | Lib/site-packages/pkg_resources/_vendor/appdirs.py | Python | mit | 24,701 |