From: Mike Bayer Date: Wed, 6 Mar 2019 00:42:41 +0000 (-0500) Subject: Fix pooling typo X-Git-Tag: rel_1_2_19~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=062155f074084ea26fe6a0c2b955c49e991202d8;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git Fix pooling typo eng -> engine Fixes: #4526 Change-Id: If117099b8521e15887ae916a5dbfcfa0b7cd594b (cherry picked from commit 66373c58118dc70ef59ff60c0516ef158966c47b) --- diff --git a/doc/build/core/pooling.rst b/doc/build/core/pooling.rst index a23420390d..0514f7f2d7 100644 --- a/doc/build/core/pooling.rst +++ b/doc/build/core/pooling.rst @@ -415,12 +415,12 @@ connections from the pool so that it makes all new ones. Below is a simple version using ``multiprocessing.Process``, but this idea should be adapted to the style of forking in use:: - eng = create_engine("...") + engine = create_engine("...") def run_in_process(): - eng.dispose() + engine.dispose() - with eng.connect() as conn: + with engine.connect() as conn: conn.execute("...") p = Process(target=run_in_process) @@ -433,7 +433,7 @@ This is a little more magical but probably more foolproof:: from sqlalchemy import exc import os - eng = create_engine("...") + engine = create_engine("...") @event.listens_for(engine, "connect") def connect(dbapi_connection, connection_record):