From f774cb1f57f8340347234319dfbbdeef90bcd21e Mon Sep 17 00:00:00 2001 From: Tony Meyer Date: Mon, 9 Sep 2024 16:57:21 +1200 Subject: [PATCH 1/2] Cap ops at 2.16. --- pyproject.toml | 2 +- scenario/ops_main_mock.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 4fbb741c..da160e44 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,7 +18,7 @@ license.text = "Apache-2.0" keywords = ["juju", "test"] dependencies = [ - "ops>=2.12", + "ops>=2.12,<=2.16", "PyYAML>=6.0.1", ] readme = "README.md" diff --git a/scenario/ops_main_mock.py b/scenario/ops_main_mock.py index 8b2845c8..c090aef9 100644 --- a/scenario/ops_main_mock.py +++ b/scenario/ops_main_mock.py @@ -88,7 +88,7 @@ def _emit_charm_event( ) try: - args, kwargs = _get_event_args(charm, event_to_emit) + args, kwargs = _get_event_args(charm, event_to_emit) # type: ignore except TypeError: # ops 2.16+ import ops.jujucontext # type: ignore @@ -182,7 +182,7 @@ def setup(state: "State", event: "Event", context: "Context", charm_spec: "_Char charm_dir = _get_charm_dir() try: - dispatcher = _Dispatcher(charm_dir) + dispatcher = _Dispatcher(charm_dir) # type: ignore except TypeError: # ops 2.16+ import ops.jujucontext # type: ignore From de9ff88f6351e43c6adb28afb40ba85abebb5ce8 Mon Sep 17 00:00:00 2001 From: Tony Meyer Date: Mon, 9 Sep 2024 16:59:52 +1200 Subject: [PATCH 2/2] Bump version. --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index da160e44..388a3a50 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,7 @@ build-backend = "setuptools.build_meta" [project] name = "ops-scenario" -version = "6.1.6" +version = "6.1.7" authors = [ { name = "Pietro Pasotti", email = "pietro.pasotti@canonical.com" }