Python 3.7

3.7 released 27 June 2018, latest 3.7.17.

Python 3.7 reached end of life on 27 June 2023.

What changed

Python 3.7 added dataclasses for generating common class methods from field declarations, the contextvars API for context-local state in asynchronous code, the built-in breakpoint() function, module-level __getattr__ and __dir__ hooks, importlib.resources for accessing package data, nanosecond-resolution time APIs, and a development mode enabled with -X dev. It also made dictionary insertion order part of the language specification, made async and await reserved keywords, and offered postponed evaluation of annotations through from __future__ import annotations.

What staying costs

Python 3.7 has reached end of life, so CPython no longer provides fixes for newly discovered security or correctness defects in this cycle. Remaining on it can leave scanner findings without an upstream remediation path and can require compensating controls or locally maintained patches. Dependency risk also grows as package maintainers stop testing against 3.7, publish releases that require newer Python versions, or stop producing compatible binary wheels. This can constrain upgrades to operating systems, build images, cryptographic libraries, and application dependencies, while making future migration larger and less predictable.

What to do

Select a currently supported Python target that is compatible with the application's dependency and platform requirements, rather than treating 3.7 as a long-term baseline. Inventory direct and transitive dependencies, including build-time tools and native extensions, and identify the newest compatible releases and wheels for the selected target. Add that target to continuous integration, run unit, integration, packaging, and deployment tests there, and use warnings and test failures to find deprecated or incompatible behavior. Review code that depends on older asyncio behavior, import internals, annotation handling, or use of async and await as identifiers. Rebuild and test extension modules and deployment images on the target runtime, then roll out through a representative non-production environment before moving production workloads.

We can tell you what moving off Python 3.7 involves.

What it takes to move off Python 3.7 depends on what you built on it — the version you are on, how much depends on it, and how much of the work is mechanical. Leave your email with this version and we can tell you what that looks like for you.

Not sure yet? Get my plan