Check four things first when upgrading to Python 3.15: the new UTF-8 default for file I/O, removed or deprecated APIs, tarfile extraction changes, and native extensions built with frame pointers. The official What's New page lists them. Test with warnings on, and read the Porting section before you ship.
Why this release matters
Python 3.15 was first released on 2026-10-09 according to the developer guide. It will receive bugfix releases first and security fixes until October 2031. New releases are also where behavior changes land, so test before you move production.
The upgrade relevant changes
From the Python 3.15 What's New page:
- UTF-8 is the default encoding for
open()and other I/O that does not pass anencodingargument. You can revert withPYTHONUTF8=0or-X utf8=0, but passing an explicit encoding is the portable fix. __cached__was removed from modules. Use__spec__.cached.importlib.metadatanow raisesMetadataNotFoundinstead of returning an empty object when metadata is missing.tarfileextract calls no longer extract rejected members whenerrorlevelis 0, and there is a newLinkFallbackError.- Frame pointers are enabled by default. Build tools must preserve the frame pointer flags from
sysconfigwhen compiling native code. - The
profilemodule is deprecated, scheduled for removal in 3.17. - Removals touch
ast,collections.abc,ctypes,datetime,glob,http.server,importlib,pathlib,platform,threading,typingand others. I read only part of that page, so check the Removed and Porting sections for the exact items.
A testing checklist
- Run your tests with
-W errorin a branch, so deprecations fail loudly. - Search for
open(calls withoutencoding. Fix them, especially in code that reads files created on other systems. - Grep for
__cached__,profile, and the removed modules listed in the Porting guide. - Rebuild every package that compiles native code and run its tests.
- Re-run your tarfile handling tests, including malicious archive cases. See tarfile extraction filters.
- Check your lock file resolves on 3.15 and that wheels exist.
Pin the interpreter
Make the version explicit so a laptop and CI agree. Use a .python-version file or your build tool's equivalent, plus the base image tag.
Try it yourself
The framework mapping demo shows how a technical finding can be tied to a control. A runtime upgrade can be tracked the same way, as evidence that a supported version is in use.
Click through it at your own pace, or open it full screen.
Safeguard's dependency scanning and compliance evidence automation can record what versions a project uses over time. The free scan is at gold.safeguard.sh/scan.
Quick check
Will the UTF-8 default break my code?
Only if you rely on a platform specific default encoding. Pass encoding explicitly and test with sample files.
Is it safe to upgrade the day it is released?
Test first. Native packages may not have wheels for a new release yet.
Sources
Last reviewed: 19 October 2026.