__init__.py 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. # util/__init__.py
  2. # Copyright (C) 2005-2017 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: http://www.opensource.org/licenses/mit-license.php
  7. from .compat import callable, cmp, reduce, \
  8. threading, py3k, py33, py36, py2k, jython, pypy, cpython, win32, \
  9. pickle, dottedgetter, parse_qsl, namedtuple, next, reraise, \
  10. raise_from_cause, text_type, safe_kwarg, string_types, int_types, \
  11. binary_type, nested, \
  12. quote_plus, with_metaclass, print_, itertools_filterfalse, u, ue, b,\
  13. unquote_plus, unquote, b64decode, b64encode, byte_buffer, itertools_filter,\
  14. iterbytes, StringIO, inspect_getargspec, zip_longest
  15. from ._collections import KeyedTuple, ImmutableContainer, immutabledict, \
  16. Properties, OrderedProperties, ImmutableProperties, OrderedDict, \
  17. OrderedSet, IdentitySet, OrderedIdentitySet, column_set, \
  18. column_dict, ordered_column_set, populate_column_dict, unique_list, \
  19. UniqueAppender, PopulateDict, EMPTY_SET, to_list, to_set, \
  20. to_column_set, update_copy, flatten_iterator, has_intersection, \
  21. LRUCache, ScopedRegistry, ThreadLocalRegistry, WeakSequence, \
  22. coerce_generator_arg, lightweight_named_tuple
  23. from .langhelpers import iterate_attributes, class_hierarchy, \
  24. portable_instancemethod, unbound_method_to_callable, \
  25. getargspec_init, format_argspec_init, format_argspec_plus, \
  26. get_func_kwargs, get_cls_kwargs, decorator, as_interface, \
  27. memoized_property, memoized_instancemethod, md5_hex, \
  28. group_expirable_memoized_property, dependencies, decode_slice, \
  29. monkeypatch_proxied_specials, asbool, bool_or_str, coerce_kw_type,\
  30. duck_type_collection, assert_arg_type, symbol, dictlike_iteritems,\
  31. classproperty, set_creation_order, warn_exception, warn, NoneType,\
  32. constructor_copy, methods_equivalent, chop_traceback, asint,\
  33. generic_repr, counter, PluginLoader, hybridproperty, hybridmethod, \
  34. safe_reraise,\
  35. get_callable_argspec, only_once, attrsetter, ellipses_string, \
  36. warn_limited, map_bits, MemoizedSlots, EnsureKWArgType, wrap_callable
  37. from .deprecations import warn_deprecated, warn_pending_deprecation, \
  38. deprecated, pending_deprecation, inject_docstring_text
  39. # things that used to be not always available,
  40. # but are now as of current support Python versions
  41. from collections import defaultdict
  42. from functools import partial
  43. from functools import update_wrapper
  44. from contextlib import contextmanager