-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
trust_env=True of aiohttp.ClientSession should not print a warning log nor try to access each time a file #3298
Comments
GitMate.io thinks the contributor most likely able to help you is @asvetlov. Possibly related issues are #2867 (aiohttp.ClientSession reconnect ), #919 (Suggesting aiohttp.ClientSession.abort()), #2209 (ClientSession.close() is a coroutine warning), #3248 ( |
A warning is addressed by #3267 Regarding caching |
- Works but has a bug at the moment of printing that ~/.netrc is missing https://pastebin.com/tSYtrvjr - Tracked here: aio-libs/aiohttp#3298 - Fixes #73
- Works but has a bug at the moment of printing that ~/.netrc is missing https://pastebin.com/tSYtrvjr - Tracked here: aio-libs/aiohttp#3298 - Fixes #73
- Works but has a bug at the moment of printing that ~/.netrc is missing https://pastebin.com/tSYtrvjr - Tracked here: aio-libs/aiohttp#3298 - Fixes #73
I see fixes for this are all landed - When do we expect a >= 3.4.4 release as I'd love to enable this for bandersnatch (as linked). |
No release date is scheduled. |
- Works but has a bug at the moment of printing that ~/.netrc is missing https://pastebin.com/tSYtrvjr - Tracked here: aio-libs/aiohttp#3298 - Fixes #73
Logging is tuned, file access caching idea is rejected |
Long story short
When setting
trust_env=True
foraiohttp.ClientSession
, a warning like the following one is printed to the log if the file.netrc
is missing.This should not happen as the intention is to only access environment variables. Beyond that, the file access should only happen once and not again and again for each instance of
aiohttp.ClientSession
. This is for example the reason why pull request 16874 for home-assistant was rejected.Expected behaviour
Setting
trust_env=True
foraiohttp.ClientSession
should not print a warning and should not try to access a file each time.Actual behaviour
If the file
.netrc
is missing, a warning is printed and for each instance ofaiohttp.ClientSession
the file check is repeated.Steps to reproduce
Create an instance of
aiohttp.ClientSession
withtrust_env=True
when there is no.netrc
file.Your environment
aiohttp version 3.4.4, used as client, running on Ubuntu 18.04 with python 3.6.6
The text was updated successfully, but these errors were encountered: