XYZ File Manager
Current Path:
/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/util
opt
/
alt
/
python27
/
lib64
/
python2.7
/
site-packages
/
sqlalchemy
/
util
/
📁
..
📄
__init__.py
(6.3 KB)
📄
__init__.pyc
(7.77 KB)
📄
_collections.py
(28.46 KB)
📄
_collections.pyc
(49.44 KB)
📄
_compat_py3k.py
(2.14 KB)
📄
_concurrency_py3k.py
(6.39 KB)
📄
_preloaded.py
(2.34 KB)
📄
_preloaded.pyc
(2.97 KB)
📄
compat.py
(17.95 KB)
📄
compat.pyc
(21.75 KB)
📄
concurrency.py
(2.22 KB)
📄
concurrency.pyc
(2.59 KB)
📄
deprecations.py
(13.35 KB)
📄
deprecations.pyc
(12.85 KB)
📄
langhelpers.py
(54.97 KB)
📄
langhelpers.pyc
(62.67 KB)
📄
queue.py
(9.08 KB)
📄
queue.pyc
(10.42 KB)
📄
tool_support.py
(5.99 KB)
📄
topological.py
(2.79 KB)
📄
topological.pyc
(2.54 KB)
Editing: _compat_py3k.py
# util/_compat_py3k.py # Copyright (C) 2005-2024 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: https://www.opensource.org/licenses/mit-license.php from functools import wraps # vendored from py3.7 class _AsyncGeneratorContextManager: """Helper for @asynccontextmanager.""" def __init__(self, func, args, kwds): self.gen = func(*args, **kwds) self.func, self.args, self.kwds = func, args, kwds doc = getattr(func, "__doc__", None) if doc is None: doc = type(self).__doc__ self.__doc__ = doc async def __aenter__(self): try: return await self.gen.__anext__() except StopAsyncIteration: raise RuntimeError("generator didn't yield") from None async def __aexit__(self, typ, value, traceback): if typ is None: try: await self.gen.__anext__() except StopAsyncIteration: return else: raise RuntimeError("generator didn't stop") else: if value is None: value = typ() # See _GeneratorContextManager.__exit__ for comments on subtleties # in this implementation try: await self.gen.athrow(typ, value, traceback) raise RuntimeError("generator didn't stop after athrow()") except StopAsyncIteration as exc: return exc is not value except RuntimeError as exc: if exc is value: return False if isinstance(value, (StopIteration, StopAsyncIteration)): if exc.__cause__ is value: return False raise except BaseException as exc: if exc is not value: raise # using the vendored version in all cases at the moment to establish # full test coverage def asynccontextmanager(func): @wraps(func) def helper(*args, **kwds): return _AsyncGeneratorContextManager(func, args, kwds) return helper
Upload File
Create Folder