2.4.0 request refused raises different exception (breaking change)
(related: #2190)
in 2.3.0 the following code worked:
server_is_down = True
while server_is_down:
try:
requests.get(somehost)
except requests.ConnectionError:
sleep(0.1)
continue
server_is_down = False
in 2.4.0 this instead raises some urllib3 error:
ProtocolError: ('Connection aborted.', error(111, 'Connection refused'))
this may just be another instance of #1572
Why the hell isn't this wrapped? It looks like it should have raised a MaxRetryError which we'd have wrapped, but it just doesn't. Odd.
@kevinburke Did retry logic change to not raise MaxRetryErrors when retries=0?
@Lukasa retries=False does not raise MaxRetryErrors, not sure if the same is true for retries=0.
I'm pretty sure this is new: we used to get MaxRetryErrors in our default case. That's going to break a lot of our logic because we don't catch urllib3 HTTPErrors. We probably should treat them like MaxRetryErrors.
@Lukasa I think this is fixed in #2193 since this is very related to #2192.
I actually think this is exactly fixed by #2193. =P