Skip to content

Commit bedbdd2

Browse files
committed
fix(toolchain): pin Python floor to 3.14.6 for the frozen+slots dataclass regression (#303)
CPython 3.14.0-3.14.5 ship a regression (python/cpython#135228 + the related frozen-dataclass __setattr__ fix) where `@dataclass(frozen=True, slots=True)`'s generated __setattr__ closes over the pre-slots class, so an unknown-attribute assignment raises a spurious `TypeError: super(type, obj)` instead of FrozenInstanceError/AttributeError. AlfredOS has 36+ frozen+slots dataclasses (incl. trust-boundary types); the symptom surfaced locally because .python-version floated to a stale 3.14.4 while CI's `uv python install 3.14` already pulls 3.14.6. Pin the regression-free floor consistently: - requires-python >=3.14.6 (with explanatory comment) - .python-version 3.14.6 - docker/alfred-core.Dockerfile ARG ALFRED_PYTHON_VERSION 3.14.0 -> 3.14.6 (the in-container interpreter must satisfy the new floor; the build's `uv pip install .` otherwise fails "3.14.0 does not satisfy Python>=3.14.6") - refreshed uv.lock Verified: under 3.14.6 the repro raises FrozenInstanceError and the two previously-failing memory tests pass. MrReasonable <4990954+MrReasonable@users.noreply.github.com>
1 parent b275614 commit bedbdd2

4 files changed

Lines changed: 10 additions & 4 deletions

File tree

‎.python-version‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.14
1+
3.14.6

‎docker/alfred-core.Dockerfile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ RUN apt-get update -qq \
5757
# release is latest at build time (tracked as the #254 pin-proto-install
5858
# follow-up). Bump deliberately. The relocation glob stays patch-tolerant so a
5959
# pin bump needs only this one line.
60-
ARG ALFRED_PYTHON_VERSION=3.14.0
60+
ARG ALFRED_PYTHON_VERSION=3.14.6
6161
# DL4006 / CodeRabbit (#290): pipefail so a mid-stream `curl` failure fails the build
6262
# rather than letting `bash` exit 0 on a truncated proto installer.
6363
SHELL ["/bin/bash", "-o", "pipefail", "-c"]

‎pyproject.toml‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,13 @@ name = "alfred"
33
version = "0.0.1"
44
description = "AlfredOS - multi-user, multi-persona, security-hardened agentic OS."
55
readme = "README.md"
6-
requires-python = ">=3.14"
6+
# 3.14.6 floor: CPython 3.14.0–3.14.5 ship a regression (bpo/gh-135228 + the
7+
# related frozen-dataclass __setattr__ fix) where `@dataclass(frozen=True,
8+
# slots=True)`'s generated __setattr__ closes over the pre-slots class, so an
9+
# unknown-attribute assignment raises a spurious `TypeError: super(type, obj)`
10+
# instead of FrozenInstanceError/AttributeError. AlfredOS has 36+ such frozen+slots
11+
# dataclasses (incl. trust-boundary types); 3.14.6 fixes the closure-cell update.
12+
requires-python = ">=3.14.6"
713
license = { text = "Apache-2.0" }
814
authors = [{ name = "AlfredOS contributors" }]
915
dependencies = [

‎uv.lock‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)