Anders Kaseorg
a50eb2e809
mypy: Enable new error explicit-override.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-12 12:28:41 -07:00
AcKindle3
b0ef8f0822
test: Replace occurences of `uri` with `url`.
...
In all the tests files, replaced all occurences of `uri` with `url`
appeared in comments, local variablles, function names and their callers.
2023-04-08 16:27:55 -07:00
Anders Kaseorg
9ee636e920
requirements: Upgrade Python requirements.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-06-01 16:01:54 -07:00
Anders Kaseorg
ee71650908
python: Replace requests.packages.urllib3 alias with urllib3.
...
requests stopped vendoring urllib3 in 2.16.0 (2017-05-26).
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-01-23 22:14:17 -08:00
Alex Vandiver
bf9780267d
outgoing_http: Give an easy way to configure retries.
...
The default is kept as no retries. Since retries with exponential
backoff are a good thing to make easy, the int form defaults to
setting a backoff_factor.
Unfortunately, urllib3 retry backoff does not implement jitter.
Switching this to use the `backoff` library[1] rather than urllib3's
native Retry is left as future extension.
[1] https://pypi.org/project/backoff/
2021-09-01 05:34:13 -07:00
Anders Kaseorg
5483ebae37
python: Convert "".format to Python 3.6 f-strings.
...
Generated automatically by pyupgrade.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-08-02 15:53:52 -07:00
Abhijeet Prasad Bodas
352634a851
tests: Consistently use assert_length helper.
...
This helper does some nice things like printing out
the data structure incase of failure.
2021-05-19 11:55:56 -07:00
Alex Vandiver
8df82f50e4
outgoing_http: Provide a convenient way to set default headers.
2021-05-07 08:39:36 -07:00
Alex Vandiver
6339e7fd47
outgoing_http: Put the X-Smokescreen-Role in the proxy headers.
2021-05-07 08:39:36 -07:00
Alex Vandiver
b88d7a741e
outgoing_http: Factor out outgoing HTTP session with timeout.
2021-05-07 08:39:36 -07:00