Python standard library¶
sys.stdlib_module_names¶
sys.stdlib_module_names was added to Python 3.10. For Python 2.6 to 3.9, the 3rd party stdlib-list module can be used.
len(sys.stdlib_module_names)
:
- Python 3.11: 304 modules (add
_tokenize
and_typing
, removebinhex
) - Python 3.10: 303 modules
Removed modules¶
Python 3.11¶
Python 3.11 removed 1 module:
binhex
: deprecated in Python 3.9
Note: asyncore
, asynchat
, smtplib
were removed but then the SC
asked to add them back
Python 3.10¶
Python 3.10 removed 2 modules:
formatter
: deprecated in Python 3.4parser
: deprecated in Python 3.9, removal related to PEP 617 (PEG parser)
Python 3.9¶
Python 3.9 removed 2 modules:
dummy_threading
,_dummy_thread
: deprecated in Python 3.7; Python 3.7 requires threads to build: bpo-31370.
Python 3.8¶
Python 3.8 removed 1 module:
macpath
: deprecated in Python 3.7, Mac OS 9 is not longer used.
Python 3.7¶
Python 3.7 removed 1 module:
fpectl
: it was never enabled by default, never worked correctly on x86-64, and it changed the Python ABI in ways that caused unexpected breakage of C extensions (bpo-29137).
Python 3.6¶
Python 3.6 removed 6 modules:
CDIO
,CDROM
,DLFCN
,IN
,STROPTS
,TYPES
: undocumented, they had been available in the platform specificLib/plat-*/
directories, but were chronically out of date, inconsistently available across platforms, and unmaintained.
Python 3.0¶
Python 3.0 removed 74 stdlib modules, related to PEP 3108.
Moreover, many Python 2.7 modules have been renamed by PEP 3108.
Removed Mac modules (24):
aepack
aetools
aetypes
buildtools
Carbon
cfmfile
ColorPicker
EasyDialogs
findertools
fm
FrameWork
gensuitemodule
ic
icopen
mac
macerrors
MacOS
macosa
macostools
macresource
MiniAEFrame
Nav
PixMapWrapper
videoreader
Removed IRIX modules (7):
al
DEVICE
flp
gl
: Functions from the Silicon Graphics Graphics Library.imgfile
: Support for SGI imglib filesjpeg
: Read and write JPEG filessgi
: random SGI-specific things
Removed modules, replaced by the email
package (5):
mimetools
MimeWriter
mimify
multifile
rfc822
Other removed modules (38):
audiodev
: Classes for manipulating audio devices (currently only for Sun and SGI)Bastion
: Providing restricted access to objectsbsddb
Canvas
(tk)cd
: CD Audio Librarycommands
: Utility functions for running external commandscompiler
: analyze Python source code and generating Python bytecodedircache
: read directory listing with cachedl
:dl.open()
exceptions
: Standard exception classesFixTk
: Delay import _tkinter until we have set TCL_LIBRARY, imported by Tkinter`fl
: interface to Mark Overmars’ FORMS Libraryfpformat
: General floating point formatting functionsfuture_builtins
: Python 3 builtinsihooks
: Import hook supportimageop
: Manipulate raw image data, replaced with PIL/Pillowimputil
: Import utilitieslinuxaudiodev
: Linux audio device (/dev/dsp
) for python, replaced byossaudiodev
.markupbase
: Renamed to_markupbase
, used byhtml.parser
md5
: Replaced byhashlib
mhlib
: Manipulate MH mailboxes from Pythonmutex
: Lock and queue for mutual exclusionnew
: Interface to the creation of runtime implementation objectsos2emxpath
: Common operations on OS/2 pathnamespopen2
: Subprocesses with accessible I/O streamsposixfile
: File-like objects with locking supportrexec
: Restricted execution frameworksets
: Unordered collections of unique elements, replaced byset()
built-in typesgmllib
: Simple SGML parsersha
: Replaced byhashlib
sre
: Replaced byre
statvfs
: Replaced byos.statvfs()
stringold
: Collection of string operationsstrop
: Common string manipulations, optimized for speed (C extension)sunaudiodev
(SunOS): Access to Sun audio hardwaretoaiff
: Convert “arbitrary” sound files to AIFF (Apple and SGI’s audio format)user
: Hook to allow user-specified customization code to runxmllib
: Parser for XML, using the derived class as static DTD.