Skip to content

feat(code,talon): require Python 3.12 or greater - #5603

Merged
Mason Daugherty (mdrxy) merged 4 commits into
mainfrom
mdrxy/code/python-3.12-floor
Aug 18, 2026
Merged

feat(code,talon): require Python 3.12 or greater#5603
Mason Daugherty (mdrxy) merged 4 commits into
mainfrom
mdrxy/code/python-3.12-floor

Conversation

@mdrxy

Copy link
Copy Markdown
Member

dcode now requires Python 3.12 or newer (previously 3.11). Users on 3.11 will need to upgrade their interpreter to install or update to this release.


The floor bump lets the codebase use 3.12-only syntax and drop 3.11 compatibility shims:

  • PEP 695 type statements replace TypeAlias annotations, and generic functions/classes use type-parameter syntax instead of TypeVar/Generic[...]
  • Protocol / override import from typing instead of typing_extensions
  • The pre-PEP-706 tarfile extraction fallback (needed only for 3.11.0–3.11.3) is gone; extraction always uses filter="data"
  • uv.lock re-locks without 3.11-only backports (tomli, backports-tarfile)
  • CI matrices, ty, and ruff target-version all move to 3.12; integration test defaults and release builds are updated to match

deepagents-talon depends on deepagents-code, so its floor moves in the same commit — it cannot bump independently without a broken window where talon allows an interpreter its dependency rejects. This is the deliberate coordinated multi-package bump called out in RELEASING.md, so the allow-lockfile-release label is applied to acknowledge the talon release-please fan-out.

Test plan
  • ruff check / ruff format --check clean
  • ty check clean
  • Full libs/code unit suite passes (two pre-existing failures in test_app.py / test_server_graph.py reproduce on the base commit and are unrelated)
  • COMMANDS.md catalog check and lockfile freshness hooks pass

Raise the deepagents-code minimum Python from 3.11 to 3.12 and clean up
the codebase along the way:

- Convert TypeAlias annotations to PEP 695 `type` statements and
  TypeVar-based generics to type-parameter syntax
- Import Protocol/override from typing instead of typing_extensions
- Drop the pre-PEP-706 tarfile extraction fallback (3.11.0-3.11.3 only)
- Refresh uv.lock, dropping 3.11-only backports (tomli, backports-tarfile)
- Update CI matrices, ty target, and ruff target-version to 3.12

deepagents-talon depends on deepagents-code, so its floor moves in the
same commit; it cannot bump independently without a broken window.
release.yml now builds both packages on 3.12.
@mdrxy Mason Daugherty (mdrxy) added the allow-lockfile-release Acknowledge intentional lockfile-only release fan-out label Aug 18, 2026
@github-actions

github-actions Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

ℹ️ Release fan-out acknowledged via the allow-lockfile-release label.

Consequence: release-please will open a separate release PR for every managed component this PR touches, because the title is bump-worthy (feat/fix/etc.) and scoping is by changed file path.

Real-file multi-component hit(s): deepagents-code, deepagents-talon

Remove the label to re-enable the block. Prefer the split recipe if this was unintentional:

Split into:

  1. One feature/fix PR scoped to the single package that owns the user-facing change (feat(code): ... / fix(cli): ...).
  2. One chore(deps): ... PR for the cross-package dependency / lockfile churn (chore is hidden and does not open release PRs).

📖 Multi-component fan-out
📖 Lockfile churn fan-out

@github-actions github-actions Bot added dcode Related to `deepagents-code` dependencies Pull requests that update a dependency file feature New feature/enhancement or request for one github_actions PR touching `.github` internal User is a member of the `langchain-ai` GitHub organization size: M 200-499 LOC talon labels Aug 18, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ A release fan-out gate was bypassed.

Active bypass label(s): allow-lockfile-release

Consequence: release-please will open a separate release PR for every managed component this PR touches, because it scopes commits by changed file path (not by title scope alone).

Touched release-please component(s): deepagents-code, deepagents-talon

This PR title is currently bump-worthy (feat/fix/visible type or !), so fan-out is live on merge.

Confirm intentional, or split

Prefer:

  1. One feature/fix PR scoped to the single package that owns the user-facing change.
  2. One chore(deps): ... PR for cross-package dependency / lockfile churn (chore is hidden and does not open release PRs).

Remove the bypass label(s) to re-enable the blocking checks.

📖 Multi-component fan-out
📖 Lockfile churn fan-out
📖 Reverting a merged-but-unreleased PR

Comment thread .github/workflows/integration_tests.yml
Comment thread libs/code/deepagents_code/hooks/models/config.py
Comment thread libs/code/deepagents_code/plugins/adapters/skills.py
Comment thread libs/code/deepagents_code/skills/merge.py
Comment thread libs/code/deepagents_code/json_types.py
Comment thread libs/code/pyproject.toml Outdated

