diff --git a/pytcp/config.py b/pytcp/config.py index 10288d12..d0d84b0c 100755 --- a/pytcp/config.py +++ b/pytcp/config.py @@ -35,10 +35,6 @@ from __future__ import annotations -from sys import version_info - -assert version_info >= (3, 12), "PyTCP requires Python version 3.12 or higher." - # IPv6 default Hop Limit value. IP6__DEFAULT_HOP_LIMIT = 64 diff --git a/pytcp/stack/__init__.py b/pytcp/stack/__init__.py index ab933aa6..bf7a447f 100755 --- a/pytcp/stack/__init__.py +++ b/pytcp/stack/__init__.py @@ -53,12 +53,19 @@ from .rx_ring import RxRing from .timer import Timer from .tx_ring import TxRing +from sys import version_info if TYPE_CHECKING: from net_addr import Ip4Address from pytcp.socket.socket import Socket +assert version_info >= ( + 3, + 12, +), "PyTCP stack requires Python version 3.12 or higher to run." + + # Interface configuration. INTERFACE__TAP__MTU = 1500 INTERFACE__TUN__MTU = 1500