Skip to content

Conversation

@recloud-dev
Copy link

No description provided.

@chandr-andr
Copy link
Member

@recloud-dev Hello!
Thank you very much for your contribution.
What do you think about changing this

connection = await db_pool.connection()
await connection.execute(...)
await connection.close()

to this variant:

async with db_pool.acquire() as conn:
	await conn.execute(...)

Usually, it's better to let the context manager do all the work.

@recloud-dev
Copy link
Author

recloud-dev commented Oct 9, 2025

Yep, it's better this way, I'll make a replacement.

Copy link
Member

@chandr-andr chandr-andr left a comment

Choose a reason for hiding this comment

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

LGTM

@chandr-andr chandr-andr merged commit 2549109 into psqlpy-python:main Oct 10, 2025
42 of 45 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants