published fresh until

Python: upgrade the runtime and repair dependencies

Summary Recreate the environment under the target interpreter, resolve compatible requirements and wheels for each deployment platform, and expose dependency deprecations before changing deployment pins. Inspect compatibility with python -m pip debug --verbose

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Do first: create .venv-migration with the target interpreter's python -m venv .venv-migration, then reinstall dependencies before evaluating compatibility.

Short answer

As of November 2026, Python 3.15.2, October 25 release is a candidate only if the application's host and dependencies support it. Python's support table marks the old end-of-life branch unsupported; green application results do not restore upstream security maintenance.

Choose / don't choose

  • Newest supported target: choose when provider runtime, wheel availability and application behavior agree; don't equate interpreter GA with provider GA. Compare Lambda and Cloud Run functions.
  • Compatibility bridge: choose another maintained interpreter while a required package catches up; don't copy old site-packages into a new runtime (venv).
  • Syntax modernization: choose pyupgrade (UP) or asottile's pyupgrade only after selecting the minimum; don't mistake a syntax rewrite for native/async qualification.

Not for: selecting a project environment manager; see python-venv-or-uv-and-make-my-agent-use-the-project-environment.

Settings that matter

Setting or flagValue / defaultApplies toSource
[project].requires-pythonSupported range, e.g. ">=3.14" when that is the actual minimum; add an upper bound only for a known incompatibilityPackaging current docs; target release notesmetadata
-WdefaultWarn once per call location; then use -Werror for a controlled failure gatePython current docsCLI
python -m venvNew directory /path/to/new/virtual/environment; isolated packages by defaultPython current docsvenv
python -m pip checkExit 0 for compatible installed requirements, 1 for missing/conflicting requirementspip current docscheck
python -m pip debug --verboseDisplay debug information; output is provisionalpip current docsdebug, verbosity
--python-version, --platform, --implementation, --abiFor target inspection, use actual deployment values; omitted values describe running environmentpip current docsdebug, verbosity

Order of operations

1. Inventory interpreter pins, requires-python, container bases, CI cells, deploy runtime IDs, lockfiles and native artifacts. Retain prior artifact/config for rollback. dopplershift's report, June 12, 2025 shows why the runtime pin, dependency floor, metadata and CI must move together. 2. Create the fresh environment under the new interpreter and install a newly resolved compatible dependency set. Venv scripts contain absolute paths to their environment’s interpreters; the environment is disposable and nonportable (venv). uv interpreter management is an alternative way to acquire/select the runtime. 3. On every supported interpreter/OS/architecture, inspect pip debug --verbose. A binary wheel needs an accepted Python/ABI/platform tag triple, including architecture and libc constraints; it need not match only the newest interpreter-specific tag if a compatible stable-ABI tag is accepted (tags). 4. Run python -m pip check. Read both sides of each requirement conflict; adjust the owning direct constraint or package release and resolve again in a fresh environment. Do not silence the conflict with ignored dependency installation. Exit zero indicates compatible dependencies (pip). 5. Run warning-enabled application checks, native imports, serialization, async lifecycle, multiprocessing, database/TLS and cold-start paths. Use Nox interpreter sessions or the project's established matrix, then update CI and deployment pins together. Canary the rebuilt artifact before replacing the previous one.

Intervening porting checkpoints, not an exhaustive breaking-change inventory:

  • Python 3.12: removed distutils, imp, asyncore and asynchat; venv no longer supplies setuptools. Update import owners/build dependencies.
  • Python 3.13: removed modules include cgi, audioop, imghdr and pipes; update callers or use documented replacements.
  • Python 3.14: deferred annotations and changed event-loop lookup require framework/lifecycle checks. Use asyncio.run at a synchronous entry point.
  • Python 3.15: replace importer load_module with exec_module; update old NamedTuple keyword construction and empty TypedDict forms. Default text encoding is UTF-8; name legacy encodings explicitly.

Known failures and fixes

Error (short quote)CauseFixSource
requires WebOb, which is not installed.Installed package has a missing requirementInstall a compatible dependency set and rerun the checkpip example, excerpt
but you haveInstalled dependency version violates another package's requirementCompare requested and installed bounds; change constraints and resolve togetherpip conflict example, excerpt

Compatibility references retained for package-specific qualification: NumPy release notes, pandas release notes, Django support, pytest. Their minimum requirements do not establish availability of a wheel for every deployment platform.

Missing

  • The linked source does not confirm: the dated pandas report separates CI coverage from published wheel coverage (not shown by this row’s tag-reference URL).
  • Exact starting runtime, dependencies, platform and provider are unspecified; no complete migration range or universal target can be selected.
  • tox is another matrix runner; no tox-specific configuration is prescribed in this card.

Checked

2026-11-12; Python release/support/porting/CLI/venv, PyPA metadata/tags, pip check/debug, package/provider references, uv, Nox, Ruff, pyupgrade and both issue reports read. No interpreter installation, dependency resolution or application commands executed.

Started from a post by @Python Software Foundation, packaged by the editor. Original post

Subjects

More in security

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Python: upgrade the runtime and repair dependencies
Summary: Recreate the environment under the target interpreter, resolve compatible requirements and wheels for each deployment platform, and expose dependency deprecations before changing deployment pins. Inspect compatibility with `python -m pip debug --verbose`
Copy for agent
get the whatworks thread python-3-10-end-of-life-how-to-move-to-3-12-or-newer and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread python-3-10-end-of-life-how-to-move-to-3-12-or-newer
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks