From b5ff78e9f5c8ef172eca7cf188ab53b1348bf1b0 Mon Sep 17 00:00:00 2001 From: Yury Pliner Date: Fri, 4 Dec 2020 16:33:24 +0500 Subject: [PATCH 1/2] Bump psycorg and sqlalchemy, add python 3.8, 3.9 to test matrix --- .github/workflows/ci.yml | 2 ++ requirements.txt | 4 ++-- setup.py | 6 ++++-- tests/test_async_await.py | 3 +-- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1ce07353..4638aac9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,6 +19,8 @@ jobs: python: - 3.6 - 3.7 + - 3.8 + - 3.9 fail-fast: false runs-on: ubuntu-latest timeout-minutes: 15 diff --git a/requirements.txt b/requirements.txt index 4ef330e3..ec0eb5a1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,5 +9,5 @@ pytest-cov==2.8.1 pytest-sugar==0.9.2 pytest-timeout==1.3.4 sphinxcontrib-asyncio==0.2.0 -psycopg2-binary==2.7.7 -sqlalchemy[postgresql_psycopg2binary]==1.3.13 +psycopg2-binary==2.8.4 +sqlalchemy[postgresql_psycopg2binary]==1.3.14 diff --git a/setup.py b/setup.py index a7c2a90b..017d8323 100644 --- a/setup.py +++ b/setup.py @@ -3,8 +3,8 @@ from setuptools import setup, find_packages -install_requires = ['psycopg2-binary>=2.7.0'] -extras_require = {'sa': ['sqlalchemy[postgresql_psycopg2binary]>=1.1']} +install_requires = ['psycopg2-binary>=2.8.4'] +extras_require = {'sa': ['sqlalchemy[postgresql_psycopg2binary]>=1.3.14']} def read(f): @@ -39,6 +39,8 @@ def read_changelog(path='CHANGES.txt'): 'Programming Language :: Python :: 3 :: Only', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', 'Operating System :: POSIX', 'Operating System :: MacOS :: MacOS X', 'Operating System :: Microsoft :: Windows', diff --git a/tests/test_async_await.py b/tests/test_async_await.py index 943f3495..0ad34e25 100644 --- a/tests/test_async_await.py +++ b/tests/test_async_await.py @@ -1,6 +1,5 @@ import asyncio -import psycopg2 import pytest import aiopg @@ -56,7 +55,7 @@ async def test_pool_context_manager_timeout(pg_params, loop): async with aiopg.create_pool(**pg_params, minsize=1, maxsize=1) as pool: cursor_ctx = await pool.cursor() - with pytest.raises(psycopg2.ProgrammingError): + with pytest.warns(ResourceWarning): with cursor_ctx as cursor: hung_task = cursor.execute('SELECT pg_sleep(10000);') # start task From 39dc63fe1fc28e31d1be857908fd28f8972eebe8 Mon Sep 17 00:00:00 2001 From: Yury Pliner Date: Sat, 5 Dec 2020 01:52:58 +0500 Subject: [PATCH 2/2] Fix deps versions after discussion with @asvetlov --- requirements.txt | 4 ++-- setup.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/requirements.txt b/requirements.txt index ec0eb5a1..fe54d2ba 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,5 +9,5 @@ pytest-cov==2.8.1 pytest-sugar==0.9.2 pytest-timeout==1.3.4 sphinxcontrib-asyncio==0.2.0 -psycopg2-binary==2.8.4 -sqlalchemy[postgresql_psycopg2binary]==1.3.14 +psycopg2-binary==2.8.6 +sqlalchemy[postgresql_psycopg2binary]==1.3.20 diff --git a/setup.py b/setup.py index 017d8323..aff59424 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ from setuptools import setup, find_packages install_requires = ['psycopg2-binary>=2.8.4'] -extras_require = {'sa': ['sqlalchemy[postgresql_psycopg2binary]>=1.3.14']} +extras_require = {'sa': ['sqlalchemy[postgresql_psycopg2binary]>=1.1']} def read(f):