An execution policy for Pyramid that supports retrying requests after certain failure exceptions.
pyramid_retry is an execution policy for Pyramid that wraps requests and can retry them a configurable number of times under certain “retryable” error conditions before indicating a failure to the client.
See https://docs.pylonsproject.org/projects/pyramid-retry/en/latest/ or docs/index.rst in this distribution for detailed documentation.
- Ensure the threadlocals are properly popped if the activate_hook throws an error or the request body fails to read due to a client disconnect. See https://github.com/Pylons/pyramid_retry/pull/20
- Add exception and response attributes to the pyramid_retry.IBeforeRetry event. See https://github.com/Pylons/pyramid_retry/pull/19
- No longer call invoke_exception_view if the policy catches an exception. If on the last attempt or non-retryable then the exception will now bubble out of the app and into WSGI middleware. See https://github.com/Pylons/pyramid_retry/pull/17
- Support Python 3.7.
- Update the version we require for Pyramid to a non-prerelease so that pip and other tools don’t accidentally install pre-release software. See https://github.com/Pylons/pyramid_retry/pull/13
- Update the policy to to track changes in Pyramid 1.9b1. This is an incompatible change and requires at least Pyramid 1.9b1. See https://github.com/Pylons/pyramid_retry/pull/11
- Add the mark_error_retryable function in order to easily mark certain errors as retryable for pyramid_retry to detect. See https://github.com/Pylons/pyramid_retry/pull/8
- Add the IBeforeRetry event that can be subscribed to be notified when a retry is about to occur in order to perform cleanup on the environ. See https://github.com/Pylons/pyramid_retry/pull/9
- Support a retry.activate_hook setting which can return a per-request number of retries. See https://github.com/Pylons/pyramid_retry/pull/4
- Configuration is deferred so that settings may be changed after config.include('pyramid_retry') is invoked until the configurator is committed. See https://github.com/Pylons/pyramid_retry/pull/4
- Rename the view predicates to last_retry_attempt and retryable_error. See https://github.com/Pylons/pyramid_retry/pull/3
- Rename pyramid_retry.is_exc_retryable to pyramid_retry.is_error_retryable. See https://github.com/Pylons/pyramid_retry/pull/3
- Change the default attempts to 3 instead of 1.
- Rename the view predicates to is_last_attempt and is_exc_retryable.
- Drop support for the tm.attempts setting.
- The retry.attempts setting is always set now in registry.settings['retry.attempts'] so that apps can inspect it.
- Initial release.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size pyramid_retry-2.1.1-py2.py3-none-any.whl (6.6 kB)||File type Wheel||Python version py2.py3||Upload date||Hashes View|
|Filename, size pyramid_retry-2.1.1.tar.gz (23.3 kB)||File type Source||Python version None||Upload date||Hashes View|
Hashes for pyramid_retry-2.1.1-py2.py3-none-any.whl