by tyingq · 4y ago · 0 comments
Also, urllib3 has a dependency on the shipped urllib, and requests depends on urllib3.
Edit: I was correct about urllib not doing keep-alive, but incorrect about urllib3 and requests...those support it.
Maybe I'm not understanding part of your message?
"urllib.request module uses HTTP/1.1 and includes a "Connection:close" header in its HTTP requests"[1]
[1] https://github.com/python/cpython/blob/3.10/Lib/urllib/reque...
You seem to be correct about urllib3 and requests, I was wrong there...though they do have the dependency on urllib.
What on earth is normal keep-alives in this context? And you can most certainly reuse connections with Session objects: https://requests.readthedocs.io/en/latest/user/advanced/