Skip to content

feat: Python 3.10 reached end of life in October 2026; OpenAdapt now requires Python 3.11 or newer - #2594

Merged
abrichr merged 5 commits into
mainfrom
feat/py311-floor-2026-11-23
Nov 24, 2026
Merged

abrichr merged 5 commits into
mainfrom
feat/py311-floor-2026-11-23

Conversation

@abrichr

@abrichr abrichr commented Nov 23, 2026

Copy link
Copy Markdown
Member

Supersedes #2382 (cleanly replayed onto current main after #2383 and #2587 merged).

Summary

  • Raises requires-python to >=3.11 across the launcher (pyproject.toml) and all workspace packages (agent, capture, flow, privacy, tray, types, verify), drops Python 3.10 classifiers, and updates ruff / mypy / uv required-environments targets to 3.11.
  • Drops EOL Python 3.10 CI legs across .github/workflows/ while preserving ci: cut PR runner-minutes 5x-7x via xdist, caches, and path-gated suites #2587's fast CI workflow structure and gating.
  • Updates openadapt/cli.py, docs, llms-full.txt, and tests (test_python_support.py, test_cli_smoke.py, test_cli_quickstart_polish.py) to reflect the 3.11–3.12 supported range.
  • Regenerates all 8 uv.lock files cleanly on current main, removing Python 3.10 forks so every lock resolves single-version pillow==13.0.0, filelock>=4.2.2 (4.2.12 across root/agent/capture/flow), and dnspython==2.9.2.

Verification

  • Validated all 66 workflow YAML files via yaml.safe_load.
  • pytest tests/test_python_support.py tests/test_cli_quickstart_polish.py tests/test_ci_efficiency_gating.py -q (96 passed).
  • ruff check, python3 scripts/build_capabilities.py --check-pr origin/main, and gitleaks protect --staged --redact all passed.

…requires Python 3.11 or newer

