__init__.py 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. # util/__init__.py
  2. # Copyright (C) 2005-2022 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. from collections import defaultdict
  8. from contextlib import contextmanager
  9. from functools import partial
  10. from functools import update_wrapper
  11. from ._collections import coerce_generator_arg
  12. from ._collections import coerce_to_immutabledict
  13. from ._collections import collections_abc
  14. from ._collections import column_dict
  15. from ._collections import column_set
  16. from ._collections import EMPTY_DICT
  17. from ._collections import EMPTY_SET
  18. from ._collections import FacadeDict
  19. from ._collections import flatten_iterator
  20. from ._collections import has_dupes
  21. from ._collections import has_intersection
  22. from ._collections import IdentitySet
  23. from ._collections import ImmutableContainer
  24. from ._collections import immutabledict
  25. from ._collections import ImmutableProperties
  26. from ._collections import LRUCache
  27. from ._collections import ordered_column_set
  28. from ._collections import OrderedDict
  29. from ._collections import OrderedIdentitySet
  30. from ._collections import OrderedProperties
  31. from ._collections import OrderedSet
  32. from ._collections import PopulateDict
  33. from ._collections import Properties
  34. from ._collections import ScopedRegistry
  35. from ._collections import sort_dictionary
  36. from ._collections import ThreadLocalRegistry
  37. from ._collections import to_column_set
  38. from ._collections import to_list
  39. from ._collections import to_set
  40. from ._collections import unique_list
  41. from ._collections import UniqueAppender
  42. from ._collections import update_copy
  43. from ._collections import WeakPopulateDict
  44. from ._collections import WeakSequence
  45. from ._preloaded import preload_module
  46. from ._preloaded import preloaded
  47. from .compat import ABC
  48. from .compat import arm
  49. from .compat import b
  50. from .compat import b64decode
  51. from .compat import b64encode
  52. from .compat import binary_type
  53. from .compat import binary_types
  54. from .compat import byte_buffer
  55. from .compat import callable
  56. from .compat import cmp
  57. from .compat import cpython
  58. from .compat import dataclass_fields
  59. from .compat import decode_backslashreplace
  60. from .compat import dottedgetter
  61. from .compat import has_refcount_gc
  62. from .compat import inspect_getfullargspec
  63. from .compat import int_types
  64. from .compat import iterbytes
  65. from .compat import itertools_filter
  66. from .compat import itertools_filterfalse
  67. from .compat import local_dataclass_fields
  68. from .compat import namedtuple
  69. from .compat import next
  70. from .compat import nullcontext
  71. from .compat import osx
  72. from .compat import parse_qsl
  73. from .compat import perf_counter
  74. from .compat import pickle
  75. from .compat import print_
  76. from .compat import py2k
  77. from .compat import py37
  78. from .compat import py38
  79. from .compat import py39
  80. from .compat import py3k
  81. from .compat import pypy
  82. from .compat import quote_plus
  83. from .compat import raise_
  84. from .compat import raise_from_cause
  85. from .compat import reduce
  86. from .compat import reraise
  87. from .compat import string_types
  88. from .compat import StringIO
  89. from .compat import text_type
  90. from .compat import threading
  91. from .compat import timezone
  92. from .compat import TYPE_CHECKING
  93. from .compat import u
  94. from .compat import ue
  95. from .compat import unquote
  96. from .compat import unquote_plus
  97. from .compat import win32
  98. from .compat import with_metaclass
  99. from .compat import zip_longest
  100. from .concurrency import asyncio
  101. from .concurrency import await_fallback
  102. from .concurrency import await_only
  103. from .concurrency import greenlet_spawn
  104. from .concurrency import is_exit_exception
  105. from .deprecations import deprecated
  106. from .deprecations import deprecated_20
  107. from .deprecations import deprecated_20_cls
  108. from .deprecations import deprecated_cls
  109. from .deprecations import deprecated_params
  110. from .deprecations import inject_docstring_text
  111. from .deprecations import moved_20
  112. from .deprecations import SQLALCHEMY_WARN_20
  113. from .deprecations import warn_deprecated
  114. from .deprecations import warn_deprecated_20
  115. from .langhelpers import add_parameter_text
  116. from .langhelpers import as_interface
  117. from .langhelpers import asbool
  118. from .langhelpers import asint
  119. from .langhelpers import assert_arg_type
  120. from .langhelpers import attrsetter
  121. from .langhelpers import bool_or_str
  122. from .langhelpers import chop_traceback
  123. from .langhelpers import class_hierarchy
  124. from .langhelpers import classproperty
  125. from .langhelpers import clsname_as_plain_name
  126. from .langhelpers import coerce_kw_type
  127. from .langhelpers import constructor_copy
  128. from .langhelpers import constructor_key
  129. from .langhelpers import counter
  130. from .langhelpers import create_proxy_methods
  131. from .langhelpers import decode_slice
  132. from .langhelpers import decorator
  133. from .langhelpers import dictlike_iteritems
  134. from .langhelpers import duck_type_collection
  135. from .langhelpers import ellipses_string
  136. from .langhelpers import EnsureKWArgType
  137. from .langhelpers import format_argspec_init
  138. from .langhelpers import format_argspec_plus
  139. from .langhelpers import generic_repr
  140. from .langhelpers import get_callable_argspec
  141. from .langhelpers import get_cls_kwargs
  142. from .langhelpers import get_func_kwargs
  143. from .langhelpers import getargspec_init
  144. from .langhelpers import has_compiled_ext
  145. from .langhelpers import HasMemoized
  146. from .langhelpers import hybridmethod
  147. from .langhelpers import hybridproperty
  148. from .langhelpers import iterate_attributes
  149. from .langhelpers import map_bits
  150. from .langhelpers import md5_hex
  151. from .langhelpers import memoized_instancemethod
  152. from .langhelpers import memoized_property
  153. from .langhelpers import MemoizedSlots
  154. from .langhelpers import method_is_overridden
  155. from .langhelpers import methods_equivalent
  156. from .langhelpers import monkeypatch_proxied_specials
  157. from .langhelpers import NoneType
  158. from .langhelpers import only_once
  159. from .langhelpers import PluginLoader
  160. from .langhelpers import portable_instancemethod
  161. from .langhelpers import quoted_token_parser
  162. from .langhelpers import safe_reraise
  163. from .langhelpers import set_creation_order
  164. from .langhelpers import string_or_unprintable
  165. from .langhelpers import symbol
  166. from .langhelpers import unbound_method_to_callable
  167. from .langhelpers import walk_subclasses
  168. from .langhelpers import warn
  169. from .langhelpers import warn_exception
  170. from .langhelpers import warn_limited
  171. from .langhelpers import wrap_callable