SYMBOL INDEX (265 symbols across 21 files) FILE: doc/test_serialization.py function test_dataclasses_json (line 6) | def test_dataclasses_json(): function test_marshmallow_dataclass (line 71) | def test_marshmallow_dataclass(): function test_pydantic (line 112) | def test_pydantic(): function test_cattrs (line 154) | def test_cattrs(): FILE: misc/profile.py function timer (line 18) | def timer(name: str) -> Timer: function test_ints (line 22) | def test_ints() -> None: FILE: misc/test_redis/test.py function items (line 14) | def items(): function reset (line 21) | def reset(): function write (line 25) | def write(): function read (line 32) | def read(): function write2 (line 39) | def write2(): function read2 (line 44) | def read2(): FILE: src/cachew/__init__.py function orjson_dumps (line 31) | def orjson_dumps(*args, **kwargs): # type: ignore[misc] class settings (line 55) | class settings: function get_logger (line 75) | def get_logger() -> logging.Logger: function default_hash (line 89) | def default_hash(*args, **kwargs) -> SourceHash: function mtime_hash (line 96) | def mtime_hash(path: Path, *args, **kwargs) -> SourceHash: function infer_return_type (line 106) | def infer_return_type(func) -> Failure | Inferred: function _returns_multiple (line 237) | def _returns_multiple(rtype) -> bool: function doublewrap (line 253) | def doublewrap(f): function cachew_error (line 266) | def cachew_error(e: Exception, *, logger: logging.Logger) -> None: function cachew_impl (line 279) | def cachew_impl[**P]( function cachew (line 453) | def cachew[F: Callable](fun: F) -> F: ... function cachew (line 459) | def cachew[F, **P]( function cachew (line 471) | def cachew(*args, **kwargs): # make ty happy function callable_name (line 477) | def callable_name(func: Callable) -> str: function callable_module_name (line 483) | def callable_module_name(func: Callable) -> str | None: function _parse_disabled_modules (line 488) | def _parse_disabled_modules(logger: logging.Logger | None = None) -> lis... function _matches_disabled_module (line 504) | def _matches_disabled_module(module_name: str, pattern: str) -> bool: function _module_is_disabled (line 548) | def _module_is_disabled(module_name: str, logger: logging.Logger) -> bool: class Context (line 568) | class Context[**P]: method composite_hash (line 580) | def composite_hash(self, *args, **kwargs) -> dict[str, Any]: function cachew_wrapper (line 613) | def cachew_wrapper[**P]( FILE: src/cachew/backend/common.py class AbstractBackend (line 9) | class AbstractBackend: method __init__ (line 11) | def __init__(self, cache_path: Path, *, logger: logging.Logger) -> None: method __enter__ (line 15) | def __enter__(self): method __exit__ (line 18) | def __exit__(self, *args) -> None: method get_old_hash (line 21) | def get_old_hash(self) -> SourceHash | None: method cached_blobs_total (line 24) | def cached_blobs_total(self) -> int | None: method cached_blobs (line 27) | def cached_blobs(self) -> Iterator[bytes]: method get_exclusive_write (line 30) | def get_exclusive_write(self) -> bool: method write_new_hash (line 36) | def write_new_hash(self, new_hash: SourceHash) -> None: method flush_blobs (line 39) | def flush_blobs(self, chunk: Sequence[bytes]) -> None: method finalize (line 42) | def finalize(self, new_hash: SourceHash) -> None: FILE: src/cachew/backend/file.py class FileBackend (line 12) | class FileBackend(AbstractBackend): method __init__ (line 18) | def __init__(self, cache_path: Path, *, logger: logging.Logger) -> None: method __enter__ (line 26) | def __enter__(self) -> 'FileBackend': method __exit__ (line 33) | def __exit__(self, *args) -> None: method get_old_hash (line 45) | def get_old_hash(self) -> SourceHash | None: method cached_blobs_total (line 51) | def cached_blobs_total(self) -> int | None: method cached_blobs (line 56) | def cached_blobs(self) -> Iterator[bytes]: method get_exclusive_write (line 60) | def get_exclusive_write(self) -> bool: method write_new_hash (line 70) | def write_new_hash(self, new_hash: SourceHash) -> None: method flush_blobs (line 74) | def flush_blobs(self, chunk: Sequence[bytes]) -> None: method finalize (line 81) | def finalize(self, new_hash: SourceHash) -> None: # noqa: ARG002 FILE: src/cachew/backend/sqlite.py class SqliteBackend (line 17) | class SqliteBackend(AbstractBackend): method __init__ (line 18) | def __init__(self, cache_path: Path, *, logger: logging.Logger) -> None: method __enter__ (line 67) | def __enter__(self) -> 'SqliteBackend': method __exit__ (line 74) | def __exit__(self, *args) -> None: method get_old_hash (line 79) | def get_old_hash(self) -> SourceHash | None: method cached_blobs_total (line 103) | def cached_blobs_total(self) -> int | None: method cached_blobs (line 107) | def cached_blobs(self) -> Iterator[bytes]: method get_exclusive_write (line 132) | def get_exclusive_write(self) -> bool: method flush_blobs (line 167) | def flush_blobs(self, chunk: Sequence[bytes]) -> None: method finalize (line 178) | def finalize(self, new_hash: SourceHash) -> None: FILE: src/cachew/common.py class CachewException (line 7) | class CachewException(RuntimeError): class TypeNotSupported (line 12) | class TypeNotSupported(CachewException): method __str__ (line 16) | def __str__(self) -> str: FILE: src/cachew/experimental.py function enable_exceptions (line 7) | def enable_exceptions() -> None: function disable_exceptions (line 11) | def disable_exceptions() -> None: FILE: src/cachew/extra.py function mcachew (line 2) | def mcachew(*args, **kwargs): function disabled_cachew (line 25) | def disabled_cachew(): FILE: src/cachew/legacy.py function get_union_args (line 24) | def get_union_args(cls) -> Optional[tuple[type]]: function is_union (line 34) | def is_union(cls) -> bool: function is_primitive (line 77) | def is_primitive(cls: type) -> bool: class IsoDateTime (line 90) | class IsoDateTime(sqlalchemy.TypeDecorator): method python_type (line 98) | def python_type(self): method process_literal_param (line 101) | def process_literal_param(self, value, dialect): method process_bind_param (line 104) | def process_bind_param(self, value: Optional[datetime], dialect) -> Op... method process_result_value (line 126) | def process_result_value(self, value: Optional[str], dialect) -> Optio... method warn_pytz (line 144) | def warn_pytz(self) -> None: class IsoDate (line 149) | class IsoDate(IsoDateTime): method python_type (line 155) | def python_type(self): method process_literal_param (line 158) | def process_literal_param(self, value, dialect): method process_result_value (line 161) | def process_result_value(self, value: Optional[str], dialect) -> Optio... class ExceptionAdapter (line 171) | class ExceptionAdapter(sqlalchemy.TypeDecorator): method python_type (line 185) | def python_type(self): method process_literal_param (line 188) | def process_literal_param(self, value, dialect): method process_bind_param (line 191) | def process_bind_param(self, value: Optional[Exception], dialect) -> O... method process_result_value (line 204) | def process_result_value(self, value: Optional[str], dialect) -> Optio... function strip_optional (line 227) | def strip_optional(cls) -> tuple[type, bool]: function strip_generic (line 247) | def strip_generic(tp): class NTBinder (line 268) | class NTBinder(Generic[NT]): method make (line 315) | def make(tp: type[NT], name: Optional[str] = None) -> 'NTBinder[NT]': method columns (line 358) | def columns(self) -> list[Column]: method to_row (line 362) | def to_row(self, obj: NT) -> tuple[Optional[Values], ...]: method from_row (line 365) | def from_row(self, row: Iterable[Any]) -> NT: method _to_row (line 374) | def _to_row(self, obj) -> Iterator[Optional[Values]]: method _from_row (line 397) | def _from_row(self, row_iter): method iter_columns (line 422) | def iter_columns(self) -> Iterator[Column]: method __str__ (line 443) | def __str__(self): method __repr__ (line 447) | def __repr__(self): method flatten (line 450) | def flatten(self, level=0): function test_mypy_annotations (line 456) | def test_mypy_annotations() -> None: function test_ntbinder_primitive (line 481) | def test_ntbinder_primitive(tp, val) -> None: function test_unique_columns (line 488) | def test_unique_columns(tmp_path: Path) -> None: # noqa: ARG001 FILE: src/cachew/logging_helper.py function test (line 10) | def test() -> None: function mklevel (line 68) | def mklevel(level: LevelIsh) -> Level: function get_collapse_level (line 76) | def get_collapse_level() -> Level | None: function get_env_level (line 88) | def get_env_level(name: str) -> Level | None: function setup_logger (line 97) | def setup_logger(logger: str | logging.Logger, *, level: LevelIsh = None... function _setup_handlers_and_formatters (line 123) | def _setup_handlers_and_formatters(name: str) -> None: class AddExceptionTraceback (line 163) | class AddExceptionTraceback(logging.Filter): method filter (line 164) | def filter(self, record: logging.LogRecord) -> bool: class CollapseLogsHandler (line 175) | class CollapseLogsHandler(logging.StreamHandler): method __init__ (line 185) | def __init__(self, *args, maxlevel: Level, **kwargs) -> None: method emit (line 189) | def emit(self, record: logging.LogRecord) -> None: function make_logger (line 209) | def make_logger(name: str, *, level: LevelIsh = None) -> logging.Logger: function get_enlighten (line 218) | def get_enlighten(): FILE: src/cachew/marshall/cachew.py class CachewMarshall (line 29) | class CachewMarshall[T](AbstractMarshall[T]): method __init__ (line 30) | def __init__(self, Type_: type[T]) -> None: method dump (line 33) | def dump(self, obj: T) -> Json: method load (line 36) | def load(self, dct: Json) -> T: class Schema (line 45) | class Schema: method dump (line 49) | def dump(self, obj): method load (line 53) | def load(self, dct): class SPrimitive (line 58) | class SPrimitive(Schema): method dump (line 59) | def dump(self, obj): method load (line 67) | def load(self, dct): class SDataclass (line 75) | class SDataclass(Schema): method dump (line 79) | def dump(self, obj): method load (line 91) | def load(self, dct): class SUnion (line 100) | class SUnion(Schema): method dump (line 104) | def dump(self, obj): method load (line 125) | def load(self, dct): class SList (line 139) | class SList(Schema): method dump (line 142) | def dump(self, obj): method load (line 145) | def load(self, dct): class STuple (line 150) | class STuple(Schema): method dump (line 153) | def dump(self, obj): method load (line 156) | def load(self, dct): class SSequence (line 161) | class SSequence(Schema): method dump (line 164) | def dump(self, obj): method load (line 167) | def load(self, dct): class SDict (line 172) | class SDict(Schema): method dump (line 176) | def dump(self, obj): method load (line 182) | def load(self, dct): function _exc_helper (line 193) | def _exc_helper(args): class SException (line 207) | class SException(Schema): method dump (line 208) | def dump(self, obj: Exception) -> Json: method load (line 211) | def load(self, dct: Json): class pytz_BaseTzInfo (line 220) | class pytz_BaseTzInfo: function make_tz_pytz (line 223) | def make_tz_pytz(zone: str): class SDatetime (line 239) | class SDatetime(Schema): method dump (line 240) | def dump(self, obj: datetime) -> Json: method load (line 256) | def load(self, dct: tuple): class SDate (line 268) | class SDate(Schema): method dump (line 269) | def dump(self, obj: date) -> Json: method load (line 272) | def load(self, dct: str): function build_schema (line 292) | def build_schema(Type) -> Schema: function _test_identity (line 394) | def _test_identity(obj, Type_, expected=None): function test_serialize_and_deserialize (line 428) | def test_serialize_and_deserialize() -> None: FILE: src/cachew/marshall/common.py class AbstractMarshall (line 7) | class AbstractMarshall[T]: method dump (line 9) | def dump(self, obj: T) -> Json: method load (line 13) | def load(self, dct: Json) -> T: FILE: src/cachew/pytest.py function parametrize (line 16) | def parametrize(*_args, **_kwargs): FILE: src/cachew/tests/marshall.py function do_test (line 31) | def do_test(*, test_name: str, Type, factory, count: int, impl: Impl = '... class Name (line 174) | class Name: function test_union_str_dataclass (line 182) | def test_union_str_dataclass(impl: Impl, count: int, gc_control, request... function test_datetimes (line 208) | def test_datetimes(impl: Impl, count: int, gc_control, request) -> None: function test_nested_dataclass (line 234) | def test_nested_dataclass(impl: Impl, count: int, gc_control, request) -... FILE: src/cachew/tests/test_cachew.py function set_default_cachew_dir (line 46) | def set_default_cachew_dir(tmp_path: Path): function throw_on_errors (line 52) | def throw_on_errors(): function set_backend (line 60) | def set_backend(restore_settings, request): function restore_settings (line 67) | def restore_settings(): class UUU (line 76) | class UUU(NamedTuple): function test_simple (line 81) | def test_simple() -> None: function test_string_annotation_old (line 90) | def test_string_annotation_old() -> None: function test_string_annotation_new (line 106) | def test_string_annotation_new() -> None: function test_custom_hash (line 115) | def test_custom_hash(tmp_path: Path) -> None: function test_caching (line 165) | def test_caching(tmp_path: Path) -> None: function test_error (line 195) | def test_error(tmp_path: Path) -> None: function test_cache_path (line 226) | def test_cache_path(tmp_path: Path) -> None: class UGood (line 287) | class UGood(NamedTuple): class UBad (line 291) | class UBad: function test_unsupported_class (line 295) | def test_unsupported_class(tmp_path: Path) -> None: class TE2 (line 311) | class TE2(NamedTuple): function test_many (line 321) | def test_many(count: int, tmp_path: Path, gc_control) -> None: class BB (line 370) | class BB(NamedTuple): class AA (line 375) | class AA(NamedTuple): function test_return_type_inference (line 381) | def test_return_type_inference(tmp_path: Path) -> None: function test_return_type_mismatch (line 395) | def test_return_type_mismatch(tmp_path: Path) -> None: function test_return_type_none (line 409) | def test_return_type_none(tmp_path: Path) -> None: function test_callable_cache_path (line 417) | def test_callable_cache_path(tmp_path: Path) -> None: function test_nested (line 440) | def test_nested(tmp_path: Path) -> None: class BBv2 (line 464) | class BBv2(NamedTuple): function test_schema_change (line 470) | def test_schema_change(tmp_path: Path) -> None: function test_transaction (line 492) | def test_transaction(tmp_path: Path) -> None: class Job (line 519) | class Job(NamedTuple): function test_optional (line 524) | def test_optional(tmp_path: Path) -> None: class Person (line 548) | class Person(NamedTuple): function make_people_data (line 555) | def make_people_data(count: int) -> Iterator[Person]: function test_stats (line 575) | def test_stats(tmp_path: Path) -> None: class Test (line 593) | class Test: function test_dataclass (line 597) | def test_dataclass(tmp_path: Path) -> None: function test_inner_class (line 606) | def test_inner_class(tmp_path: Path) -> None: class Dates (line 624) | class Dates: function test_dates (line 632) | def test_dates(tmp_path: Path) -> None: class AllTypes (line 665) | class AllTypes: function test_types (line 682) | def test_types(tmp_path: Path) -> None: function test_primitive (line 720) | def test_primitive(tmp_path: Path) -> None: function test_single_value (line 730) | def test_single_value(tmp_path: Path) -> None: class O (line 758) | class O(NamedTuple): class _HackHash (line 762) | class _HackHash: method __init__ (line 763) | def __init__(self, x: int) -> None: method __repr__ (line 766) | def __repr__(self): function test_default_arguments (line 770) | def test_default_arguments(tmp_path: Path) -> None: class U (line 823) | class U(NamedTuple): function test_union (line 827) | def test_union(tmp_path: Path) -> None: class DD (line 839) | class DD: function test_union_with_dataclass (line 843) | def test_union_with_dataclass(tmp_path: Path) -> None: function _concurrent_helper (line 854) | def _concurrent_helper(cache_path: Path, count: int, backend: Backend, s... function fuzz_cachew_impl (line 866) | def fuzz_cachew_impl(): function test_concurrent_writes (line 896) | def test_concurrent_writes(tmp_path: Path, fuzz_cachew_impl) -> None: function test_concurrent_reads (line 916) | def test_concurrent_reads(tmp_path: Path, fuzz_cachew_impl): function test_mcachew (line 941) | def test_mcachew(tmp_path: Path): function test_defensive (line 955) | def test_defensive(restore_settings) -> None: function test_bad_annotation (line 995) | def test_bad_annotation(*, tmp_path: Path, throw: bool) -> None: function test_recursive_simple (line 1022) | def test_recursive_simple(tmp_path: Path) -> None: function test_recursive_deep (line 1065) | def test_recursive_deep(tmp_path: Path) -> None: function test_recursive_error (line 1100) | def test_recursive_error(tmp_path: Path) -> None: function test_exceptions (line 1124) | def test_exceptions(tmp_path: Path) -> None: function test_result (line 1142) | def test_result(tmp_path: Path) -> None: function test_version_change (line 1157) | def test_version_change(tmp_path: Path) -> None: function dump_old_cache (line 1193) | def dump_old_cache(tmp_path: Path) -> None: function test_old_cache_v0_6_3 (line 1208) | def test_old_cache_v0_6_3(tmp_path: Path) -> None: function test_disabled (line 1239) | def test_disabled(tmp_path: Path) -> None: function test_early_exit_simple (line 1262) | def test_early_exit_simple(tmp_path: Path) -> None: function test_early_exit_shutdown (line 1298) | def test_early_exit_shutdown(tmp_path: Path) -> None: function test_synthetic_keyset (line 1331) | def test_synthetic_keyset(*, tmp_path: Path, use_synthetic: bool) -> None: function test_db_path_matches_fun_name (line 1426) | def test_db_path_matches_fun_name(tmp_path: Path) -> None: function test_type_alias_type_1 (line 1443) | def test_type_alias_type_1(tmp_path: Path) -> None: function test_type_alias_type_2 (line 1454) | def test_type_alias_type_2(tmp_path: Path) -> None: function test_type_alias_generic (line 1465) | def test_type_alias_generic(tmp_path: Path) -> None: FILE: src/cachew/tests/test_future_annotations.py class NewStyleTypes1 (line 22) | class NewStyleTypes1: function test_types1 (line 30) | def test_types1(tmp_path: Path) -> None: class NewStyleTypes2 (line 48) | class NewStyleTypes2: function test_types2 (line 54) | def test_types2(tmp_path: Path) -> None: function test_future_annotations (line 71) | def test_future_annotations( FILE: src/cachew/tests/test_resolve_type_parameters.py function test_simple_generic_alias (line 4) | def test_simple_generic_alias() -> None: function test_simple_type_keyword (line 11) | def test_simple_type_keyword() -> None: function test_generic_collections (line 19) | def test_generic_collections() -> None: function test_generic_type_keyword (line 40) | def test_generic_type_keyword() -> None: function test_chaining (line 66) | def test_chaining() -> None: function test_optional_and_union (line 81) | def test_optional_and_union() -> None: function test_old_aliases (line 112) | def test_old_aliases() -> None: function test_old_union (line 129) | def test_old_union() -> None: function test_typevar (line 137) | def test_typevar() -> None: function test_misc (line 151) | def test_misc() -> None: FILE: src/cachew/tests/utils.py function profile (line 13) | def profile(name: str): function timer (line 33) | def timer(name: str): function gc_control (line 40) | def gc_control(*, gc_on: bool): FILE: src/cachew/utils.py function is_namedtuple (line 7) | def is_namedtuple(t) -> bool: function resolve_type_parameters (line 19) | def resolve_type_parameters(t) -> type: function _resolve_type_parameters_aux (line 23) | def _resolve_type_parameters_aux(t, *, typevar_to_type: Mapping[TypeVar,...