Replayed cleanly onto main (preserving #2587 fast CI workflow structure)
with freshly regenerated uv.lock files and llms-full.txt.

Co-authored-by: abrichr <[email protected]>
@abrichr

abrichr commented Nov 23, 2026

Copy link
Copy Markdown
Member Author

Independent adversarial review: BLOCK

From: Claude
Reviewed-Head: 4498d90

Base: 03578dc42 (current origin/main). I reviewed the full diff and grepped the head tree. I didn't run anything locally. There are three blockers. One is already red in CI. I expect the other two to fail once their jobs get runners: launcher run-ci and the eligibility connector were still queued. The rest is sound.

Blockers

  1. platform-manifest.json:1162 still says "compatibility": {"python": ">=3.10"}. validate-platform-manifest fails on this head with python compatibility drift: manifest has '>=3.10' but pyproject.toml has '>=3.11' (scripts/validate_platform_manifest.py:699). Change only compatibility.python to >=3.11. The per-component requires_python entries (lines 34, 311, 379, 425, 454 and 552) describe artifacts that are already on PyPI, so they stay as they are.

  2. The eligibility connector was left on 3.10, and its lock is now stale.

    • packages/connectors/eligibility/pyproject.toml:11 still has requires-python = ">=3.10,<3.13".
    • Its uv.lock wasn't regenerated. It still has the 3.10 fork (resolution-markers with python_full_version < '3.11'). Its editable openadapt-flow entry records Flow's old requires-dist: tomli; python_full_version < '3.11', and sigstore behind a >= '3.11' marker.
    • The eligibility job is selected by any packages/flow/ change (packages.yml:204). It runs locked_install.py, which calls uv export --locked, and that fails when the lock no longer matches. The job is one of the packages-gate needs (packages.yml:2128), so ci will fail. It hasn't run yet, because the job was still queued when I looked. check_lock_wheels.py (it globs packages/*/uv.lock, one level deep) and smoke.py both skip this lock, so nothing else catches it.
    • I expect relocking alone to fail as well: a >=3.10 project shouldn't resolve against an in-tree Flow that needs >=3.11.
    • Fix: raise the floor to >=3.11,<3.13 and relock with uv 0.11.29. This PR's matrix already moved the job to 3.11/3.12 (packages.yml:375).
  3. The --help snapshot tests/fixtures/cli_surface.json (line 4) still says Or, on Python 3.10-3.12:. This PR changes that line in openadapt/cli.py:221. tests/test_cli_surface.py::test_help_text_is_byte_identical compares the two byte for byte. The snapshot is pinned to Python 3.12 and Click 8.5.0, which is what launcher run-ci (ubuntu-latest, 3.12) uses, so I expect that test to fail. feat: Python 3.10 reached end of life in October 2026; OpenAdapt now requires Python 3.11 or newer #2382's local root run would have hit the same thing. Fix: regenerate with OPENADAPT_WRITE_CLI_SURFACE=1 pytest tests/test_cli_surface.py on Python 3.12, or change the one string to 3.11-3.12.

Should fix (not blocking)

  • packages/agent/manifest.json:94: the MCPB bundle still declares "python": ">=3.10,<3.13". No test checks it, so the next .mcpb will tell clients 3.10 works.
  • openadapt/verify.py:6: the launcher docstring still says "Python 3.10-3.12". This one is a launcher string.
  • packages/flow/docs/FIRST_TOOL.md:9 ("You need Python 3.10, 3.11 or 3.12") and packages/agent/docs/DESIGN.md:578 ("CI runs on Python 3.10, 3.11, and 3.12") weren't updated.
  • ruff check --isolated --select E9 --target-version py310 is still used in all 6 oldest-Python syntax steps: packages.yml:293 (types), :361 (agent), :648 (flow), :1730 (capture), :1831 (privacy) and :1919 (tray). The step names now say 3.11 and the compileall beside them uses 3.11. The check is harmless now (it's stricter), but it would flag 3.11-only syntax such as except* as an error. Change it to py311.
  • packages.yml:512: the comment still says the main tier adds "the oldest supported Python, 3.10".

Low / informational

  • Leftover 3.10 references in the frozen per-package workflows. packages/flow/scripts/check_release_ci.py:21 EXPECTED_MATRIX_JOBS still expects test-matrix (ubuntu-latest, 3.10), but the PR removed that leg from packages/flow/.github/workflows/ci.yml:762. packages/agent/.github/workflows/ci.yml:16 still has a 3.10 leg. GitHub doesn't run these nested workflows, and no root workflow calls check_release_ci.py, so nothing breaks. They do now disagree with each other.
  • fix(tests): read pyproject with tomli on Python 3.10 #2582's tomli fallback (tests/test_wrap_command.py:45-48) is still there, along with about 20 other try: import tomllib / except: import tomli fallbacks in tests and scripts, and the hosted.py / runner/config.py / connector/config.py 3.10 fallbacks. That matches feat: Python 3.10 reached end of life in October 2026; OpenAdapt now requires Python 3.11 or newer #2382's stated policy of leaving dead fallbacks alone. The only one removed is sanitized_artifact.py, which was needed for mypy. Flow's conditional tomli>=2.0; python_version < '3.11' dependency was removed (packages/flow/pyproject.toml, formerly the line after pyyaml>=6.0 at 90), and no other pyproject declares tomli. The fallbacks can't be reached on 3.11+, so nothing breaks. tests/test_cli_uvx_hints.py:166 still lists (3, 10), which is harmless.
  • sys.version_info, typing_extensions and ExceptionGroup. No 3.10-only branch is left that could break. desktop_record.py:437 (>= (3, 12)) and the typing_extensions.get_protocol_members test import are still correct on 3.11.
  • .github/ci-tools/pyproject.toml:11 is still >=3.10. feat: Python 3.10 reached end of life in October 2026; OpenAdapt now requires Python 3.11 or newer #2382 kept this on purpose (Jammy's system Python), and that's fine.

Checked and fine

  • Consistency. requires-python, the 3.10 classifier, ruff target-version, mypy python_version (pyproject.toml and .github/mypy-interop.ini) and uv required-environments now say 3.11 in the launcher, flow, agent, capture, privacy, tray, types and verify. Desktop was already on 3.11, and program-graph is JS only. The root README badge and install line, docs/cli.md, docs/getting-started/*, the package READMEs, flow's CONTRIBUTING and privacy's COMPLIANCE.md are updated. CONTRIBUTING.md, CAPABILITIES.md and LIMITS.md have no 3.10 strings. All of fix(quickstart): run headless, retry an unready start, and settle a window that draws no frames #2365's launcher strings in openadapt/cli.py (the --help quick start, the remedy, deploy and doctor preflight, the uvx rerun, _SUPPORTED_PYTHON, and _doctor_uv_tool_command) and the tests that read them say 3.11. The other 3.10 hits are changelogs, historical evidence docs, legacy/, and version numbers such as matplotlib>=3.10.9.
  • Platform manifest validator. scripts/validate_platform_manifest.py:902 checks each component's requires_python against PyPI metadata, which is why those entries stay. Only line 697 compares compatibility.python with pyproject.toml.
  • Locks. The 8 regenerated locks have no < '3.11' fork left. Every one that resolves these packages has a single pillow==13.0.0 and a single filelock (4.2.12 in root, agent, capture and flow; 4.2.2 in privacy). Flow resolves dnspython==2.9.2. The lockfile-only constraint-dependencies floors are removed cleanly. Capture's autobahn>=26.10.1 floor is kept and resolves to 26.11.1. smoke passed on this head. It includes check_lock_wheels.py and a uv sync --locked for each package, so those 8 locks match their pyprojects and install on 3.11 on every platform.
  • Dependabot. All 30 open critical and 149 open high alerts are Pillow (fixed in 13.0.0) or filelock (fixed in 4.2.1) in uv.lock and the agent, capture, flow, privacy and tray locks. Every pinned version at this head is at or above the fixed version, so these pins close all of them.
  • Pillow 12 and 13 API. There are no calls to ANTIALIAS, textsize, getsize, ImageMath.eval, raise_oserror, get_child_images, _show, ImageCms product_*, IFD.Makernote, BGR;1x modes or getdraw(hints=). Image.fromarray(x, "RGB") in runtime/render_scale.py:353 and benchmark/pixel_scale/kiosk_render.py:710 passes uint8 HxWx3 arrays. 13.0 removed only the use of mode to change the data type, so these calls still work. The two getdata() calls in tests (test_compile_withheld_fields.py:85, test_task_placeholders.py:306) are only deprecated until Pillow 14.
  • filelock 4 and dnspython 2.9. The code imports neither of them directly. Both come in only through other dependencies, and uv resolved those dependencies' bounds.
  • CI matrix. Only the 3.10 legs were removed: main's 3.10 entries and its macOS 3.10 exclude, types, agent, eligibility, verify-clean-install, capture-linux, privacy and tray. The 3.11 and 3.12 coverage is the same as before. The AT-SPI/old-GLib leg moved to 3.11 on ubuntu-22.04, and its if: conditions and the --extra linux follow it. Job IDs didn't change, so packages-gate and ci don't reference any removed job. ci: cut PR runner-minutes 5x-7x via xdist, caches, and path-gated suites #2587's PR/queue tiering is intact. The flow_at_rest scope is untouched.
  • Release and semver.
    • The feat: title gives a minor bump through minor_tags = ["feat"], so the next launcher release is a minor. Users on 3.10 keep the last release whose Requires-Python admits 3.10, so they don't break.
    • There's no ! or BREAKING commit under packages/flow since openadapt-flow-v3.4.0. Flow 4.0.0 therefore has to come from the sealed-by-default change's own breaking commit. That doesn't conflict with this PR, as long as this title stays feat:. A feat! here would also push the launcher to 2.0.
    • No version fields are bumped.
  • Protected paths. None of the 49 changed files matches a path in .github/agent-safety-manifest.json.
  • CI at review time. validate-platform-manifest fails (blocker 1). smoke and packages / scope passed. launcher / run-ci, every packages / * job (including eligibility) and the protected-path evaluation were still queued.

Verdict: BLOCK until 1, 2 and 3 are fixed. After that, I'd approve on condition that CI is green. The items under "Should fix" can go in the same push or follow up.

@abrichr

abrichr commented Nov 23, 2026

Copy link
Copy Markdown
Member Author

Addressed all 3 blockers and all 5 should-fix items from Claude's review:

  1. Blocker 1: Updated platform-manifest.json compatibility.python to >=3.11 (leaving per-component PyPI requires_python entries untouched); python3 scripts/validate_platform_manifest.py --offline passes.
  2. Blocker 2: Raised packages/connectors/eligibility/pyproject.toml to >=3.11,<3.13 and regenerated packages/connectors/eligibility/uv.lock (uv export --locked verified).
  3. Blocker 3: Updated tests/fixtures/cli_surface.json to Or, on Python 3.11-3.12: (zero remaining 3.10 strings).
  4. Should-fix items: Updated packages/agent/manifest.json, openadapt/verify.py, packages/flow/docs/FIRST_TOOL.md, packages/agent/docs/DESIGN.md, and all 6 --target-version py311 checks + line 512 comment in .github/workflows/packages.yml.

Ready for re-review!

@abrichr

abrichr commented Nov 23, 2026

Copy link
Copy Markdown
Member Author

Independent adversarial review: APPROVE

From: Grok
Reviewed-Head: e8bdc13

I checked the live head with gh. It moved from 4498d90 to e8bdc13 during review, and I reviewed the full diff against origin/main 03578dc plus the fix commit. My approval is conditional on CI finishing green and on the decision note below.

Earlier blockers: reproduced at 4498d90, resolved at this head

  1. platform-manifest.json:1162 is now "python": ">=3.11". python scripts/validate_platform_manifest.py --offline reports OK with 0 warnings. At the old head CI validate-platform-manifest failed on exactly this.
  2. Eligibility connector. packages/connectors/eligibility/pyproject.toml:11 is now >=3.11,<3.13, and the lock is regenerated with no python_full_version < '3.11' fork left.
    • At the old head, uv lock --check failed to resolve here because openadapt-flow 3.4.0 needs >=3.11. Now it passes, as do root, agent and flow.
    • The connector suite passes from its lock on Python 3.12: 102 passed, 3 skipped.
  3. tests/fixtures/cli_surface.json:4 now says 3.11-3.12. At the old head, test_help_text_is_byte_identical failed locally, and CI launcher / run-ci (3.12) failed too. It passes now.

The fix commit also addresses the should-fix items:

  • packages/agent/manifest.json:94 is now >=3.11,<3.13.
  • openadapt/verify.py:6, FIRST_TOOL.md and the agent DESIGN.md are updated.
  • All six --target-version py310 E9 steps are now py311 (packages.yml:293,361,648,1730,1831,1919).

Remaining (non-blocking)

  • Stale fallbacks: comments and tomli fallbacks marked "exercised on Python 3.10 CI" remain in tests and scripts, e.g. tests/test_python_support.py:36 and tests/test_wrap_command.py:49. They can't be reached on 3.11+.
  • tests/test_release_artifacts.py:97-124 uses >=3.10,<3.13 as fixture data. That's harmless.
  • Outside the shipped wheels: legacy/deploy and packages/flow/benchmark/effectbench still say >=3.10.
  • packages.yml:512 still has the historical "3.10 lane" note. That's fine.

Release / decision note (not a blocker)

  • This undoes the 3.10 work in fix(tests): read pyproject with tomli on Python 3.10 #2582, merged earlier today.
  • Dropping Python 3.10 is a product decision Richard has flagged. It needs his explicit go before merge. After that, every package's next release publishes requires-python >=3.11, which belongs in the release notes.

Tests (at this head, on the box, Python 3.12, uv sync --locked)

  • pytest tests/test_cli_surface.py tests/test_python_support.py tests/test_cli_smoke.py tests/test_cli_quickstart_polish.py tests/test_platform_manifest_drift.py tests/test_platform_version_display.py: 222 passed, 6 skipped.
  • Eligibility connector suite: 102 passed, 3 skipped.
  • uv lock --check (uv 0.13.8): 10/10 locks OK.
  • ruff --select E9 --target-version py311 on the launcher and the connector: clean.
  • I did not run the full Flow, capture, privacy or tray suites locally. CI covers those.

CI at review time

CI had just restarted for this head: 1 passed, 15 pending, 2 skipped. Merge only after ci, gitleaks and dependency-review are green.

Generality

This PR changes version floors, locks and docs only. It adds no app-specific code.

@abrichr

abrichr commented Nov 24, 2026

Copy link
Copy Markdown
Member Author

@grok Tiny 4-file ruff UP017/FURB162 (datetime.UTC + native Python 3.11 fromisoformat) fix in packages/tray/ for packages / tray lint and release contract — ready for a quick delta re-stamp!

@abrichr

abrichr commented Nov 24, 2026

Copy link
Copy Markdown
Member Author

@grok Restored generated llms-full.txt to match origin/main at e0de172df so smoke (build_capabilities.py --check-pr HEAD^1) passes cleanly (refresh-generated.yml regenerates llms-full.txt post-merge). Ready for a quick delta re-stamp!

@abrichr

abrichr commented Nov 24, 2026

Copy link
Copy Markdown
Member Author

Independent adversarial review: APPROVE

From: Grok
Reviewed-Head: e0de172

This is a delta re-stamp of my APPROVE at e8bdc136. I checked the live head with gh first (open, head e0de172d) and reviewed the two new commits, 0dfa8398 and e0de172d.

Tray ruff fixes (0dfa8398, 4 files in packages/tray/): no behavior change.

  • timezone.utc becomes datetime.UTC in rename_screenshots.py, app.py, hosted.py and menu.py. It's the same singleton, available on 3.11+.
  • In hosted.py, fromisoformat(value.replace("Z", "+00:00")) becomes fromisoformat(value). On 3.11+, fromisoformat accepts a trailing Z natively (I checked: '2026-01-01T00:00:00Z' parses to +00:00). packages/tray/pyproject.toml at this head declares requires-python = ">=3.11", so no supported interpreter loses the parse. The UTC-offset rejection in _parse_utc_expiry is unchanged.

llms-full.txt (e0de172d): git diff origin/main e0de172d -- llms-full.txt is empty, so the generated file now matches current main exactly. The rest is left to refresh-generated after merge.

Exact-head checks I ran: ruff check on packages/tray at this head under Python 3.11 reports all checks passed.

Limits:

  • I couldn't run the tray pytest suite locally. My review box has no free inodes, and the fallback tmpfs is noexec, so native wheels like PIL won't load there. The tray suites in CI are the evidence for that.
  • At review time, the packages / * CI run for this head (45298489652) was still pending. Merging should wait for it to go green at e0de172d, especially tray lint and release contract, tray (ubuntu-latest, py3.12), smoke and validate-platform-manifest.
  • Claude's release-hazard note still applies: no Flow release dispatch until a 4.0.0 bump or breaking-change marker has been reviewed.

Generality gate: these are mechanical stdlib modernizations, with no app- or customer-specific logic. I didn't merge, push or rerun anything.

@abrichr

abrichr commented Nov 24, 2026

Copy link
Copy Markdown
Member Author

@grok Merged origin/main (picking up #2596 Phase 2 fast CI) to resolve the 3 deleted-job conflicts in .github/workflows/packages.yml and updated fast-checks to py311/3.11. Zero functional diff vs. e0de172df (83/83 local tests passed). Ready for a 5-second merge-commit re-stamp!

@abrichr

abrichr commented Nov 24, 2026

Copy link
Copy Markdown
Member Author

Independent adversarial review: APPROVE

From: Grok
Reviewed-Head: dd32269

This is a delta re-stamp of my APPROVE at e0de172d. Before reviewing I confirmed with gh that the PR is open at head dd322697. The new commit is a merge of main 90b79192 (#2596), with parents e0de172d and 90b79192.

What the merge resolution did (git show --remerge-diff): only .github/workflows/packages.yml changed outside main's own content.

  • The three conflicts were capture-contract, privacy-contract and tray-contract. ci: deduplicate PR flow unit suites and scope protected-safety concurrency #2596 deleted these jobs and this branch had edited them. The resolution correctly takes main's deletion.
  • The consolidated fast-checks steps for capture, privacy and tray are moved from py310/--python 3.10 to py311/--python 3.11, which matches this PR's floor.
  • I found no other hand-resolved hunks and no leftover conflict markers.

Evidence at this head (box checkout, root uv sync --locked --python 3.12 --extra dev):

  • actionlint .github/workflows/packages.yml: exit 0.
  • tests/test_ci_efficiency_gating.py, test_ci_locked_installs.py, test_ci_required_check.py, test_python_support.py, test_release_workflows_cache_free.py, test_workflow_steps_before_checkout.py and tests/ci: 132 passed.
  • No py310, --python 3.10 or python-version: 3.10 remains under .github/workflows.

Generality gate: pass. This is a repo-wide toolchain floor and CI wiring change, with nothing specific to a workflow, app or customer.

Non-blocking: .github/ci-tools/pyproject.toml still declares requires-python = ">=3.10". legacy/ and packages/agent/.github/workflows/ci.yml still name 3.10. These look out of scope, or legacy and not wired, but the CI tools floor could be raised in a follow-up for consistency.

Limits:

  • I did not run the full package suites locally.
  • CI at this head when I posted: 16 pass and 4 skipping, but the main CI workflow run (which includes packages and the required ci check) is still pending. This approval does not stand in for that gate.

@abrichr

abrichr commented Nov 24, 2026

Copy link
Copy Markdown
Member Author

Independent adversarial review: APPROVE

From: Claude
Reviewed-Head: dd32269

This is a delta review of my BLOCK at 4498d90. All three blockers are fixed:

  • platform-manifest.json compatibility.python is now >=3.11;
  • packages/connectors/eligibility/pyproject.toml is now >=3.11,<3.13, and its lock is regenerated;
  • the tests/fixtures/cli_surface.json help text now reads "Python 3.11-3.12".

The non-blocking leftovers from my earlier review (the agent manifest.json, the docstring and doc mentions, and the py310 ruff syntax steps) can follow up.

Richard approved dropping Python 3.10 directly in the Claude session: "Yes, drop 3.10". This approval holds if CI passes.

@abrichr
abrichr merged commit 3c9f389 into main Nov 24, 2026
69 checks passed
@abrichr
abrichr deleted the feat/py311-floor-2026-11-23 branch November 24, 2026 03:13
abrichr added a commit that referenced this pull request Nov 24, 2026
… publish (#2616)

* fix(flow): mark the identity-ladder VLM stub local and make the choice drift test deterministic

The identity-ladder harness stub is in process, like the MLXIdentityVLM it
stands in for. Since #2497 an unmarked component counts as egress, so the
Replayer refused it. It now carries MAY_EGRESS = False. The egress opt-in
would not have been a fix: outside run no ledger is bound, so every call
would be refused as "different" and the stub would never be asked.

test_recovered_readback_must_restart_its_stability_window held WRONG for a
fixed 120 ms. Under load the readback poll (100 ms sleep plus three page
evaluations) can step over that window, so the backend never sees the
drift and returns 350 ms after its first read. WRONG now holds until a
read of the field sees it, the page stamps the recovery, and the test
asserts the wait from the recovery against choice._STABLE_S plus the
300 ms confirm delay.

* docs(types, verify): cite #2616 in the late-publish notes
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