1# util/__init__.py 
    2# Copyright (C) 2005-2025 the SQLAlchemy authors and contributors 
    3# <see AUTHORS file> 
    4# 
    5# This module is part of SQLAlchemy and is released under 
    6# the MIT License: https://www.opensource.org/licenses/mit-license.php 
    7 
    8 
    9from collections import defaultdict as defaultdict 
    10from functools import partial as partial 
    11from functools import update_wrapper as update_wrapper 
    12 
    13from . import preloaded as preloaded 
    14from ._collections import coerce_generator_arg as coerce_generator_arg 
    15from ._collections import coerce_to_immutabledict as coerce_to_immutabledict 
    16from ._collections import column_dict as column_dict 
    17from ._collections import column_set as column_set 
    18from ._collections import EMPTY_DICT as EMPTY_DICT 
    19from ._collections import EMPTY_SET as EMPTY_SET 
    20from ._collections import FacadeDict as FacadeDict 
    21from ._collections import flatten_iterator as flatten_iterator 
    22from ._collections import has_dupes as has_dupes 
    23from ._collections import has_intersection as has_intersection 
    24from ._collections import IdentitySet as IdentitySet 
    25from ._collections import immutabledict as immutabledict 
    26from ._collections import LRUCache as LRUCache 
    27from ._collections import merge_lists_w_ordering as merge_lists_w_ordering 
    28from ._collections import NONE_SET as NONE_SET 
    29from ._collections import ordered_column_set as ordered_column_set 
    30from ._collections import OrderedDict as OrderedDict 
    31from ._collections import OrderedIdentitySet as OrderedIdentitySet 
    32from ._collections import OrderedProperties as OrderedProperties 
    33from ._collections import OrderedSet as OrderedSet 
    34from ._collections import PopulateDict as PopulateDict 
    35from ._collections import Properties as Properties 
    36from ._collections import ReadOnlyContainer as ReadOnlyContainer 
    37from ._collections import ReadOnlyProperties as ReadOnlyProperties 
    38from ._collections import ScopedRegistry as ScopedRegistry 
    39from ._collections import sort_dictionary as sort_dictionary 
    40from ._collections import ThreadLocalRegistry as ThreadLocalRegistry 
    41from ._collections import to_column_set as to_column_set 
    42from ._collections import to_list as to_list 
    43from ._collections import to_set as to_set 
    44from ._collections import unique_list as unique_list 
    45from ._collections import UniqueAppender as UniqueAppender 
    46from ._collections import update_copy as update_copy 
    47from ._collections import WeakPopulateDict as WeakPopulateDict 
    48from ._collections import WeakSequence as WeakSequence 
    49from .compat import arm as arm 
    50from .compat import b as b 
    51from .compat import b64decode as b64decode 
    52from .compat import b64encode as b64encode 
    53from .compat import cmp as cmp 
    54from .compat import cpython as cpython 
    55from .compat import dataclass_fields as dataclass_fields 
    56from .compat import decode_backslashreplace as decode_backslashreplace 
    57from .compat import dottedgetter as dottedgetter 
    58from .compat import freethreading as freethreading 
    59from .compat import has_refcount_gc as has_refcount_gc 
    60from .compat import inspect_getfullargspec as inspect_getfullargspec 
    61from .compat import is64bit as is64bit 
    62from .compat import local_dataclass_fields as local_dataclass_fields 
    63from .compat import mini_gil as mini_gil 
    64from .compat import osx as osx 
    65from .compat import py311 as py311 
    66from .compat import py312 as py312 
    67from .compat import py313 as py313 
    68from .compat import py314 as py314 
    69from .compat import pypy as pypy 
    70from .compat import win32 as win32 
    71from .concurrency import await_ as await_ 
    72from .concurrency import await_only as await_only 
    73from .concurrency import greenlet_spawn as greenlet_spawn 
    74from .concurrency import is_exit_exception as is_exit_exception 
    75from .deprecations import became_legacy_20 as became_legacy_20 
    76from .deprecations import deprecated as deprecated 
    77from .deprecations import deprecated_cls as deprecated_cls 
    78from .deprecations import deprecated_params as deprecated_params 
    79from .deprecations import moved_20 as moved_20 
    80from .deprecations import warn_deprecated as warn_deprecated 
    81from .langhelpers import add_parameter_text as add_parameter_text 
    82from .langhelpers import as_interface as as_interface 
    83from .langhelpers import asbool as asbool 
    84from .langhelpers import asint as asint 
    85from .langhelpers import assert_arg_type as assert_arg_type 
    86from .langhelpers import attrsetter as attrsetter 
    87from .langhelpers import bool_or_str as bool_or_str 
    88from .langhelpers import chop_traceback as chop_traceback 
    89from .langhelpers import class_hierarchy as class_hierarchy 
    90from .langhelpers import classproperty as classproperty 
    91from .langhelpers import clsname_as_plain_name as clsname_as_plain_name 
    92from .langhelpers import coerce_kw_type as coerce_kw_type 
    93from .langhelpers import constructor_copy as constructor_copy 
    94from .langhelpers import constructor_key as constructor_key 
    95from .langhelpers import counter as counter 
    96from .langhelpers import create_proxy_methods as create_proxy_methods 
    97from .langhelpers import decode_slice as decode_slice 
    98from .langhelpers import decorator as decorator 
    99from .langhelpers import dictlike_iteritems as dictlike_iteritems 
    100from .langhelpers import duck_type_collection as duck_type_collection 
    101from .langhelpers import ellipses_string as ellipses_string 
    102from .langhelpers import EnsureKWArg as EnsureKWArg 
    103from .langhelpers import FastIntFlag as FastIntFlag 
    104from .langhelpers import format_argspec_init as format_argspec_init 
    105from .langhelpers import format_argspec_plus as format_argspec_plus 
    106from .langhelpers import generic_fn_descriptor as generic_fn_descriptor 
    107from .langhelpers import generic_repr as generic_repr 
    108from .langhelpers import get_annotations as get_annotations 
    109from .langhelpers import get_callable_argspec as get_callable_argspec 
    110from .langhelpers import get_cls_kwargs as get_cls_kwargs 
    111from .langhelpers import get_func_kwargs as get_func_kwargs 
    112from .langhelpers import getargspec_init as getargspec_init 
    113from .langhelpers import has_compiled_ext as has_compiled_ext 
    114from .langhelpers import HasMemoized as HasMemoized 
    115from .langhelpers import ( 
    116    HasMemoized_ro_memoized_attribute as HasMemoized_ro_memoized_attribute, 
    117) 
    118from .langhelpers import hybridmethod as hybridmethod 
    119from .langhelpers import hybridproperty as hybridproperty 
    120from .langhelpers import inject_docstring_text as inject_docstring_text 
    121from .langhelpers import iterate_attributes as iterate_attributes 
    122from .langhelpers import map_bits as map_bits 
    123from .langhelpers import md5_hex as md5_hex 
    124from .langhelpers import memoized_instancemethod as memoized_instancemethod 
    125from .langhelpers import memoized_property as memoized_property 
    126from .langhelpers import MemoizedSlots as MemoizedSlots 
    127from .langhelpers import method_is_overridden as method_is_overridden 
    128from .langhelpers import methods_equivalent as methods_equivalent 
    129from .langhelpers import ( 
    130    monkeypatch_proxied_specials as monkeypatch_proxied_specials, 
    131) 
    132from .langhelpers import non_memoized_property as non_memoized_property 
    133from .langhelpers import only_once as only_once 
    134from .langhelpers import ( 
    135    parse_user_argument_for_enum as parse_user_argument_for_enum, 
    136) 
    137from .langhelpers import PluginLoader as PluginLoader 
    138from .langhelpers import quoted_token_parser as quoted_token_parser 
    139from .langhelpers import ro_memoized_property as ro_memoized_property 
    140from .langhelpers import ro_non_memoized_property as ro_non_memoized_property 
    141from .langhelpers import rw_hybridproperty as rw_hybridproperty 
    142from .langhelpers import safe_reraise as safe_reraise 
    143from .langhelpers import set_creation_order as set_creation_order 
    144from .langhelpers import string_or_unprintable as string_or_unprintable 
    145from .langhelpers import symbol as symbol 
    146from .langhelpers import TypingOnly as TypingOnly 
    147from .langhelpers import ( 
    148    unbound_method_to_callable as unbound_method_to_callable, 
    149) 
    150from .langhelpers import walk_subclasses as walk_subclasses 
    151from .langhelpers import warn as warn 
    152from .langhelpers import warn_exception as warn_exception 
    153from .langhelpers import warn_limited as warn_limited 
    154from .langhelpers import wrap_callable as wrap_callable 
    155from .preloaded import preload_module as preload_module 
    156from .typing import is_non_string_iterable as is_non_string_iterable