@open-swe open-swe Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Open SWE Review found 2 potential issues.

Approval score: 0/100 · Decision: commented · Blocked by: team auto approve disabled, repo auto approve disabled, open blocking findings, score below threshold

Open in WebView Open SWE trace

Comment thread libs/talon/pyproject.toml
Comment thread libs/talon/pyproject.toml
@mdrxy Mason Daugherty (mdrxy) changed the title feat(code): require Python 3.12 feat(code): require Python 3.12 or greater Aug 18, 2026
@mdrxy Mason Daugherty (mdrxy) changed the title feat(code): require Python 3.12 or greater feat(code,talon): require Python 3.12 or greater Aug 18, 2026
@mdrxy
Mason Daugherty (mdrxy) merged commit 04de43e into main Aug 18, 2026
93 of 96 checks passed
@mdrxy
Mason Daugherty (mdrxy) deleted the mdrxy/code/python-3.12-floor branch August 18, 2026 18:53
Mason Daugherty (mdrxy) pushed a commit that referenced this pull request Aug 19, 2026
> [!CAUTION]
> Merging this PR will automatically publish to **PyPI** and create a
**GitHub release**.

For the full release process, see
[`.github/RELEASING.md`](https://github.com/langchain-ai/deepagents/blob/main/.github/RELEASING.md).

---

_Release notes preview: keep this section in sync with the package
`CHANGELOG.md`. Publish reads the merged CHANGELOG via `release.yml`,
not this PR description — keep them aligned anyway so the PR stays an
accurate historical record for reviewers and anyone returning later._

---


##
[0.1.58](deepagents-code==0.1.57...deepagents-code==0.1.58)
(2026-08-19)

### Breaking Changes

- `deepagents-code` now requires Python 3.12 or newer.
([#5603](#5603))

### Features

- Added OpenRouter `z-ai/glm-5.3` to the model switcher.
([#5641](#5641))
- Added support for re-authenticating MCP servers from the viewer.
([#5637](#5637))
- Footer pickers can now be opened with `ctrl+click`.
([#5611](#5611))
- Resume hints now account for `TERM_PROGRAM` support before showing
terminal-specific guidance.
([#5580](#5580))

### Fixes

- Completed the `dcode config` command surface.
([#5581](#5581))
- Made `/offload` interruptible.
([#5590](#5590))
- Improved chat and footer UI behavior: rapid typing stays visible,
double-click collapses a resized chat input, and the MCP footer wraps on
narrow windows.
([#5424](#5424),
[#5578](#5578),
[#5651](#5651))
- Captured stdio MCP server stderr in the logger.
([#5610](#5610))
- Drained hook pipes after timeout.
([#5606](#5606))
- Grouped resume trace rounds.
([#5593](#5593))
- Omitted web-search prompt guidance when web search is unavailable.
([#5602](#5602))
- Resolved message pointer shapes per cell.
([#5592](#5592))

_End release notes preview._

---

> [!NOTE]
> A **community contributors** list and a **Special thanks** section
(crediting the users who filed the issues this release's PRs closed) are
appended to the GitHub release notes automatically at publish time (see
[Release
Pipeline](https://github.com/langchain-ai/deepagents/blob/main/.github/RELEASING.md#release-pipeline),
step 3).

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: langchain-oss-automated-triage[bot] <248757908+langchain-oss-automated-triage[bot]@users.noreply.github.com>
Mason Daugherty (mdrxy) added a commit that referenced this pull request Aug 19, 2026
Related: #5549

Administrators can now enforce dcode settings through OS-managed
`managed_config.toml` files.

---

Adds fixed-path, read-only managed TOML policy for dcode with
managed-first precedence, typed merge/provenance, fail-closed startup
enforcement, diagnostics, and shadow-aware user writes. Migrates
structured runtime readers while preserving public APIs and explicit
custom-path seams. Requires Python 3.12+ (landed in #5603).

The path is fixed per platform and never read from process environment
variables, so an unprivileged user cannot redirect it:
`/Library/Application Support/dcode/managed_config.toml` on macOS,
`/etc/dcode/managed_config.toml` on Linux, and
`<ProgramData>/dcode/managed_config.toml` on Windows, where ProgramData
comes from the registry rather than `%ProgramData%`.

## Enforced keys

A managed value the manifest rejects is ignored and the lower-precedence
value stays in effect — except for the enforced keys, where ignoring it
would grant a privilege or remove a boundary the policy declared. Those
stop every command except `config`, `doctor`, `auth path`, and the help
screens:

`startup.mode`, `startup.yolo_switcher`, `shell.allow_list`,
`skills.extra_allowed_dirs`, `interpreter.enable_interpreter`,
`interpreter.ptc`, `interpreter.ptc_acknowledge_unsafe`,
`models.auto_classifier`, `runtime.recursion_limit`,
`sandboxes.default`, `tracing.langsmith_redact`

```console
# /Library/Application Support/dcode/managed_config.toml
[startup]
mode = "manual"
yolo_switcher = "false"   # quoted boolean; the manifest rejects it

$ dcode
Error: Managed config at /Library/Application Support/dcode/managed_config.toml rejects startup.yolo_switcher. Ask your administrator to correct the value.
$ echo $?
78
```

Skipping that key would leave YOLO one Shift+Tab away while `mode` was
pinned.

`dcode doctor` and `dcode config` stay reachable and report both halves
of exit 78: a file that cannot be parsed, and one that parses but
declares a value that cannot be enforced (`dcode config path` shows
`rejected`).

> <details>
> <summary>Why this is stricter than the PRD</summary>
> 
> The PRD specifies tolerant parsing (Claude Code precedent): an invalid
entry is stripped with a warning and the rest of the file is enforced,
with fail-closed behavior reserved for security deny-lists. This PR
keeps that default for everything else but widens the fail-closed set to
the enforced keys above. For those keys, stripping a rejected managed
value is not a safe fallback: the effective config falls through to the
user tier or the default, which is more permissive than the policy the
admin declared (e.g. a malformed `shell.allow_list` would silently leave
shell access unrestricted). Failing closed with exit 78 turns a silent
privilege grant into a loud, fixable startup error. Cosmetic and
non-privilege keys still follow the PRD's strip-with-warning rule.
> 
> </details>

## Behavior changes

- `[shell].allow_list` is now read from `~/.deepagents/config.toml` as
well as `DEEPAGENTS_CODE_SHELL_ALLOW_LIST`, so a managed file can
enforce it. A user can therefore also persist shell auto-approval in
their own file, which an exported variable could not do.
- A managed `[mcp].enabled_project_server_approvals` that is not an
array denies. The key being present means policy intends to narrow
access, so treating a malformed value as absent would keep both the
user's approvals and the
`DEEPAGENTS_CODE_DANGEROUSLY_ENABLE_PROJECT_MCP_SERVERS` bypass in
force.
- Embedders: `resolve_scalar(option, toml_data=...)` loads ambient
managed policy when `managed_toml_data` is omitted. Pass
`managed_toml_data={}` to keep a call hermetic.

<details>
<summary>Out of scope (tracked follow-ups)</summary>

- P1: `/config` TUI and `config` CLI show which tier each value came
from, building on the per-leaf provenance this PR's merge already
records
- macOS managed-preferences (plist) provider — designed for, not built;
would join the managed tier above the file per the PRD's conditional
add-on

</details>

Made by [Open
SWE](https://openswe.vercel.app/agents/7a09f758-f8a5-5972-b49d-416291235c33)

## References
- Plan:
https://openswe.vercel.app/agents/7a09f758-f8a5-5972-b49d-416291235c33/plan

---------

Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
Mason Daugherty (mdrxy) pushed a commit that referenced this pull request Aug 24, 2026
> [!CAUTION]
> Merging this PR will automatically publish to **PyPI** and create a
**GitHub release**.

For the full release process, see
[`.github/RELEASING.md`](https://github.com/langchain-ai/deepagents/blob/main/.github/RELEASING.md).

---

_Release notes preview: keep this section in sync with the package
`CHANGELOG.md`. Publish reads the merged CHANGELOG via `release.yml`,
not this PR description — keep them aligned anyway so the PR stays an
accurate historical record for reviewers and anyone returning later._

---


##
[0.0.4](deepagents-talon==0.0.3...deepagents-talon==0.0.4)
(2026-08-24)

### Features

- Require Python 3.12 or greater.
([#5603](#5603))

_End release notes preview._

---

> [!NOTE]
> A **community contributors** list and a **Special thanks** section
(crediting the users who filed the issues this release's PRs closed) are
appended to the GitHub release notes automatically at publish time (see
[Release
Pipeline](https://github.com/langchain-ai/deepagents/blob/main/.github/RELEASING.md#release-pipeline),
step 3).

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: langchain-oss-automated-triage[bot] <248757908+langchain-oss-automated-triage[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

allow-lockfile-release Acknowledge intentional lockfile-only release fan-out dcode Related to `deepagents-code` dependencies Pull requests that update a dependency file feature New feature/enhancement or request for one github_actions PR touching `.github` internal User is a member of the `langchain-ai` GitHub organization size: M 200-499 LOC talon

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant