Andrew Rabert
e6aa8acb0e
Replace travis with github actions
2022-03-07 17:58:53 -05:00
Andrew Rabert
7aa980ccf7
Replace nose with coverage + unittest
2022-03-07 17:30:32 -05:00
Andrew Rabert
58c86c9869
Resolve sphinx warning
2022-03-07 17:27:18 -05:00
Andrew Rabert
219bc9b7e7
Resolve lint issues
2022-03-07 17:25:49 -05:00
Andrew Rabert
ff54a51659
Update deps
2022-03-07 17:22:49 -05:00
dave-shawley
89b6ebf40d
Merge pull request #40 from nvllsvm/cor
...
Fix exception when correlation_id is None
2022-03-07 17:14:30 -05:00
joshehlinger
e0e67363a8
Merge pull request #41 from nvllsvm/suffix
...
Add support for content-type suffixes
2022-03-07 17:12:36 -05:00
Andrew Rabert
01a778fcf3
Add support for content-type suffixes
...
Closes https://github.com/sprockets/sprockets.mixins.http/issues/11
2022-03-07 17:04:11 -05:00
Andrew Rabert
37dc95cb12
Fix exception when correlation_id is None
...
exception: `TypeError: can only concatenate str (not "NoneType") to str`
2021-11-17 17:08:34 -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
Andrew Rabert
7ee03126fc
Merge pull request #39 from dave-shawley/add-retry-hook
...
Add hook to modify a request before each retry attempt
2021-09-16 10:58:58 -04:00
Dave Shawley
4fba7e5392
Expose documentation for extension API.
...
We were not documenting the extension/sub-class API hooks.
2021-09-15 15:58:03 -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
dave-shawley
19d4bd5a26
Merge pull request #38 from nvllsvm/link
...
Change HTTPResponse.links to return empty list when Link header is not present
2021-09-15 15:57:04 -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
Andrew Rabert
2bc5322e47
Merge pull request #35 from dave-shawley/rate-limit-5xx
...
Apply rate-limit sleeps between all retries
2020-11-25 15:08:31 -05:00
Dave Shawley
473b716e58
Add explicit test for HTTP 502 ( #34 )
2020-11-25 13:23:29 -05:00
Dave Shawley
7ba2e10432
Add sleeps between all retry attempts.
2020-11-25 12:12:20 -05:00
Dave Shawley
0d0702bb51
Add tox support for local dev.
2020-11-25 11:28:02 -05:00
Dave Shawley
39fe25ddf4
Add yapf formatting to the build chain.
2020-11-25 11:28:02 -05:00
dave-shawley
469e1906d0
Merge pull request #33 from sprockets/custom_retry
...
Use class var for default retry timeout
2020-11-25 11:27:12 -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
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