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
Andrew Rabert
0db5a2afb0
Merge pull request #32 from dave-shawley/rate-limit-503s
...
Rate limit 503s
2020-11-02 14:23:22 -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
db92843b61
Add tests for rate-limitting 423s & 429s.
...
Mocking asyncio.sleep is the only way to assert that the retry code
is being handled correctly.
2020-11-02 11:24:26 -05:00
Andrew Rabert
263a423655
Merge pull request #31 from dave-shawley/empty-bodies
...
Fix sending empty bodies
2020-09-24 11:57:43 -04:00
Dave Shawley
85eb259bd7
Update copyright date.
2020-09-16 15:31:36 -04: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
b0de87f779
Fix flake8 error.
...
... and upgrade flake8 so that it works with the other flake8 plugins.
2020-04-08 16:25:10 -04:00
Dave Shawley
eecc557d4c
Version bump to 2.3.2
2020-04-08 16:17:40 -04:00
amberheilman
c37303d247
Merge pull request #30 from dave-shawley/pass-kwargs-through
...
Pass kwargs through
2020-04-08 15:00:14 -04:00
Dave Shawley
c82ad25ad2
Explicitly check against None instead of falsy.
...
I don't think that this makes a difference today since none of the
parameters make sense as zero but it is nice to be able to explicitly
pass zero if we need to.
2020-04-07 12:14:39 -04:00
Dave Shawley
46b6b36d63
Pass most parameters through kwargs.
...
The only reason that I left the parameters as named is that we are
unintentionally allowing for their use as positional parameters even
though the underlying API does not support it o_O
2020-04-07 12:12:22 -04:00
Dave Shawley
a46e196aba
Fail of raise_error
kwarg is specified.
2020-04-07 11:51:35 -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
Brian Korty
ae9af84818
Merge pull request #29 from dave-shawley/issue-27
...
Address #27
2020-04-07 08:30:02 -04:00
Dave Shawley
12921c1d46
Don't obey rogue Retry-After
headers.
2020-04-06 16:06:23 -04:00
Gavin M. Roy
02f62eba12
Merge pull request #25 from noone234/full-error-response-body
...
Deprecate error response body transformation
2019-12-09 15:13:26 -05: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
631918f0a3
Changed the default value of self._simplify_error_response to match
...
past behavior.
If you set self._simplify_error_response to False, error responses
with a JSON body will be deserialized and returned in their entirety.
If you do nothing, error responses will be reduced down to the error
message, as they have been for years. That seems less disruptive.
2019-12-06 12:57:59 -05:00
Christopher Wolfe
d298c13fff
Addressed a PEP 8 line length violation.
2019-11-14 11:15:05 -05:00
Christopher Wolfe
8ba973fea7
Revised notes.
2019-11-14 10:53:47 -05:00
Christopher Wolfe
9045dfcb0a
Documented the new option for error response bodies in README.rst
2019-11-14 10:50:21 -05:00
Christopher Wolfe
8968737820
In HTTPClientMixin class, changed simplify_error_response from a setting
...
to an attribute. It increases probability that engineers set it right.
A misspelled dictionary key may not have an immediately obviously effect,
but a misspelled attribute will throw a runtime exception.
2019-11-14 10:35:21 -05:00
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