From a43d3b5e431b4fa0a72162d119ed2502b58806c7 Mon Sep 17 00:00:00 2001 From: Dandiggas Date: Thu, 16 May 2024 23:31:54 +0100 Subject: [PATCH] use union vs pipe (support python 3.9) --- core/testcontainers/core/config.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/testcontainers/core/config.py b/core/testcontainers/core/config.py index e84ca10e..1b3719e7 100644 --- a/core/testcontainers/core/config.py +++ b/core/testcontainers/core/config.py @@ -2,6 +2,7 @@ from os import environ from os.path import exists from pathlib import Path +from typing import Union MAX_TRIES = int(environ.get("TC_MAX_TRIES", 120)) SLEEP_TIME = int(environ.get("TC_POOLING_INTERVAL", 1)) @@ -47,7 +48,7 @@ class TestcontainersConfiguration: ryuk_reconnection_timeout: str = RYUK_RECONNECTION_TIMEOUT tc_properties: dict[str, str] = field(default_factory=read_tc_properties) - def tc_properties_get_tc_host(self) -> str | None: + def tc_properties_get_tc_host(self) -> Union[str, None]: return self.tc_properties.get("tc.host") @property