Python 3.12 Removed modules — check your python code free

Flags imports and calls removed from the Python standard library in 3.12, 3.13 and 3.14 (cgi, imp, distutils, telnetlib, unittest aliases, ast.Str) before you leave Python 3.10. Runs entirely in your browser — nothing is uploaded.

Same engine as the VS Code extension, byte for byte.

Install free

Free for the file open in your editor - no key, no limit. The workspace sweep and the report ask for a key.

VS Code Marketplace
ext install ReadyStack.python-upgrade-removed-api-lint

Team? One key for every ReadyStack linter, 5 seats, $149 once

Get one email when this rule changes
We watch the regulation and vendor sources behind Python Upgrade Lint: Removed Stdlib 3.12-3.14 every day. When a rule changes, you get a single email with what changed and the updated check. No newsletter.

Get the full version $29

Sweep the whole workspace in one pass and export a Markdown upgrade report for each target version to attach to the migration ticket.

One payment, one licence key for this tool. The key is shown right after payment.

By hand, this is developer hours at the US median software developer wage of $63.98 an hour (BLS, May 2024).

Buy the full version — $29
ENDEJAESPT

Find a tool

· ReadyStack

Worked example

Real numbers from this tool, line by line.

Six lines in our 46-line sample job break on Python 3.14, and the full check found 14 findings in that one file. This is for Python developers and platform teams in the US, the UK and Europe who have to move services off Python 3.10 before it reaches end of life in October 2026.

The date that forces the upgrade

Python 3.10 gets security fixes until October 2026. After that, a CVE in the interpreter or the standard library stays unpatched on 3.10, and security scanners and base images start to flag it. Most teams jump to 3.12, 3.13 or 3.14. Each of those versions removed part of the standard library, and code written for 3.10 often still uses those parts.

The failure is not subtle. import cgi works on 3.12 and raises ModuleNotFoundError on 3.13. import imp already fails on 3.12. self.assertEquals(...) in a test file becomes an AttributeError on 3.12. isinstance(node, ast.Str) stops working on 3.14.

What we measured

We wrote a small nightly job the way many 3.10 codebases look: it loads plugins with imp, parses a form with cgi, quotes shell commands with pipes, talks to a device with telnetlib, reads config with SafeConfigParser and readfp(), wraps a socket with ssl.wrap_socket() and walks an AST with ast.Str.

Then we ran the checker with each target version:

The deprecated one is datetime.utcnow(). It still runs, but it returns a naive datetime and is on its way out. The cleaned-up version of the same file, rewritten with importlib, shlex.quote, ConfigParser.read_file, SSLContext.wrap_socket and ast.Constant, gives 0 findings.

Why the interpreter alone is slow

You can install 3.13 and run the code. It stops at the first ModuleNotFoundError, you fix that one, and you run it again. Removed methods only fail when that code path runs, so a rarely used branch can ship broken. A chatbot answer is no better: it lists removed modules from memory, it does not read your file, and it often gets the version wrong (imp went in 3.12, cgi in 3.13, ast.Str in 3.14).

AI coding assistants learned from years of older Python. Code they write today can still contain these imports, so reviewing AI-written Python for them is part of the same job.

How the check works

The rule table has 43 rules: 13 for 3.12 (including distutils from PEP 632, imp, asyncore, smtpd and the old unittest aliases), 24 for 3.13 (the 19 PEP 594 dead-battery modules plus lib2to3, tkinter.tix, typing.io and others), and 6 for 3.14 (ast.Num/ast.Str, pkgutil.find_loader, asyncio child watchers, URLopener, importlib.abc resource classes, sqlite3.version). Strings, docstrings and comments are skipped. Each finding names the line, the version, the source and the replacement.

Try it on your file

The web page and the VS Code extension use the same engine. Paste one .py file, pick 3.12, 3.13 or 3.14, and read the list. That part is free and complete for one file. When you need the whole repository swept in one pass and a written report for the migration ticket, that part takes a licence key.

For scale: by hand, this is a developer grepping for dozens of names and checking three What's New pages. The US median software developer wage is $63.98 an hour (BLS, May 2024).

Questions people ask

What does Python Upgrade Lint do?

It reads a Python .py file and marks every line that uses a standard-library module or API removed in Python 3.12, 3.13 or 3.14, such as cgi, imp, distutils, telnetlib, the old unittest aliases or ast.Str. It checks 43 rules. For each finding it shows the line number, the version that removed it, the PEP or What's New source, and the replacement to use.

Who is Python Upgrade Lint for?

Python developers and platform teams moving services off Python 3.10 before its October 2026 end of life, and anyone upgrading a Django, Flask, script or data-pipeline codebase to Python 3.12, 3.13 or 3.14. It also suits reviewers of AI-written Python, because assistants trained on older code can still produce imports such as cgi, imp or distutils.

Why not ask a chatbot or rely on a free tool?

A chatbot lists removed modules from memory. It does not read your file line by line, and it often mixes up the version: imp was removed in 3.12, cgi in 3.13 and ast.Str in 3.14. Running the new interpreter only shows the first ModuleNotFoundError, one at a time. This checker applies one fixed table of 43 rules and reports every hit at once.

What is free and what needs a licence key?

Free, with no key: check one open .py file against all 43 rules, in VS Code or pasted into the web page, and pick 3.12, 3.13 or 3.14 as the target. The paid licence ($29 once, one key per person or team seat) adds a whole-workspace sweep in one pass and a Markdown upgrade report for each target version to attach to the migration ticket.

What does it cost to find these lines by hand?

By hand, a developer greps for each removed module and API, cross-checks the Python What's New pages for 3.12, 3.13 and 3.14, and then fixes the hits. The US median software developer wage is $63.98 an hour (BLS, May 2024), so every hour of searching costs about that much. On our 46-line sample file the checker reported 14 findings at once.

Ask about this tool

One question, answered by the person who built it. Your email only if you want the answer sent.

Embed this tool on your site (free)

Paste this code into your page. It runs in your visitor’s browser and stays up to date. Nothing your visitors type is stored.

 All embeddable tools

For businesses: your name and logo instead of ours, and each visitor’s result + e-mail in your inbox (only when they tick consent) — Pro from $19/month. See Pro →