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

Incorrect type annotation or docs for TCPConnector(limit=...) #6623

Closed
1 task done
amacfie opened this issue Feb 16, 2022 · 1 comment · Fixed by #8930
Closed
1 task done

Incorrect type annotation or docs for TCPConnector(limit=...) #6623

amacfie opened this issue Feb 16, 2022 · 1 comment · Fixed by #8930
Labels

Comments

@amacfie
Copy link

amacfie commented Feb 16, 2022

Describe the bug

The docs for TCPConnector https://docs.aiohttp.org/en/stable/client_reference.html#tcpconnector say that the limit argument can be None but in the code it's annotated with type int:

limit: int = 100,
.

To Reproduce

N/A

Expected behavior

N/A

Logs/tracebacks

N/A

Python Version

3.10

aiohttp Version

stable

multidict Version

N/A

yarl Version

N/A

OS

N/A

Related component

Client

Additional context

No response

Code of Conduct

  • I agree to follow the aio-libs Code of Conduct
@amacfie amacfie added the bug label Feb 16, 2022
@Dreamsorcerer
Copy link
Member

This one says 0:

If limit is 0 the connector has no limit.

So, should probably update the documentation to that. The code appears to only check if limit, so both 0 and None should work at runtime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants