Skip to content

Commit f413b6c

Browse files
hjmjohnsonclaude
andcommitted
ENH: Update pyBase.i runtime Python version check from 3.9 to 3.10
The runtime version guard in pyBase.i checked for Python 3.9 but CMake/ITKSetPython3Vars.cmake already sets PYTHON_VERSION_MIN=3.10, and the codebase now uses Python 3.10-only syntax (PEP 604 unions). A Python 3.9 user would pass the old guard but immediately hit a TypeError at import time from the X|Y type annotations. Update the check and error message to match the CMake minimum, as the comment in pyBase.i instructs. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent fd08cf3 commit f413b6c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • Wrapping/Generators/Python/PyBase

Wrapping/Generators/Python/PyBase/pyBase.i

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ import collections
1212
from sys import version_info as _version_info
1313
# Set values below to the same value as
1414
# PYTHON_VERSION_MIN in ITKSetPython3Vars.cmake
15-
if _version_info < (3, 9, 0):
16-
raise RuntimeError("Python 3.9 or later required")
15+
if _version_info < (3, 10, 0):
16+
raise RuntimeError("Python 3.10 or later required")
1717

1818
from . import _ITKCommonPython
1919
%}

0 commit comments

Comments
 (0)