From c80e5b259fd0cf731d1de609b7529d9ede936323 Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Thu, 25 May 2023 21:39:07 -0700 Subject: [PATCH] Allow save compat to exist for two versions. We want to clean up eventually, but allowing it to exist in both develop and the release branch makes cherry picks easier. --- game/savecompat.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/game/savecompat.py b/game/savecompat.py index 36185e69..6338d40f 100644 --- a/game/savecompat.py +++ b/game/savecompat.py @@ -41,7 +41,8 @@ def has_save_compat_for( """ def decorator(func: Callable[..., ReturnT]) -> Callable[..., ReturnT]: - if major != MAJOR_VERSION: + # Allow current and previous version to ease cherry-picking. + if major not in {MAJOR_VERSION - 1, MAJOR_VERSION}: raise DeprecatedSaveCompatError(func.__name__) return func