Commit graph

108 commits

Author SHA1 Message Date
Christopher Wolfe
79f3cc50a5 Deprecated error response body transformation. 2019-11-14 10:19:48 -05:00
Andrew Rabert
f420761e82
Merge pull request #24 from gmr/fix-default-timeouts
Fix compile-time setting of default args in http_fetch
2019-10-29 21:10:28 -04:00
Gavin M. Roy
3b13f19d95 CONTENT_TYPE_MSGPACK is not a class level const 2019-10-29 13:09:45 -04: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
Gavin M. Roy
a0de81691c
Merge pull request #23 from ThrowsException/remove-lru
remove lru cache from body property
2019-09-20 15:41:55 -04:00
Chester O'Neill
9a7929846c
remove lru cache from body property 2019-09-20 14:57:23 -04:00
Andrew Rabert
f576a6778f Update README 2019-08-30 15:54:37 -04:00
Andrew Rabert
38d29dbde1 Release version 2.2.0 2019-08-29 17:00:08 -04:00
Andrew Rabert
6d440cf208 Update test deps 2019-08-29 16:56:09 -04:00
Ryan Mclean
8e94957c05
Merge pull request #22 from nvllsvm/exception_handling
Add handling of tornado.httpclient.HTTPError
2019-08-29 16:52:51 -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
Andrew Rabert
6b4095ec49
Merge pull request #20 from dave-shawley/fix-docs
Fix doc build
2019-08-04 10:19:01 -04:00
Dave Shawley
df7a046dac Update years in LICENSE. 2019-08-04 08:29:51 -04:00
Dave Shawley
ff7ca1b175 Hard-pin tool requirements to avoid surprises. 2019-08-04 08:29:14 -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
dave-shawley
d4ef969532
Update README.rst
fixed mention of sprockets.mixins.mediatype
2019-08-01 12:00:09 -04:00
Andrew Rabert
08d3fa94f7 Release 2.1.0 2019-05-07 11:17:59 -04:00
Andrew Rabert
f5ea3ccb8d
Merge pull request #19 from nvllsvm/str
Cast url to str
2019-05-07 11:12:25 -04:00
Andrew Rabert
52c1d5084d Cast url to str
Allows easy use of abstractions like yarl.URL
2019-05-07 11:04:51 -04:00
Andrew Rabert
982219a10b Use https 2019-04-11 09:41:10 -04:00
Gavin M. Roy
e764e304d6 Fix consumer User-Agent behavior 2019-04-01 17:38:41 -04:00
Gavin M. Roy
f65b88f8e4 Fix consumer user-agent behavior 2019-04-01 17:25:39 -04:00
Andrew Rabert
af52a870af
Merge pull request #18 from gmr/master
Multiple client improvements
2019-04-01 17:15:40 -04:00
Gavin M. Roy
9b00de127c Include lru_cache 2019-04-01 17:09:54 -04:00
Gavin M. Roy
d9246b1f60 Enable flake8 for conf.py 2019-04-01 16:59:28 -04:00
Gavin M. Roy
9b2521fd29 Is not required 2019-04-01 16:57:53 -04:00
Gavin M. Roy
5d4ce37ff0 ConnectionError is also raised 2019-04-01 16:31:40 -04:00
Gavin M. Roy
27b2daf289 Refactor HTTPResponse to class from namedtuple 2019-04-01 15:10:25 -04:00
Gavin M. Roy
2d17d2fe2e flake8 cleanup 2019-04-01 11:39:13 -04:00
Gavin M. Roy
bd4ed28fe1 Flake8 and test env fixes 2019-04-01 11:27:24 -04:00
Gavin M. Roy
ed9c4adc81 Include u-msgpack-python in the testing env 2019-04-01 11:22:29 -04:00
Gavin M. Roy
cd488b7dc2 Add flake8 test to travis-ci job 2019-04-01 11:19:36 -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
Gavin M. Roy
4ee088c562 Add flake8, remove mock, and add sprockets.mixins.mediatype 2019-04-01 09:56:25 -04:00
Gavin M. Roy
eceb3b6103 Handle CurlError 2019-04-01 09:55:58 -04:00
Gavin M. Roy
0c7fb45408 Unused assignment 2019-04-01 09:50:59 -04:00
Gavin M. Roy
58a2a547d5 Extract the netloc when rate limited for more helpful log lines 2019-04-01 09:50:04 -04:00
Andrew Rabert
77b5b95efa
Merge pull request #16 from noone234/doc
Updated required package versions in README file.
2019-02-15 13:10:10 -05:00
Christopher Wolfe
b110bd39b0 Updated msgpack requirement. 2019-02-15 12:52:21 -05:00
Christopher Wolfe
923e973809 Updated required package versions in README file. 2019-02-15 08:07:03 -05:00
Andrew Rabert
c87f2f001a
Merge pull request #14 from nvllsvm/trans
Use sprockets.mixins.mediatype transcoders
2019-01-10 16:39:17 -05:00
Andrew Rabert
d08540a5ca Fix dep ver 2019-01-10 13:07:05 -05:00
Andrew Rabert
8ab79eb55f Release version 1.1.1 2019-01-09 16:22:56 -05:00
Andrew Rabert
b3b06e5f99
Merge pull request #15 from noone234/fix-content-type
Fix content type
2019-01-09 16:20:05 -05:00
Christopher Wolfe
4ce0afcd6f New test requires Python v3. 2019-01-09 16:16:48 -05:00
Christopher Wolfe
3842ef8792 Tests _http_resp_deserialize() with a response that lacks a Content-Type
header.
2019-01-09 15:32:21 -05:00
Christopher Wolfe
259f6e30e7 When response header lacks Content-Type, _http_resp_deserialize() gives up.
It does not try to deserialize the response body.
2019-01-09 13:52:54 -05:00
Andrew Rabert
2368b24af3 Fix travis
Also move doc requirements to requires dir
2018-12-20 01:48:19 -05:00