From b0fe489a3dadbeb8f8c1ed31909b7cfcfb30799b Mon Sep 17 00:00:00 2001 From: Jim King Date: Thu, 24 Sep 2020 14:25:42 -0400 Subject: [PATCH] honor call argument modifications from on_call_begin --- CHANGELOG.md | 7 +++++++ interposer/__init__.py | 2 +- setup.py | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dfedd3c..50a9731 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.8.1] - 2020-09-24 + +### Changed + +- Honor changes call handlers make to args, kwargs in on_call_begin + so those changes make it to the actual call. + ## [0.8.0] - 2020-09-21 This was a major refactoring to allow for custom call handlers. diff --git a/interposer/__init__.py b/interposer/__init__.py index 2bd45d9..0b83ae4 100644 --- a/interposer/__init__.py +++ b/interposer/__init__.py @@ -209,7 +209,7 @@ def __call__(self, *args, **kwargs): # nope, so make the actual call try: - result = super().__call__(*args, **kwargs) + result = super().__call__(*context.args, **context.kwargs) except Exception as ex: orig_ex = ex for handler in self._self_handlers: diff --git a/setup.py b/setup.py index ba2ea75..1d99151 100644 --- a/setup.py +++ b/setup.py @@ -14,7 +14,7 @@ description = "A code intercept wrapper with recording and playback options." major = 0 minor = 8 -patch = 0 +patch = 1 # Everything below should be cookie-cutter