From 5fb0138a3220161703e6ab1087319a669d14e7f4 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sat, 4 Jul 2020 12:21:36 -0400 Subject: Implement rudimentary asyncio support w/ asyncpg Using the approach introduced at https://gist.github.com/zzzeek/6287e28054d3baddc07fa21a7227904e We can now create asyncio endpoints that are then handled in "implicit IO" form within the majority of the Core internals. Then coroutines are re-exposed at the point at which we call into asyncpg methods. Patch includes: * asyncpg dialect * asyncio package * engine, result, ORM session classes * new test fixtures, tests * some work with pep-484 and a short plugin for the pyannotate package, which seems to have so-so results Change-Id: Idbcc0eff72c4cad572914acdd6f40ddb1aef1a7d Fixes: #3414 --- lib/sqlalchemy/testing/plugin/plugin_base.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'lib/sqlalchemy/testing/plugin/plugin_base.py') diff --git a/lib/sqlalchemy/testing/plugin/plugin_base.py b/lib/sqlalchemy/testing/plugin/plugin_base.py index b31a4ff3e..49ff0f975 100644 --- a/lib/sqlalchemy/testing/plugin/plugin_base.py +++ b/lib/sqlalchemy/testing/plugin/plugin_base.py @@ -48,7 +48,6 @@ testing = None util = None file_config = None - logging = None include_tags = set() exclude_tags = set() @@ -193,6 +192,12 @@ def setup_options(make_option): default=False, help="Unconditionally write/update profiling data.", ) + make_option( + "--dump-pyannotate", + type=str, + dest="dump_pyannotate", + help="Run pyannotate and dump json info to given file", + ) def configure_follower(follower_ident): @@ -378,7 +383,6 @@ def _engine_uri(options, file_config): cfg = provision.setup_config( db_url, options, file_config, provision.FOLLOWER_IDENT ) - if not config._current: cfg.set_as_current(cfg, testing) -- cgit v1.2.1