Skip to content

Refactor args parsing and config management for connect and create_pool #130

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

Merged
merged 1 commit into from
May 5, 2017
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
5 changes: 3 additions & 2 deletions asyncpg/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
# the Apache 2.0 License: http://www.apache.org/licenses/LICENSE-2.0


from .connection import connect # NOQA
from .connection import connect, Connection # NOQA
from .exceptions import * # NOQA
from .pool import create_pool # NOQA
from .protocol import Record # NOQA
from .types import * # NOQA


__all__ = ('connect', 'create_pool', 'Record') + exceptions.__all__ # NOQA
__all__ = ('connect', 'create_pool', 'Record', 'Connection') + \
exceptions.__all__ # NOQA
3 changes: 3 additions & 0 deletions asyncpg/_testbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@


from asyncpg import cluster as pg_cluster
from asyncpg import connection as pg_connection
from asyncpg import pool as pg_pool


Expand Down Expand Up @@ -162,12 +163,14 @@ def create_pool(dsn=None, *,
init=None,
loop=None,
pool_class=pg_pool.Pool,
connection_class=pg_connection.Connection,
**connect_kwargs):
return pool_class(
dsn,
min_size=min_size, max_size=max_size,
max_queries=max_queries, loop=loop, setup=setup, init=init,
max_inactive_connection_lifetime=max_inactive_connection_lifetime,
connection_class=connection_class,
**connect_kwargs)


Expand Down
Loading