Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Welcome to Software Development on Codidact!

Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.

What happened, or is happening, to other parts of the standard library? Why are they going missing?

+2
−0

In Python 3.12, I noticed that some libraries seem to be missing or "deprecated":

>>> import asynchat
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'asynchat'
>>> import cgi
<stdin>:1: DeprecationWarning: 'cgi' is deprecated and slated for removal in Python 3.13

I can still use cgi but the warning is still there. I know that I saw these modules documented as part of the standard library before.

I know that distutils, tkinter and venv are special cases, and that pip isn't actually in the standard library. But what's up with these other modules? I checked with others and this seems to be reproducible in every distribution of Python 3.12.

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.
Why should this post be closed?

0 comment threads

1 answer

+1
−0

A handful of standard library modules either have been, or will soon be, removed from the Python standard library, as part of a general cleanup effort. These modules are seen as out of date and no longer useful, as they serve purposes that are not relevant today. The hope is that removing them will reduce maintenance burden for the core Python development team.

This effort started in Python 3.11 by adding deprecation notices for several modules that will be removed in 3.13. As well, asynchat and asyncore were removed in 3.12; they had been deprecated since 3.6, but without any concrete timeline for removal.

A complete list of changes, along with the rationale and other details, is given in PEP 594. It's worth noting that the original versions of some of these modules date as far back as 1992.

More generally, Python is adopting a consistent policy for removing deprecated functionality after a few minor versions. This, of course, is completely counter to the principles of semantic versioning (semver) - but Python was never actually intended to follow that policy anyway. To avoid further misunderstandings, there is currently a plan to transition Python to an explicit calendar versioning (calver) system, which is close to what they've been doing recently anyway.

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.

0 comment threads

Sign up to answer this question »