From 649de79950dcf952d7a44069faf36925c23c4e63 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Mon, 2 Mar 2020 10:28:32 -0500 Subject: Update dialect API documentation The docstrings for connect() and on_connect() were incorrect between Dialect vs. DefaultDialect. Redocumented related methods, clean up formatting, and remove unicode-related attribute descriptions from the top level Dialect document as these don't apply to Python 3. Change-Id: I45baab757f8e20627eba42c30b9e8dbe26356275 --- lib/sqlalchemy/engine/default.py | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'lib/sqlalchemy/engine/default.py') diff --git a/lib/sqlalchemy/engine/default.py b/lib/sqlalchemy/engine/default.py index 7efc4bda2..28a59e660 100644 --- a/lib/sqlalchemy/engine/default.py +++ b/lib/sqlalchemy/engine/default.py @@ -338,17 +338,7 @@ class DefaultDialect(interfaces.Dialect): ) def on_connect(self): - """return a callable which sets up a newly created DBAPI connection. - - This is used to set dialect-wide per-connection options such as - isolation modes, unicode modes, etc. - - If a callable is returned, it will be assembled into a pool listener - that receives the direct DBAPI connection, with all wrappers removed. - - If None is returned, no listener will be generated. - - """ + # inherits the docstring from interfaces.Dialect.on_connect return None def _check_max_identifier_length(self, connection): @@ -478,9 +468,11 @@ class DefaultDialect(interfaces.Dialect): ) def connect(self, *cargs, **cparams): + # inherits the docstring from interfaces.Dialect.connect return self.dbapi.connect(*cargs, **cparams) def create_connect_args(self, url): + # inherits the docstring from interfaces.Dialect.create_connect_args opts = url.translate_connect_args() opts.update(url.query) return [[], opts] -- cgit v1.2.1