text
stringlengths
0
20k
#!/usr/bin/env python # # Author: Mike McKerns (mmckerns @caltech and @uqfoundation) # Copyright (c) 2008-2016 California Institute of Technology. # Copyright (c) 2016-2025 The Uncertainty Quantification Foundation. # License: 3-clause BSD. The full license text is available at: # - https://github.com/uqfoundation/di...
#!/usr/bin/env python # # Author: Mike McKerns (mmckerns @caltech and @uqfoundation) # Copyright (c) 2008-2016 California Institute of Technology. # Copyright (c) 2016-2025 The Uncertainty Quantification Foundation. # License: 3-clause BSD. The full license text is available at: # - https://github.com/uqfoundation/di...
#!/usr/bin/env python # # Author: Mike McKerns (mmckerns @caltech and @uqfoundation) # Copyright (c) 2021-2025 The Uncertainty Quantification Foundation. # License: 3-clause BSD. The full license text is available at: # - https://github.com/uqfoundation/dill/blob/master/LICENSE import dill dill.settings['recurse'] =...
#!/usr/bin/env python # # Author: Mike McKerns (mmckerns @caltech and @uqfoundation) # Copyright (c) 2023-2025 The Uncertainty Quantification Foundation. # License: 3-clause BSD. The full license text is available at: # - https://github.com/uqfoundation/dill/blob/master/LICENSE """ test dill's ability to pickle abstr...
#!/usr/bin/env python # # Author: Mike McKerns (mmckerns @caltech and @uqfoundation) # Copyright (c) 2008-2016 California Institute of Technology. # Copyright (c) 2016-2025 The Uncertainty Quantification Foundation. # License: 3-clause BSD. The full license text is available at: # - https://github.com/uqfoundation/di...
#!/usr/bin/env python # # Author: Mike McKerns (mmckerns @caltech and @uqfoundation) # Copyright (c) 2008-2016 California Institute of Technology. # Copyright (c) 2016-2025 The Uncertainty Quantification Foundation. # License: 3-clause BSD. The full license text is available at: # - https://github.com/uqfoundation/di...
#!/usr/bin/env python # # Author: Mike McKerns (mmckerns @caltech and @uqfoundation) # Copyright (c) 2008-2016 California Institute of Technology. # Copyright (c) 2016-2025 The Uncertainty Quantification Foundation. # License: 3-clause BSD. The full license text is available at: # - https://github.com/uqfoundation/di...
"""Utility functions for aiohappyeyeballs.""" import ipaddress import socket from typing import Dict, List, Optional, Tuple, Union from .types import AddrInfoType def addr_to_addr_infos( addr: Optional[ Union[Tuple[str, int, int, int], Tuple[str, int, int], Tuple[str, int]] ], ) -> Optional[List[Add...
import asyncio import contextlib # PY3.9: Import Callable from typing until we drop Python 3.9 support # https://github.com/python/cpython/issues/87131 from typing import ( TYPE_CHECKING, Any, Awaitable, Callable, Iterable, List, Optional, Set, Tuple, TypeVar, Union, ) _T =...
"""Base implementation.""" import asyncio import collections import contextlib import functools import itertools import socket from typing import List, Optional, Sequence, Set, Union from . import _staggered from .types import AddrInfoType, SocketFactoryType async def start_connection( addr_infos: Sequence[Addr...
__version__ = "2.6.1" from .impl import start_connection from .types import AddrInfoType, SocketFactoryType from .utils import addr_to_addr_infos, pop_addr_infos_interleave, remove_addr_infos __all__ = ( "AddrInfoType", "SocketFactoryType", "addr_to_addr_infos", "pop_addr_infos_interleave", "remov...
"""Types for aiohappyeyeballs.""" import socket # PY3.9: Import Callable from typing until we drop Python 3.9 support # https://github.com/python/cpython/issues/87131 from typing import Callable, Tuple, Union AddrInfoType = Tuple[ Union[int, socket.AddressFamily], Union[int, socket.SocketKind], int, ...
multidict
from __future__ import annotations from collections.abc import AsyncIterator from contextlib import AbstractContextManager from signal import Signals from ._eventloop import get_async_backend def open_signal_receiver( *signals: Signals, ) -> AbstractContextManager[AsyncIterator[Signals]]: """ Start rece...
from __future__ import annotations import math from collections.abc import Generator from contextlib import contextmanager from types import TracebackType from ..abc._tasks import TaskGroup, TaskStatus from ._eventloop import get_async_backend class _IgnoredTaskStatus(TaskStatus[object]): def started(self, valu...
from __future__ import annotations import math from typing import TypeVar from warnings import warn from ..streams.memory import ( MemoryObjectReceiveStream, MemoryObjectSendStream, _MemoryObjectStreamState, ) T_Item = TypeVar("T_Item") class create_memory_object_stream( tuple[MemoryObjectSendStrea...
from __future__ import annotations from abc import abstractmethod from contextlib import AbstractAsyncContextManager, AbstractContextManager from inspect import isasyncgen, iscoroutine, isgenerator from types import TracebackType from typing import Protocol, TypeVar, cast, final _T_co = TypeVar("_T_co", covariant=Tru...
from __future__ import annotations from ..abc import AsyncResource from ._tasks import CancelScope async def aclose_forcefully(resource: AsyncResource) -> None: """ Close an asynchronous resource in a cancelled scope. Doing this closes the resource without waiting on anything. :param resource: the ...
from __future__ import annotations import os import sys import tempfile from collections.abc import Iterable from io import BytesIO, TextIOWrapper from types import TracebackType from typing import ( TYPE_CHECKING, Any, AnyStr, Generic, overload, ) from .. import to_thread from .._core._fileio imp...
from __future__ import annotations from collections.abc import Callable, Mapping from typing import Any, TypeVar, final, overload from ._exceptions import TypedAttributeLookupError T_Attr = TypeVar("T_Attr") T_Default = TypeVar("T_Default") undefined = object() def typed_attribute() -> Any: """Return a unique ...
from __future__ import annotations import sys from collections.abc import AsyncIterable, Iterable, Mapping, Sequence from io import BytesIO from os import PathLike from subprocess import PIPE, CalledProcessError, CompletedProcess from typing import IO, Any, Union, cast from ..abc import Process from ._eventloop impor...
from __future__ import annotations from collections.abc import Awaitable, Generator from typing import Any, cast from ._eventloop import get_async_backend class TaskInfo: """ Represents an asynchronous task. :ivar int id: the unique identifier of the task :ivar parent_id: the identifier of the pare...
from __future__ import annotations import math import sys import threading from collections.abc import Awaitable, Callable, Generator from contextlib import contextmanager from contextvars import Token from importlib import import_module from typing import TYPE_CHECKING, Any, TypeVar if sys.version_info >= (3, 11): ...
from __future__ import annotations import asyncio import socket import threading from collections.abc import Callable from selectors import EVENT_READ, EVENT_WRITE, DefaultSelector from typing import TYPE_CHECKING, Any if TYPE_CHECKING: from _typeshed import FileDescriptorLike _selector_lock = threading.Lock() _...
from __future__ import annotations import sys from collections.abc import Generator from textwrap import dedent from typing import Any if sys.version_info < (3, 11): from exceptiongroup import BaseExceptionGroup class BrokenResourceError(Exception): """ Raised when trying to use a resource that has been...
from __future__ import annotations __all__ = ( "current_default_process_limiter", "process_worker", "run_sync", ) import os import pickle import subprocess import sys from collections import deque from collections.abc import Callable from importlib.util import module_from_spec, spec_from_file_location fro...
from __future__ import annotations __all__ = ( "EventLoopToken", "RunvarToken", "RunVar", "checkpoint", "checkpoint_if_cancelled", "cancel_shielded_checkpoint", "current_token", ) import enum from dataclasses import dataclass from types import TracebackType from typing import Any, Generic,...
from __future__ import annotations __all__ = ( "run_sync", "current_default_thread_limiter", ) import sys from collections.abc import Callable from typing import TypeVar from warnings import warn from ._core._eventloop import get_async_backend from .abc import CapacityLimiter if sys.version_info >= (3, 11):...
from __future__ import annotations __all__ = ( "AsyncCacheInfo", "AsyncCacheParameters", "AsyncLRUCacheWrapper", "cache", "lru_cache", "reduce", ) import functools import sys from collections import OrderedDict from collections.abc import ( AsyncIterable, Awaitable, Callable, C...
from __future__ import annotations __all__ = ( "BlockingPortal", "BlockingPortalProvider", "check_cancelled", "run", "run_sync", "start_blocking_portal", ) import sys from collections.abc import Awaitable, Callable, Generator from concurrent.futures import Future from contextlib import ( A...
from __future__ import annotations import socket import sys from collections.abc import Callable, Generator, Iterator from contextlib import ExitStack, contextmanager from inspect import isasyncgenfunction, iscoroutinefunction, ismethod from typing import Any, cast import pytest from _pytest.fixtures import SubReques...
from __future__ import annotations from ._core._contextmanagers import AsyncContextManagerMixin as AsyncContextManagerMixin from ._core._contextmanagers import ContextManagerMixin as ContextManagerMixin from ._core._eventloop import current_time as current_time from ._core._eventloop import get_all_backends as get_all...
from __future__ import annotations __all__ = ( "run_sync", "current_default_interpreter_limiter", ) import atexit import os import sys from collections import deque from collections.abc import Callable from typing import Any, Final, TypeVar from . import current_time, to_thread from ._core._exceptions import...
from __future__ import annotations __all__ = ( "TextConnectable", "TextReceiveStream", "TextSendStream", "TextStream", ) import codecs import sys from collections.abc import Callable, Mapping from dataclasses import InitVar, dataclass, field from typing import Any from ..abc import ( AnyByteRecei...
from __future__ import annotations __all__ = ( "BufferedByteReceiveStream", "BufferedByteStream", "BufferedConnectable", ) import sys from collections.abc import Callable, Iterable, Mapping from dataclasses import dataclass, field from typing import Any, SupportsIndex from .. import ClosedResourceError, ...
from __future__ import annotations __all__ = ( "FileReadStream", "FileStreamAttribute", "FileWriteStream", ) from collections.abc import Callable, Mapping from io import SEEK_SET, UnsupportedOperation from os import PathLike from pathlib import Path from typing import Any, BinaryIO, cast from .. import (...
from __future__ import annotations __all__ = ( "TLSAttribute", "TLSConnectable", "TLSListener", "TLSStream", ) import logging import re import ssl import sys from collections.abc import Callable, Mapping from dataclasses import dataclass from functools import wraps from ssl import SSLContext from typi...
from __future__ import annotations __all__ = ( "MultiListener", "StapledByteStream", "StapledObjectStream", ) from collections.abc import Callable, Mapping, Sequence from dataclasses import dataclass from typing import Any, Generic, TypeVar from ..abc import ( ByteReceiveStream, ByteSendStream, ...
from __future__ import annotations __all__ = ( "MemoryObjectReceiveStream", "MemoryObjectSendStream", "MemoryObjectStreamStatistics", ) import warnings from collections import OrderedDict, deque from dataclasses import dataclass, field from types import TracebackType from typing import Generic, NamedTuple...
from __future__ import annotations import sys from abc import ABCMeta, abstractmethod from collections.abc import Awaitable, Callable from types import TracebackType from typing import TYPE_CHECKING, Any, Protocol, overload if sys.version_info >= (3, 13): from typing import TypeVar else: from typing_extension...
from __future__ import annotations import sys from abc import ABCMeta, abstractmethod from collections.abc import Callable from typing import Any, Generic, TypeVar, Union from .._core._exceptions import EndOfStream from .._core._typedattr import TypedAttributeProvider from ._resources import AsyncResource from ._task...
from __future__ import annotations from abc import ABCMeta, abstractmethod from types import TracebackType from typing import TypeVar T = TypeVar("T") class AsyncResource(metaclass=ABCMeta): """ Abstract base class for all closeable asynchronous resources. Works as an asynchronous context manager which...
from __future__ import annotations import errno import socket import sys from abc import abstractmethod from collections.abc import Callable, Collection, Mapping from contextlib import AsyncExitStack from io import IOBase from ipaddress import IPv4Address, IPv6Address from socket import AddressFamily from typing impor...
from __future__ import annotations from abc import abstractmethod from signal import Signals from ._resources import AsyncResource from ._streams import ByteReceiveStream, ByteSendStream class Process(AsyncResource): """An asynchronous version of :class:`subprocess.Popen`.""" @abstractmethod async def ...
from __future__ import annotations from ._eventloop import AsyncBackend as AsyncBackend from ._resources import AsyncResource as AsyncResource from ._sockets import ConnectedUDPSocket as ConnectedUDPSocket from ._sockets import ConnectedUNIXDatagramSocket as ConnectedUNIXDatagramSocket from ._sockets import IPAddressT...
from __future__ import annotations import types from abc import ABCMeta, abstractmethod from collections.abc import AsyncGenerator, Callable, Coroutine, Iterable from typing import Any, TypeVar _T = TypeVar("_T") class TestRunner(metaclass=ABCMeta): """ Encapsulates a running event loop. Every call made thr...
from __future__ import annotations import math import sys from abc import ABCMeta, abstractmethod from collections.abc import AsyncIterator, Awaitable, Callable, Sequence from contextlib import AbstractContextManager from os import PathLike from signal import Signals from socket import AddressFamily, SocketKind, socke...
The MIT License (MIT) Copyright (c) 2016 Nathaniel J. Smith <njs@pobox.com> and other contributors 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 limitatio...
h11
MIT License Copyright (c) 2008-2020 Andrey Petrov and contributors. 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, modi...
@Switch01 A_Rog Aakanksha Agrawal Abhinav Sagar ABHYUDAY PRATAP SINGH abs51295 AceGentile Adam Chainz Adam Tse Adam Wentz admin Adrien Morison ahayrapetyan Ahilya AinsworthK Akash Srivastava Alan Yee Albert Tugushev Albert-Guan albertg Alberto Sottile Aleks Bunin Ales Erjavec Alethea Flowers Alex Gaynor Alex Grönholm A...
pip
Copyright (c) 2008-present The pip developers (see AUTHORS.txt file) 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, modi...
[console_scripts] pip = pip._internal.cli.main:main pip3 = pip._internal.cli.main:main pip3.12 = pip._internal.cli.main:main
datasets
[console_scripts] datasets-cli = datasets.commands.datasets_cli:main
from __future__ import annotations import binascii import codecs import os import typing from io import BytesIO from .fields import _TYPE_FIELD_VALUE_TUPLE, RequestField writer = codecs.lookup("utf-8")[3] _TYPE_FIELDS_SEQUENCE = typing.Sequence[ typing.Union[tuple[str, _TYPE_FIELD_VALUE_TUPLE], RequestField] ] ...
from __future__ import annotations import email import logging import random import re import time import typing from itertools import takewhile from types import TracebackType from ..exceptions import ( ConnectTimeoutError, InvalidHeader, MaxRetryError, ProtocolError, ProxyError, ReadTimeoutE...
from __future__ import annotations import typing from .url import Url if typing.TYPE_CHECKING: from ..connection import ProxyConfig def connection_requires_http_tunnel( proxy_url: Url | None = None, proxy_config: ProxyConfig | None = None, destination_scheme: str | None = None, ) -> bool: """ ...
from __future__ import annotations import socket import typing from ..exceptions import LocationParseError from .timeout import _DEFAULT_TIMEOUT, _TYPE_TIMEOUT _TYPE_SOCKET_OPTIONS = list[tuple[int, int, typing.Union[int, bytes]]] if typing.TYPE_CHECKING: from .._base_connection import BaseHTTPConnection def ...
from __future__ import annotations import re import typing from ..exceptions import LocationParseError from .util import to_str # We only want to normalize urls with an HTTP(S) scheme. # urllib3 infers URLs without a scheme (None) to be http. _NORMALIZABLE_SCHEMES = ("http", "https", None) # Almost all of these pat...
from __future__ import annotations import http.client as httplib from email.errors import MultipartInvariantViolationDefect, StartBoundaryNotFoundDefect from ..exceptions import HeaderParsingError def is_fp_closed(obj: object) -> bool: """ Checks whether a given file-like object is closed. :param obj: ...
from __future__ import annotations import hashlib import hmac import os import socket import sys import typing import warnings from binascii import unhexlify from ..exceptions import ProxySchemeUnsupported, SSLError from .url import _BRACELESS_IPV6_ADDRZ_RE, _IPV4_RE SSLContext = None SSLTransport = None HAS_NEVER_C...
from __future__ import annotations import io import socket import ssl import typing from ..exceptions import ProxySchemeUnsupported if typing.TYPE_CHECKING: from typing_extensions import Self from .ssl_ import _TYPE_PEER_CERT_RET, _TYPE_PEER_CERT_RET_DICT _WriteBuffer = typing.Union[bytearray, memoryview]...
"""The match_hostname() function from Python 3.5, 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 # It is modified to remove commonName support. from __future__ import annotations import ipaddress import re im...
from __future__ import annotations import io import sys import typing from base64 import b64encode from enum import Enum from ..exceptions import UnrewindableBodyError from .util import to_bytes if typing.TYPE_CHECKING: from typing import Final # Pass as a value within ``headers`` to skip # emitting some HTTP h...
# For backwards compatibility, provide imports that used to be here. from __future__ import annotations 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, ...
from __future__ import annotations import time import typing from enum import Enum from socket import getdefaulttimeout from ..exceptions import TimeoutStateError if typing.TYPE_CHECKING: from typing import Final class _TYPE_DEFAULT(Enum): # This value should never be passed to socket.settimeout() so for s...
from __future__ import annotations import typing from types import TracebackType def to_bytes( x: str | bytes, encoding: str | None = None, errors: str | None = None ) -> bytes: if isinstance(x, bytes): return x elif not isinstance(x, str): raise TypeError(f"not expecting type {type(x).__...
from __future__ import annotations import select import socket from functools import partial __all__ = ["wait_for_read", "wait_for_write"] # How should we wait on sockets? # # There are two types of APIs you can use for waiting on sockets: the fancy # modern stateful APIs like epoll/kqueue, and the older stateless ...
from __future__ import annotations import typing from collections import OrderedDict from enum import Enum, auto from threading import RLock if typing.TYPE_CHECKING: # We can only import Protocol if TYPE_CHECKING because it's a development # dependency, and is not available at runtime. from typing import ...
""" Python HTTP library with thread-safe connection pooling, file post support, user friendly, and more """ from __future__ import annotations # Set default logging handler to avoid "No handler found" warnings. import logging import sys import typing import warnings from logging import NullHandler from . import exce...
""" 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 the full range of urllib3...
from __future__ import annotations import os import typing # use http.client.HTTPException for consistency with non-emscripten from http.client import HTTPException as HTTPException # noqa: F401 from http.client import ResponseNotReady from ..._base_connection import _TYPE_BODY from ...connection import HTTPConnect...
from __future__ import annotations import json as _json import logging import typing from contextlib import contextmanager from dataclasses import dataclass from http.client import HTTPException as HTTPException from io import BytesIO, IOBase from ...exceptions import InvalidHeader, TimeoutError from ...response impo...
let Status = { SUCCESS_HEADER: -1, SUCCESS_EOF: -2, ERROR_TIMEOUT: -3, ERROR_EXCEPTION: -4, }; let connections = new Map(); let nextConnectionID = 1; const encoder = new TextEncoder(); self.addEventListener("message", async function (event) { if (event.data.close) { let connectionID = event.data.close; ...
from __future__ import annotations from dataclasses import dataclass, field from ..._base_connection import _TYPE_BODY @dataclass class EmscriptenRequest: method: str url: str params: dict[str, str] | None = None body: _TYPE_BODY | None = None headers: dict[str, str] = field(default_factory=dict...
from __future__ import annotations import urllib3.connection from ...connectionpool import HTTPConnectionPool, HTTPSConnectionPool from .connection import EmscriptenHTTPConnection, EmscriptenHTTPSConnection def inject_into_urllib3() -> None: # override connection classes to use emscripten specific classes #...
""" Module for using pyOpenSSL as a TLS backend. This module was relevant before the standard library ``ssl`` module supported SNI, but now that we've dropped support for Python 2.7 all relevant Python versions support SNI so **this module is no longer recommended**. This needs the following packages installed: * `py...
from __future__ import annotations import email.utils import mimetypes import typing _TYPE_FIELD_VALUE = typing.Union[str, bytes] _TYPE_FIELD_VALUE_TUPLE = typing.Union[ _TYPE_FIELD_VALUE, tuple[str, _TYPE_FIELD_VALUE], tuple[str, _TYPE_FIELD_VALUE, str], ] def guess_content_type( filename: str | No...
from __future__ import annotations import socket import typing import warnings from email.errors import MessageDefect from http.client import IncompleteRead as httplib_IncompleteRead if typing.TYPE_CHECKING: from .connection import HTTPConnection from .connectionpool import ConnectionPool from .response i...
from __future__ import annotations import json as _json import typing from urllib.parse import urlencode from ._base_connection import _TYPE_BODY from ._collections import HTTPHeaderDict from .filepost import _TYPE_FIELDS, encode_multipart_formdata from .response import BaseHTTPResponse __all__ = ["RequestMethods"] ...
# file generated by setuptools-scm # don't change, don't track in version control __all__ = [ "__version__", "__version_tuple__", "version", "version_tuple", "__commit_id__", "commit_id", ] TYPE_CHECKING = False if TYPE_CHECKING: from typing import Tuple from typing import Union V...
from __future__ import annotations import logging import re import threading import types import typing import h2.config # type: ignore[import-untyped] import h2.connection # type: ignore[import-untyped] import h2.events # type: ignore[import-untyped] from .._base_connection import _TYPE_BODY from .._collections ...
from __future__ import annotations import threading class _HTTP2ProbeCache: __slots__ = ( "_lock", "_cache_locks", "_cache_values", ) def __init__(self) -> None: self._lock = threading.Lock() self._cache_locks: dict[tuple[str, int], threading.RLock] = {} s...
from __future__ import annotations from importlib.metadata import version __all__ = [ "inject_into_urllib3", "extract_from_urllib3", ] import typing orig_HTTPSConnection: typing.Any = None def inject_into_urllib3() -> None: # First check if h2 version is valid h2_version = version("h2") if not...
from __future__ import annotations import typing from .util.connection import _TYPE_SOCKET_OPTIONS from .util.timeout import _DEFAULT_TIMEOUT, _TYPE_TIMEOUT from .util.url import Url _TYPE_BODY = typing.Union[bytes, typing.IO[typing.Any], typing.Iterable[bytes], str] class ProxyConfig(typing.NamedTuple): ssl_c...
import time from collections.abc import MutableMapping from functools import lru_cache class DirCache(MutableMapping): """ Caching of directory listings, in a structure like:: {"path0": [ {"name": "path0/file0", "size": 123, "type": "file", ... ...
import base64 import re import requests from ..spec import AbstractFileSystem from ..utils import infer_storage_options from .memory import MemoryFile class GithubFileSystem(AbstractFileSystem): """Interface to files in github An instance of this class provides the files residing within a remote github ...
import asyncio import functools import inspect import fsspec from fsspec.asyn import AsyncFileSystem, running_async def async_wrapper(func, obj=None, semaphore=None): """ Wraps a synchronous function to make it awaitable. Parameters ---------- func : callable The synchronous function to ...
import os import uuid from ftplib import FTP, FTP_TLS, Error, error_perm from typing import Any from ..spec import AbstractBufferedFile, AbstractFileSystem from ..utils import infer_storage_options, isfilelike class FTPFileSystem(AbstractFileSystem): """A filesystem over classic FTP""" root_marker = "/" ...
import base64 import io from typing import Optional from urllib.parse import unquote from fsspec import AbstractFileSystem class DataFileSystem(AbstractFileSystem): """A handy decoder for data-URLs Example ------- >>> with fsspec.open("data:,Hello%2C%20World%21") as f: ... print(f.read()) ...
import dask from distributed.client import Client, _get_global_client from distributed.worker import Worker from fsspec import filesystem from fsspec.spec import AbstractBufferedFile, AbstractFileSystem from fsspec.utils import infer_storage_options def _get_client(client): if client is None: return _get...
import datetime import io import logging import os import os.path as osp import shutil import stat import tempfile from functools import lru_cache from fsspec import AbstractFileSystem from fsspec.compression import compr from fsspec.core import get_compression from fsspec.utils import isfilelike, stringify_path logg...
import os import pygit2 from fsspec.spec import AbstractFileSystem from .memory import MemoryFile class GitFileSystem(AbstractFileSystem): """Browse the files of a local git repo at any hash/tag/branch (experimental backend) """ root_marker = "" cachable = True def __init__(self, path=No...
import logging import tarfile import fsspec from fsspec.archive import AbstractArchiveFileSystem from fsspec.compression import compr from fsspec.utils import infer_compression typemap = {b"0": "file", b"5": "directory"} logger = logging.getLogger("tar") class TarFileSystem(AbstractArchiveFileSystem): """Compr...