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

Documentation mentions async_timeout as dependency #8379

Open
1 task
mdczaplicki opened this issue Apr 24, 2024 · 2 comments
Open
1 task

Documentation mentions async_timeout as dependency #8379

mdczaplicki opened this issue Apr 24, 2024 · 2 comments
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers need pull request reproducer: present This PR or issue contains code, which reproduce the problem described or clearly understandable STR

Comments

@mdczaplicki
Copy link

mdczaplicki commented Apr 24, 2024

Describe the bug

The documentation mentions that async_timeout is one of the dependencies of aiohttp, but it's not.

https://docs.aiohttp.org/en/stable/#dependencies

To Reproduce

  1. Install aiohttp==3.9.5
  2. import async_timeout

Expected behavior

Works

Logs/tracebacks

x

Python Version

$ python --version
3.11.9

aiohttp Version

$ python -m pip show aiohttp
3.9.5

multidict Version

$ python -m pip show multidict

yarl Version

$ python -m pip show yarl

OS

x

Related component

Client

Additional context

No response

Code of Conduct

  • I agree to follow the aio-libs Code of Conduct
@webknjaz
Copy link
Member

It is a fallback in older runtimes: https://github.com/aio-libs/aiohttp/blob/4928ae3/setup.cfg#L54 / https://github.com/aio-libs/aiohttp/blob/4928ae3/aiohttp/client_ws.py#L28. The stdlib is always preferred when available.

This is not a software bug but a documentation issue. Anyway, you shouldn't be relying on transitive dependencies — it's wrong from the packaging perspective. If you use something directly from your code base, that's your direct dependency and you should treat it as such instead of hoping that something else will bring it in occasionally.

@webknjaz webknjaz added good first issue Good for newcomers need pull request documentation Improvements or additions to documentation reproducer: present This PR or issue contains code, which reproduce the problem described or clearly understandable STR and removed bug labels Apr 24, 2024
@mdczaplicki
Copy link
Author

Of course I shouldn't be relying, but that's why I've found it 😁 I've already switched to native. I've just thought that I'll let you know.
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers need pull request reproducer: present This PR or issue contains code, which reproduce the problem described or clearly understandable STR
Projects
None yet
Development

No branches or pull requests

2 participants