Skip to content

fix(fuse): make cli.py parse under Python 3.11#544

Merged
aaronsb merged 1 commit into
mainfrom
fix/fuse-py311-fstring
Jul 2, 2026
Merged

fix(fuse): make cli.py parse under Python 3.11#544
aaronsb merged 1 commit into
mainfrom
fix/fuse-py311-fstring

Conversation

@aaronsb

@aaronsb aaronsb commented Jul 2, 2026

Copy link
Copy Markdown
Owner

Why

After #543 unblocked the CLI build in the docs deploy, the workflow reached the next latent failure: generate-fuse-docs.py (runs on Python 3.11) ast.parse()s fuse/kg_fuse/cli.py, which has an f-string with a backslash and the delimiter quote inside the {…} expression — both forbidden before 3.12 (PEP 701). Since fuse declares requires-python = ">=3.11", this is a real latent bug: kg-fuse won't import on 3.11 at all.

Fix

The f"{_dim(...)}" wrapper only interpolated a single call, so drop it → _dim('…'). The "systemd" quotes then sit in a plain single-quoted string, no escaping needed. Message text unchanged.

Verification

uv run --python 3.11 compile-checked all 32 fuse modules → clean (was: SyntaxError at cli.py:577).

Second of the two fast CI fixes before the schema-diagram docs work (follows #543).

https://claude.ai/code/session_017Her5fGimBvtzYD4q9tNnf

fuse declares requires-python >=3.11, but cli.py line 577 put a backslash
(and the delimiter quote) inside an f-string replacement field — both
forbidden in f-string expressions before 3.12 (PEP 701). Under 3.11 the module
fails to even parse, so kg-fuse can't be imported and the docs deploy's
generate-fuse-docs.py (runs on 3.11) aborts with SyntaxError.

The f"{...}" wrapper was pointless — it only interpolated a single _dim() call
— so drop it. The double quotes around "systemd" then live in a plain
single-quoted string and need no escaping. Verified: all fuse modules compile
under CPython 3.11.15.

Claude-Session: https://claude.ai/code/session_017Her5fGimBvtzYD4q9tNnf
@aaronsb aaronsb merged commit 1fa7aa8 into main Jul 2, 2026
6 checks passed
@aaronsb aaronsb deleted the fix/fuse-py311-fstring branch July 2, 2026 06:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant