boolean parsing in engine_from_config wrt engine strategies is incorrect

Issue #3435 resolved
Mike Bayer repo owner created an issue
diff --git a/test/engine/test_parseconnect.py b/test/engine/test_parseconnect.py
index fb1f338..dfd39d0 100644
--- a/test/engine/test_parseconnect.py
+++ b/test/engine/test_parseconnect.py
@@ -138,6 +138,16 @@ class CreateEngineTest(fixtures.TestBase):
                             'z=somevalue')
         assert e.echo is True

+    def test_pool_threadlocal_from_config(self):
+        dbapi = mock_dbapi
+
+        config = {
+            'sqlalchemy.url': 'postgresql://scott:tiger@somehost/test',
+            'sqlalchemy.pool_threadlocal': "false"}
+
+        e = engine_from_config(config, module=dbapi, _initialize=False)
+        eq_(e.pool._use_threadlocal, False)
+
     def test_pool_reset_on_return_from_config(self):
         dbapi = mock_dbapi

fails. We have 'bool' as the handler in default.py and there is no string processing here.

Comments (1)

  1. Mike Bayer reporter
    • Fixed bug where known boolean values used by :func:.engine_from_config were not being parsed correctly; these included pool_threadlocal and the psycopg2 argument use_native_unicode. fixes #3435
    • add legacy_schema_aliasing config parsing for mssql
    • move use_native_unicode config arg to the psycopg2 dialect

    → <<cset a50dcb31b975>>

  2. Log in to comment