]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
use code generation for scoped_session
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 5 Apr 2022 23:00:19 +0000 (19:00 -0400)
committermike bayer <mike_mp@zzzcomputing.com>
Tue, 12 Apr 2022 02:09:42 +0000 (02:09 +0000)
commit98eae4e181cb2d1bbc67ec834bfad29dcba7f461
treefc000c3113a4a198b4ddd6bc81fe291dc9ef1ffb
parent15ef11e0ede82e44fb07f31b63d3db0712d8bf48
use code generation for scoped_session

our decorator thing generates code in any case,
so point it at the file itself to generate real code
for the blocks rather than doing things dynamically.

this will allow typing tools to have no problem
whatsoever and we also reduce import time overhead.
file size will be a lot bigger though, shrugs.

syntax / dupe method / etc. checking will be accomplished
by our existing linting / typing / formatting tools.

As we are also using "from __future__ import annotations",
we also no longer have to apply quotes to generated
annotations.

Change-Id: I20962cb65bda63ff0fb67357ab346e9b1ef4f108
13 files changed:
MANIFEST.in
lib/sqlalchemy/engine/base.py
lib/sqlalchemy/ext/asyncio/engine.py
lib/sqlalchemy/ext/asyncio/scoping.py
lib/sqlalchemy/ext/asyncio/session.py
lib/sqlalchemy/orm/scoping.py
lib/sqlalchemy/orm/session.py
lib/sqlalchemy/testing/plugin/plugin_base.py
lib/sqlalchemy/testing/plugin/pytestplugin.py
lib/sqlalchemy/util/compat.py
lib/sqlalchemy/util/langhelpers.py
test/ext/asyncio/test_scoping_py3k.py
tools/generate_proxy_methods.py [new file with mode: 0644]