Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump psycorg and sqlalchemy, add python 3.8, 3.9 to test matrix #754

Merged
merged 2 commits into from
Dec 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:
python:
- 3.6
- 3.7
- 3.8
- 3.9
fail-fast: false
runs-on: ubuntu-latest
timeout-minutes: 15
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.6
sqlalchemy[postgresql_psycopg2binary]==1.3.20
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from setuptools import setup, find_packages

install_requires = ['psycopg2-binary>=2.7.0']
install_requires = ['psycopg2-binary>=2.8.4']
extras_require = {'sa': ['sqlalchemy[postgresql_psycopg2binary]>=1.1']}


Expand Down Expand Up @@ -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',
Expand Down
3 changes: 1 addition & 2 deletions tests/test_async_await.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import asyncio

import psycopg2
import pytest

import aiopg
Expand Down Expand Up @@ -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):
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@asvetlov I'm pretty unsure about this, but it looks like this behaviour has changed because of psycorg update to 2.8+. Do you have any thoughts about this?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't monitor psycopg2 changelist but this line looks good to me if the test passes.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, thanks.

PS I had tried to figure out why it could happened from change log, but failed to do so 😢

with cursor_ctx as cursor:
hung_task = cursor.execute('SELECT pg_sleep(10000);')
# start task
Expand Down