]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Don't import greenlet at all until it's needed
authorFederico Caselli <cfederico87@gmail.com>
Sun, 3 Sep 2023 19:24:45 +0000 (21:24 +0200)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 13 Nov 2023 19:28:34 +0000 (14:28 -0500)
commitf5f08c28fb693bc83014cebe9a23de355aef9b3a
treec2bfa987787c8ea7c66ab5be2b4ef3b2fb128c0b
parentca813b33f5447e592eace3117f3521a007f30b60
Don't import greenlet at all until it's needed

Added an initialize step to the import of
``sqlalchemy.ext.asyncio`` so that ``greenlet`` will
be imported only when the asyncio extension is first imported.
Alternatively, the ``greenlet`` library is still imported lazily on
first use to support use case that don't make direct use of the
SQLAlchemy asyncio extension.

Fixes: #10296
Change-Id: I97162a01aa29adb3e3fee97b718ab9567b2f6124
doc/build/changelog/unreleased_21/10296.rst [new file with mode: 0644]
lib/sqlalchemy/ext/asyncio/__init__.py
lib/sqlalchemy/util/_concurrency_py3k.py [deleted file]
lib/sqlalchemy/util/compat.py
lib/sqlalchemy/util/concurrency.py
setup.cfg
test/base/_concurrency_fixtures.py [new file with mode: 0644]
test/base/test_concurrency.py [moved from test/base/test_concurrency_py3k.py with 89% similarity]
tox.ini