Commit graph

45 commits

Author SHA1 Message Date
Andrew Rabert
bb8e4e6014 Release 2.6.0 2022-03-07 18:04:25 -05:00
Dave Shawley
b91333aae3
2.5.0: Add _http_req_modify_for_retry hook.
* #38: HTTPResponse.links is always a list
* #39: Add hook to modify the request before each retry
2021-09-16 15:33:41 -04:00
Dave Shawley
f7f5461ea2
Add _http_req_modify_for_retry hook method.
The new hook gives the user a place to modify requests on a per
attempt basis.  This is required for protocols that include
one-time-use nonces such as OAuth 1.
2021-09-15 15:57:55 -04:00
Andrew Rabert
5324f7db72 Change HTTPResponse.links to return empty list when Link header is not present 2021-09-15 11:33:25 -04:00
Dave Shawley
3e1e1e40a6 2.4.1: Sleep between ALL retries.
- `Retry-After` header is preferred if present in the response
- HTTPClientMixin.DEFAULT_RETRY_TIMEOUT sets the default sleep time
- Sleep time can be set by the `retry_timeout` keyword arg
- Sleep time is exponentially increased with attempt count if the
  `Retry-After` header is not present.
2020-11-30 06:40:02 -05:00
Dave Shawley
7ba2e10432 Add sleeps between all retry attempts. 2020-11-25 12:12:20 -05:00
Andrew Rabert
08ba44a565 Use class var for default retry timeout
This allows me to "disable" retry in tests where I'm using a mocked
response.
2020-11-25 09:12:32 -05:00
Dave Shawley
34dc5dee03 2.4.0: Rate limit 503s 2020-11-03 09:47:13 -05:00
Dave Shawley
7a9edfe20d Advertise support for Python 3.8 & 3.9. 2020-11-02 11:24:31 -05:00
Dave Shawley
4cdd0550e4 Rate limit 503s as well as 423s & 429s. 2020-11-02 11:24:31 -05:00
Dave Shawley
a6ee7c3545 Fix serialization of empty request bodies. 2020-09-16 15:27:32 -04:00
Dave Shawley
0109e655c7 Version bump to 2.3.3
since I forgot to install my pre-push hook!
2020-04-08 16:25:52 -04:00
Dave Shawley
eecc557d4c Version bump to 2.3.2 2020-04-08 16:17:40 -04:00
Dave Shawley
7309cff4cc Pass kwargs through to http client fetch. 2020-04-07 11:45:17 -04:00
Dave Shawley
7058cb3f27 Fix some documentation problems. 2020-04-07 09:00:12 -04:00
Dave Shawley
1615f25a35 Version bump to 2.3.1 2020-04-07 08:56:04 -04:00
Dave Shawley
12921c1d46 Don't obey rogue Retry-After headers. 2020-04-06 16:06:23 -04:00
Christopher Wolfe
982b864929 Increased version to 2.3.0 2019-12-09 10:51:43 -05:00
Christopher Wolfe
c84e9617d8 Revised release notes. 2019-12-06 13:08:24 -05:00
Christopher Wolfe
8ba973fea7 Revised notes. 2019-11-14 10:53:47 -05:00
Christopher Wolfe
79f3cc50a5 Deprecated error response body transformation. 2019-11-14 10:19:48 -05:00
Gavin M. Roy
3b697e766d Fix compile-time setting of default args in http_fetch 2019-10-29 13:07:58 -04:00
Gavin M. Roy
33a539f91c Bump the rev and update history 2019-09-20 15:45:36 -04:00
Andrew Rabert
38d29dbde1 Release version 2.2.0 2019-08-29 17:00:08 -04:00
Andrew Rabert
5998afd1e0 Add handling of tornado.httpclient.HTTPError
Only handle OSError and httpclient.HTTPError.
- We can assume any instance of httpclient.HTTPError is a failure
  unrelated to the status code of the response. This is due to
  sprockets.mixins.http setting `raise_error=False` when making the
  request.
- ConnectionError and socket.gaierror are both instances of OSError
- CurlError is an instance of tornado.httpclient.HTTPError
- Other instances of tornado.httpclient.HTTPError include
  HTTPTimeoutError and HTTPStreamClosedError

Also needed to fix the instance assertions in the test. It was always
true as it was evaluating the truthyness of a list - not the isinstance
values.
2019-08-29 16:01:55 -04:00
Dave Shawley
14a6f227f0 Update doc links to point at readthedocs.io 2019-08-04 08:28:49 -04:00
Dave Shawley
7a326e51e7 Remove docs handling of namedtuples.
http.HTTPResponse is no longer a named tuple so the docs shouldn't treat
it as such.  This was breaking documentation builds.
2019-08-04 08:25:05 -04:00
Andrew Rabert
08d3fa94f7 Release 2.1.0 2019-05-07 11:17:59 -04:00
Gavin M. Roy
e764e304d6 Fix consumer User-Agent behavior 2019-04-01 17:38:41 -04:00
Gavin M. Roy
27b2daf289 Refactor HTTPResponse to class from namedtuple 2019-04-01 15:10:25 -04:00
Gavin M. Roy
627e87f069 Multiple client improvements
- Add ``history`` attribute of the response with all response objects
- Add ``links`` attribute of the response with the parsed link header if set
- Change logging level in a few places to a more appropriate level
- Add support for rejected consumers when auto-creating the ``User-Agent`` header
- Add the netloc of a request to the log entry created when rate limited
- Use RequestHandler.settings instead of RequestHandler.application.settings
  when auto-creating the ``User-Agent`` header for a Tornado request handler
- Add test coverage of the Warning response header behavior
2019-04-01 11:16:27 -04:00
Andrew Rabert
8ab79eb55f Release version 1.1.1 2019-01-09 16:22:56 -05:00
Andrew Rabert
3156db2bac Fix doc header 2018-10-11 14:58:13 -04:00
Andrew Rabert
b593214b89 Release version 1.1.0 2018-10-11 14:54:39 -04:00
Andrew Rabert
9ea803523a Release version 1.0.9 2018-08-07 16:01:15 -04:00
Andrew Rabert
bcd89a05d6 Version 1.0.8 2018-02-07 16:18:50 -05:00
Gavin M. Roy
07339af919 Change the hard pin on u-msgpack-python 2017-10-19 10:34:25 -04:00
Dave Shawley
6b5999794a Release max_http_attempts kwarg (1.0.6) 2017-08-16 14:36:02 -04:00
Brian Korty
3138885d37 Bump the version to 1.0.5
Fix a small typo in the comments and bump the version to 1.0.5
2017-08-07 14:17:53 -04:00
Gavin M. Roy
01d04c5a6c Bump the version, fix the docs 2017-05-12 15:24:40 -04:00
Ryan Mclean
cc886ab502 Add support for passing the user_agent parameter per request 2017-05-12 12:00:23 -04:00
Gavin M. Roy
47db53f28f Fix installation 2017-04-28 09:15:58 -04:00
Gavin M. Roy
9b454021b9 Documentation updates 2017-04-26 22:50:14 -04:00
Gavin M. Roy
afdbb40d4f Bump the version for release 2017-04-26 18:50:40 -04:00
Gavin M. Roy
8eaf4c5d92 Initial version 2017-04-26 17:56:21 -04:00