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

Rephrase async contextmanager DBConnection to use asynccontextmanager #15538

Merged
merged 2 commits into from
Jun 16, 2023

Conversation

aqk
Copy link
Contributor

@aqk aqk commented Jun 15, 2023

https://docs.python.org/3/library/contextlib.html#contextlib.asynccontextmanager

Purpose:

Code improvement suggested from #14946 a PR meant to improve type-checking.

This PR updates DBConnection to use asynccontextmanager

No new behaviour.

Testing Notes:

@aqk aqk added the Changed Required label for PR that categorizes merge commit message as "Changed" for changelog label Jun 15, 2023
@aqk aqk requested review from altendky and arvidn June 15, 2023 21:05
@aqk aqk requested a review from a team as a code owner June 15, 2023 21:05
Copy link
Contributor

@altendky altendky left a comment

Choose a reason for hiding this comment

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

context managers are the way, and this is the way to write them...

@wallentx wallentx merged commit d196247 into main Jun 16, 2023
203 of 204 checks passed
@wallentx wallentx deleted the ak.async-iterator-style branch June 16, 2023 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changed Required label for PR that categorizes merge commit message as "Changed" for changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants