From 5199c22c3d14001873f26fa96dec9a4729ecb6a1 Mon Sep 17 00:00:00 2001 From: Monika Kairaityte Date: Sat, 25 Jan 2025 15:36:38 +0200 Subject: [PATCH] Throw a readable error on too old Python podman-compose v1.0.6 is the last to support Python3.6. When newer podman-compose version is used with older Python, podman-compose gives only a confusing error. This commit gives a clear message to use upgrade Python version. A descriptive error can not be thrown, as line "from __future__ imports" must occur at the beginning of the file, but older Python (older than Python3.7) does not recognize __future__ and throws an error immediately. Therefore, a comment is used to inform the user to update his Python version. Signed-off-by: Monika Kairaityte --- podman_compose.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/podman_compose.py b/podman_compose.py index a745262d..a455476c 100755 --- a/podman_compose.py +++ b/podman_compose.py @@ -7,7 +7,7 @@ # https://docs.docker.com/compose/django/ # https://docs.docker.com/compose/wordpress/ # TODO: podman pod logs --color -n -f pod_testlogs -from __future__ import annotations +from __future__ import annotations # If you see an error here, use Python 3.7 or greater import argparse import asyncio.exceptions