From 09e60ce78ffbc5e335b7967528f51d4d6b4e8cd8 Mon Sep 17 00:00:00 2001 From: Christopher Edsall Date: Mon, 10 Jul 2023 16:00:39 +0100 Subject: [PATCH 1/2] Add mimimum version check --- rpn-calc/src/rpn_calc.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rpn-calc/src/rpn_calc.py b/rpn-calc/src/rpn_calc.py index 8879855..3728ea9 100644 --- a/rpn-calc/src/rpn_calc.py +++ b/rpn-calc/src/rpn_calc.py @@ -10,6 +10,9 @@ if TYPE_CHECKING: from collections.abc import Iterable +MIN_PYTHON = (3, 10) +if sys.version_info < MIN_PYTHON: + sys.exit("Python %s.%s or later is required.\n" % MIN_PYTHON) def main(commands: "Iterable" = sys.stdin): ''' From e63bf822a0c9b7712dfa1f041fb7984846cab5c3 Mon Sep 17 00:00:00 2001 From: Simon Clifford Date: Tue, 11 Jul 2023 10:34:59 +0100 Subject: [PATCH 2/2] Document minimum Python version --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index c1ba6f0..8fa6384 100644 --- a/README.md +++ b/README.md @@ -55,3 +55,5 @@ pip install pytest cd rpn-calc/src pytest ``` + +The minimum required version of Python is 3.10.