Python 3.10
reached the end of its life
last month.

No more security fixes.

So the upgrade ticket
that has been sitting there
since spring
is finally moving.

And the version you land on
will be 3.13 or later.

That means a small surprise
is waiting
in the standard library.

In 2019
a proposal called PEP 594
listed modules
nobody was maintaining,
the dead batteries.

In 3.11
importing them
started to warn.

In 3.13
nineteen of them
were removed.

Not deprecated.

Gone.

Some you will not miss.

nntplib,
for Usenet.

sunau,
for an audio format
from old Sun workstations.

Some
are still in places
you have not looked.

cgi,
whose parse_header
quietly read content types
in a lot of old web code.

crypt,
in the script
that checks passwords
against a Unix shadow file.

imghdr,
that guessed an image type
from its first bytes.

telnetlib,
in the tool
that logs in to the old switch
in the comms room.

pipes,
where its quote function
used to live,
before shlex.

audioop,
inside an older library
that handles sound.

And you will not see it
in your own imports.

You will see it
in a dependency
three levels down,
pinned at a version
from 2019.

The warnings were there,
for two releases.

Deprecation warnings
are hidden by default,
outside your main script
and your test runner,
so the service
that imports through a library
said nothing at all.

On the new version
it says one thing,
at start up.

ModuleNotFoundError.

So find them now,
while the old version still runs.

Search your code
and your installed packages
for the nineteen names.

Run your tests
on your current version
with deprecation warnings
turned into errors.

Every one that fails
is a line
on your upgrade plan.

Then replace them,
one at a time.

shlex.quote for pipes.

The email package
for parsing headers.

A maintained library
for hashing passwords,
because crypt
was never the right tool for that.

Some have unofficial copies
on PyPI.

Treat those as a bridge,
not a home.

A standard library
feels permanent.

It is just a dependency
somebody else maintains,
until they stop.

– Serguey Asael Shinder