diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2021-10-18 14:31:40 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2021-10-18 14:31:40 -0400 |
commit | aaf4643bc2734442f053216874a6b9d299a8d89e (patch) | |
tree | f2f3a0befbea6c488102497736f13ba51e21eb05 /lib/sqlalchemy/util/concurrency.py | |
parent | 68479d40726425c3b3a17f12658927db8ad9fe84 (diff) | |
download | sqlalchemy-aaf4643bc2734442f053216874a6b9d299a8d89e.tar.gz |
vendor asynccontextmanager outside of greenlet dependency
Fixed installation issue where the ``sqlalchemy.dialects.mysql`` module
would not be importable if "greenlet" were not installed.
This was actually breaking the sphinx build for when greenlet
were not installed.
Fixes: #7204
Change-Id: Ia351c124a2f1ca44bafe20a97267ce20cb55808f
Diffstat (limited to 'lib/sqlalchemy/util/concurrency.py')
-rw-r--r-- | lib/sqlalchemy/util/concurrency.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/sqlalchemy/util/concurrency.py b/lib/sqlalchemy/util/concurrency.py index 5d15e06de..37ecfdbc3 100644 --- a/lib/sqlalchemy/util/concurrency.py +++ b/lib/sqlalchemy/util/concurrency.py @@ -1,3 +1,10 @@ +# util/concurrency.py +# Copyright (C) 2005-2021 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 . import compat have_greenlet = False @@ -19,7 +26,9 @@ if compat.py3k: _util_async_run_coroutine_function, ) # noqa F401, E501 from ._concurrency_py3k import asyncio # noqa F401 - from ._concurrency_py3k import asynccontextmanager + + # does not need greennlet, just Python 3 + from ._compat_py3k import asynccontextmanager # noqa F401 if not have_greenlet: @@ -58,6 +67,3 @@ if not have_greenlet: def _util_async_run_coroutine_function(fn, *arg, **kw): # noqa F81 _not_implemented() - - def asynccontextmanager(fn, *arg, **kw): # noqa F81 - _not_implemented() |