33import sqlalchemy
44import sqlalchemy .orm
55from blinker import Namespace
6- from quart .signals import AsyncNamespace
76
87
98sa = sqlalchemy
109
11- sync_signals = Namespace ()
12- async_signals = AsyncNamespace ()
10+ _signals = Namespace ()
1311
1412
15- before_bind_engine_created = sync_signals .signal (
13+ before_bind_engine_created = _signals .signal (
1614 "quart-sqlalchemy.bind.engine.created.before" ,
1715 doc = """Called before a bind creates an engine.
1816
@@ -25,7 +23,7 @@ def handler(
2523 ...
2624 """ ,
2725)
28- after_bind_engine_created = sync_signals .signal (
26+ after_bind_engine_created = _signals .signal (
2927 "quart-sqlalchemy.bind.engine.created.after" ,
3028 doc = """Called after a bind creates an engine.
3129
@@ -40,7 +38,7 @@ def handler(
4038 """ ,
4139)
4240
43- before_bind_session_factory_created = sync_signals .signal (
41+ before_bind_session_factory_created = _signals .signal (
4442 "quart-sqlalchemy.bind.session_factory.created.before" ,
4543 doc = """Called before a bind creates a session_factory.
4644
@@ -49,7 +47,7 @@ def handler(sender: t.Union[Bind, AsyncBind], options: Dict[str, Any]) -> None:
4947 ...
5048 """ ,
5149)
52- after_bind_session_factory_created = sync_signals .signal (
50+ after_bind_session_factory_created = _signals .signal (
5351 "quart-sqlalchemy.bind.session_factory.created.after" ,
5452 doc = """Called after a bind creates a session_factory.
5553
@@ -64,7 +62,7 @@ def handler(
6462)
6563
6664
67- bind_context_entered = sync_signals .signal (
65+ bind_context_entered = _signals .signal (
6866 "quart-sqlalchemy.bind.context.entered" ,
6967 doc = """Called when a bind context is entered.
7068
@@ -79,7 +77,7 @@ def handler(
7977 """ ,
8078)
8179
82- bind_context_exited = sync_signals .signal (
80+ bind_context_exited = _signals .signal (
8381 "quart-sqlalchemy.bind.context.exited" ,
8482 doc = """Called when a bind context is exited.
8583
@@ -95,7 +93,7 @@ def handler(
9593)
9694
9795
98- before_framework_extension_initialization = sync_signals .signal (
96+ before_framework_extension_initialization = _signals .signal (
9997 "quart-sqlalchemy.framework.extension.initialization.before" ,
10098 doc = """Fired before SQLAlchemy.init_app(app) is called.
10199
@@ -104,7 +102,7 @@ def handle(sender: QuartSQLAlchemy, app: Quart):
104102 ...
105103 """ ,
106104)
107- after_framework_extension_initialization = sync_signals .signal (
105+ after_framework_extension_initialization = _signals .signal (
108106 "quart-sqlalchemy.framework.extension.initialization.after" ,
109107 doc = """Fired after SQLAlchemy.init_app(app) is called.
110108
0 commit comments