Skip to content

Commit bdb3e4e

Browse files
committed
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 too old Python, podman-compose gives only a confusing error. This commit gives a clear message to use upgraded 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 <[email protected]>
1 parent d79ff01 commit bdb3e4e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

podman_compose.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# https://docs.docker.com/compose/django/
88
# https://docs.docker.com/compose/wordpress/
99
# TODO: podman pod logs --color -n -f pod_testlogs
10-
from __future__ import annotations
10+
from __future__ import annotations # If you see an error here, use Python 3.7 or greater
1111

1212
import argparse
1313
import asyncio.exceptions

0 commit comments

Comments
 (0)