Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions asyncpg/pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,15 +271,15 @@ def create_pool(dsn=None, *,

async with asyncpg.create_pool(user='postgres',
command_timeout=60) as pool:
async with poll.acquire() as con:
async with pool.acquire() as con:
await con.fetch('SELECT 1')

Or directly with ``await``:

.. code-block:: python

pool = await asyncpg.create_pool(user='postgres', command_timeout=60)
con = await poll.acquire()
con = await pool.acquire()
try:
await con.fetch('SELECT 1')
finally:
Expand Down