diff --git a/src/bci_build/package/__init__.py b/src/bci_build/package/__init__.py index 0b3011bbb..6de221796 100644 --- a/src/bci_build/package/__init__.py +++ b/src/bci_build/package/__init__.py @@ -1411,6 +1411,7 @@ def generate_disk_size_constraints(size_gb: int) -> str: from .python import PYTHON_3_9_CONTAINERS # noqa: E402 from .python import PYTHON_3_11_CONTAINERS # noqa: E402 from .python import PYTHON_3_12_CONTAINERS # noqa: E402 +from .python import PYTHON_3_13_CONTAINERS # noqa: E402 from .python import PYTHON_TW_CONTAINERS # noqa: E402 from .rmt import RMT_CONTAINERS # noqa: E402 from .ruby import RUBY_CONTAINERS # noqa: E402 @@ -1421,10 +1422,11 @@ def generate_disk_size_constraints(size_gb: int) -> str: f"{bci.uid}-{bci.os_version.pretty_print.lower()}": bci for bci in ( *BASE_CONTAINERS, - *PYTHON_3_12_CONTAINERS, *PYTHON_3_6_CONTAINERS, *PYTHON_3_9_CONTAINERS, *PYTHON_3_11_CONTAINERS, + *PYTHON_3_12_CONTAINERS, + *PYTHON_3_13_CONTAINERS, *PYTHON_TW_CONTAINERS, *THREE_EIGHT_NINE_DS_CONTAINERS, *NGINX_CONTAINERS, diff --git a/src/bci_build/package/python.py b/src/bci_build/package/python.py index 841335dd6..f8681fd10 100644 --- a/src/bci_build/package/python.py +++ b/src/bci_build/package/python.py @@ -12,7 +12,7 @@ from bci_build.package import Replacement from bci_build.registry import publish_registry -_PYTHON_VERSIONS = Literal["3.6", "3.9", "3.10", "3.11", "3.12"] +_PYTHON_VERSIONS = Literal["3.6", "3.9", "3.10", "3.11", "3.12", "3.13"] # The lifecycle is handcrafted by the SUSE Python maintainers _SLE_15_PYTHON_SUPPORT_ENDS: dict[_PYTHON_VERSIONS, datetime.date | None] = { @@ -25,6 +25,7 @@ # https://peps.python.org/pep-0664/ defines 2027/10/31, SUSE offers until end of the year "3.11": datetime.date(2027, 12, 31), "3.12": _SUPPORTED_UNTIL_SLE[OsVersion.SP6], + "3.13": _SUPPORTED_UNTIL_SLE[OsVersion.SP7], } @@ -118,7 +119,7 @@ def _get_python_kwargs(py3_ver: _PYTHON_VERSIONS, os_version: OsVersion): for os_version in (OsVersion.SP6,) ) -_PYTHON_TW_VERSIONS: tuple[_PYTHON_VERSIONS, ...] = ("3.10", "3.12", "3.11") +_PYTHON_TW_VERSIONS: tuple[_PYTHON_VERSIONS, ...] = ("3.10", "3.12", "3.13", "3.11") PYTHON_TW_CONTAINERS = ( PythonDevelopmentContainer( **_get_python_kwargs(pyver, OsVersion.TUMBLEWEED), @@ -144,3 +145,13 @@ def _get_python_kwargs(py3_ver: _PYTHON_VERSIONS, os_version: OsVersion): ) for os_version in (OsVersion.SP6, OsVersion.SP7) ] + + +PYTHON_3_13_CONTAINERS = [ + PythonDevelopmentContainer( + **_get_python_kwargs("3.13", os_version), + package_name="python-3.13-image", + is_latest=os_version in CAN_BE_LATEST_OS_VERSION, + ) + for os_version in (OsVersion.SP7,) +]