Skip to content

Commit

Permalink
Moved Python version check to the 'stack' module
Browse files Browse the repository at this point in the history
  • Loading branch information
ccie18643 committed Sep 15, 2024
1 parent c4447f2 commit 50135c8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 0 additions & 4 deletions pytcp/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions pytcp/stack/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 50135c8

Please sign in to comment.