ba9f06e0c2
urllib3 1.x used to accept socket._GLOBAL_DEFAULT_TIMEOUT as a sentinal object to mean "no configured timeout". In urllib3 2.x, urllib3 uses its own _DEFAULT_TIMEOUT sentinal object, and it rejects socket._GLOBAL_DEFAULT_TIMEOUT. Assign our own DEFAULT_TIMEOUT constant to the newer object if it exists, and fall back to the old behavior on old urllib3 versions. Co-authored-by: Vsevolod Fedorov <vsevolod.fedorov@gmail.com> Closes-Bug: #2018567 Change-Id: Ic626ba0e8ed79eec3a63ffab6cc02f91aa545ab1