Skip to content

[4.0.0-beta desktop] Desktop CI uses Python 3.11 while Docker uses 3.12 #262

Closed

Description

@Fujio-Turner

PROBLEM

Two official Server Edition artifacts are built with different CPython versions:

Artifact Python
Docker (app/Dockerfile FROM python:3.12-slim) 3.12
macOS / Windows GHA (actions/setup-python python-version: '3.11') 3.11

CBL CFFI wheels / _PyCBL*.so are ABI-specific. Docs (07_PACKAGING_MACOS.md) show libpython3.12.dylib and _PyCBL.abi3.so / cp312. A 3.11 desktop build cannot reuse a 3.12 binding build recipe without compiling on that interpreter.

Also: macos-latest + 3.11 is arm64; Docker is multi-arch 3.12. Bug reports will not reproduce across editions.

Suggested RCA

Desktop workflows were written first (3.11). Docker was added later on 3.12. Nobody aligned them. CFFI abi3 might work across 3.11/3.12 depending on how couchbase-lite-python is built, but that is not guaranteed and not tested.

Suggested FIX

Pick one (3.12, to match Docker) and pin it everywhere:

- uses: actions/setup-python@v5
  with:
    python-version: '3.12'
FROM python:3.12-slim AS base

.python-version at repo root already exists — make it 3.12 and have setup-python read it:

- uses: actions/setup-python@v5
  with:
    python-version-file: '.python-version'

Unit tests

# tests/python/test_python_version_pin.py
from pathlib import Path
import re
import yaml  # PyYAML is already a test dep if present; otherwise regex

def _pyver_file() -> str:
    return Path(".python-version").read_text().strip()

def test_python_version_file_is_3_12():
    assert _pyver_file().startswith("3.12")

def test_dockerfile_matches_python_version_file():
    df = Path("app/Dockerfile").read_text()
    ver = _pyver_file().split(".")
    assert f"python:{ver[0]}.{ver[1]}" in df

def test_workflows_do_not_pin_3_11():
    for wf in Path(".github/workflows").glob("*.yml"):
        text = wf.read_text()
        if "setup-python" not in text:
            continue
        assert "python-version: '3.11'" not in text, wf
        assert (
            "python-version-file: '.python-version'" in text
            or "python-version: '3.12'" in text
        )

Context: found on branch release-4.0.0-beta while reviewing standalone macOS .app / Windows .exe packaging. Issues in this batch share the title prefix [4.0.0-beta desktop].

Activity

  1. added a commit that references this issue on Sep 15, 2026
  2. Fujio-Turner commented on Sep 15, 2026

    @Fujio-Turner
    OwnerAuthor

    Fixed on release-4.0.0-beta via #263

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions