Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Python 3.13 #1834

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/bci_build/package/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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,
Expand Down
15 changes: 13 additions & 2 deletions src/bci_build/package/python.py
Original file line number Diff line number Diff line change
Expand Up @@ -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] = {
Expand All @@ -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],
}


Expand Down Expand Up @@ -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),
Expand All @@ -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,)
]
Loading