diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2022-05-22 14:28:14 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2022-05-22 15:24:05 -0400 |
commit | 656fd0d73a679a2588289e285328af707e9401d1 (patch) | |
tree | 16517d5b939986f04ea421ce957aeccdc0e684df /test/engine/test_pool.py | |
parent | 0620614f95f62f35396e63c636cae98a0759f3ab (diff) | |
download | sqlalchemy-656fd0d73a679a2588289e285328af707e9401d1.tar.gz |
deprecate .connection on _ConnectionFairy, _ConnectionRecord
These are replaced by the read-only ManagesConnection.dbapi_connection
attribute.
For some reason both of these objects had "setter" for .connection
as well; there's no use case for that at all so just remove
setter logic entirely.
Fixes: #6981
Change-Id: I6425de4a017f6370e1a7476cd491cabc55e55e67
Diffstat (limited to 'test/engine/test_pool.py')
-rw-r--r-- | test/engine/test_pool.py | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/test/engine/test_pool.py b/test/engine/test_pool.py index 7f2dd434c..2bbb976a8 100644 --- a/test/engine/test_pool.py +++ b/test/engine/test_pool.py @@ -198,7 +198,6 @@ class PoolTest(PoolTestBase): assert not r1.dbapi_connection c1 = r1.get_connection() is_(c1, r1.dbapi_connection) - is_(c1, r1.connection) is_(c1, r1.driver_connection) def test_rec_close_reopen(self): @@ -319,13 +318,11 @@ class PoolTest(PoolTestBase): is_not_none(rec.dbapi_connection) - is_(rec.connection, rec.dbapi_connection) is_(rec.driver_connection, rec.dbapi_connection) fairy = pool._ConnectionFairy(p1, rec.dbapi_connection, rec, False) is_not_none(fairy.dbapi_connection) - is_(fairy.connection, fairy.dbapi_connection) is_(fairy.driver_connection, fairy.dbapi_connection) is_(fairy.dbapi_connection, rec.dbapi_connection) @@ -349,32 +346,16 @@ class PoolTest(PoolTestBase): assert rec.dbapi_connection is not None is_not_none(rec.dbapi_connection) - is_(rec.connection, rec.dbapi_connection) is_(rec.driver_connection, mock_dc) fairy = pool._ConnectionFairy(p1, rec.dbapi_connection, rec, False) is_not_none(fairy.dbapi_connection) - is_(fairy.connection, fairy.dbapi_connection) is_(fairy.driver_connection, mock_dc) is_(fairy.dbapi_connection, rec.dbapi_connection) is_(fairy.driver_connection, mock_dc) - def test_connection_setter(self): - dbapi = MockDBAPI() - p1 = pool.Pool(creator=lambda: dbapi.connect("foo.db")) - - rec = pool._ConnectionRecord(p1) - - is_not_none(rec.dbapi_connection) - - is_(rec.connection, rec.dbapi_connection) - rec.connection = 42 - is_(rec.connection, rec.dbapi_connection) - rec.dbapi_connection = 99 - is_(rec.connection, rec.dbapi_connection) - class PoolDialectTest(PoolTestBase): def _dialect(self): |