From: Denis Laxalde Date: Tue, 2 Nov 2021 12:39:30 +0000 (+0100) Subject: Add required type variable to (Async)Connection in pool tests X-Git-Tag: 3.0.2~2^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e6feb14a1cd73fcc3cb03da09d368ee91acfe79c;p=thirdparty%2Fpsycopg.git Add required type variable to (Async)Connection in pool tests --- diff --git a/tests/pool/test_pool.py b/tests/pool/test_pool.py index 9931fb765..416b9bde0 100644 --- a/tests/pool/test_pool.py +++ b/tests/pool/test_pool.py @@ -4,6 +4,7 @@ import weakref from time import sleep, time from threading import Thread, Event from collections import Counter +from typing import Any import pytest @@ -52,7 +53,7 @@ def test_min_size_max_size(dsn): def test_connection_class(dsn): - class MyConn(psycopg.Connection): + class MyConn(psycopg.Connection[Any]): pass with pool.ConnectionPool(dsn, connection_class=MyConn, min_size=1) as p: diff --git a/tests/pool/test_pool_async.py b/tests/pool/test_pool_async.py index e8593946f..58abfd5dd 100644 --- a/tests/pool/test_pool_async.py +++ b/tests/pool/test_pool_async.py @@ -3,6 +3,7 @@ import asyncio import logging from time import time from collections import Counter +from typing import Any import pytest @@ -48,7 +49,7 @@ async def test_min_size_max_size(dsn): async def test_connection_class(dsn): - class MyConn(psycopg.AsyncConnection): + class MyConn(psycopg.AsyncConnection[Any]): pass async with pool.AsyncConnectionPool(