Skip to content

Conversation

@Tynukua
Copy link

No description provided.

@eirnym
Copy link

Looks good for me.

returnawaitcon.fetchrow(query, *args, timeout=timeout)

defacquire(self, *, timeout=None):
defacquire(self, *, timeout=None)->connection.Connection:
Copy link
Contributor

Choose a reason for hiding this comment

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

This type hint only covers usual await case:

con=awaitpool.acquire()

But won't work properly for context manager case:

asyncwithpool.acquire() ascon: awaitcon.execute(...)

The more correct return type could be something like PoolAcquireContext but we should check if mypy understands it first.

Copy link
Contributor

Choose a reason for hiding this comment

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

#577 contains more precise types

@DanielNoord
Copy link
Contributor

It is clear that this is incorrect and should be PoolAcquireContext.

I'd suggest either changing that in this PR or just closing this and wait until a PR that targets more of these simple methods is created.

@DanielNoord
Copy link
Contributor

This is superseded by #1209

Sign up for freeto 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.

4 participants

@Tynukua@eirnym@DanielNoord@and-semakin