This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Remove _xxsubinterpreters from sys.stdlib_module_names
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.10
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: brett.cannon, vstinner
Priority: normal Keywords: patch

Created on 2021-03-10 01:24 by brett.cannon, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 24814 merged vstinner, 2021-03-10 10:32
Messages (6)
msg388401 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2021-03-10 01:24
I noticed that _xxsubinterpreters is in sys.stdlib_module_names but none of the other `_xx` modules are included (nor is 'test'). Since _xxsubinterpreters is only meant for testing (ATM) I think it should probably be left out.
msg388421 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2021-03-10 10:33
> I noticed that _xxsubinterpreters is in sys.stdlib_module_names but none of the other `_xx` modules are included (nor is 'test'). Since _xxsubinterpreters is only meant for testing (ATM) I think it should probably be left out.

Oh right, I agree that _xxsubinterpreters is not really part of the stdlib, it's more designed to write unit tests. I wrote PR 24814 to remove it.
msg388422 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2021-03-10 10:34
With PR 24814, sys.stdlib_module_names contains 301 names:

__future__
_abc
_aix_support
_ast
_asyncio
_bisect
_blake2
_bootsubprocess
_bz2
_codecs
_codecs_cn
_codecs_hk
_codecs_iso2022
_codecs_jp
_codecs_kr
_codecs_tw
_collections
_collections_abc
_compat_pickle
_compression
_contextvars
_crypt
_csv
_ctypes
_curses
_curses_panel
_datetime
_dbm
_decimal
_elementtree
_frozen_importlib
_frozen_importlib_external
_functools
_gdbm
_hashlib
_heapq
_imp
_io
_json
_locale
_lsprof
_lzma
_markupbase
_md5
_msi
_multibytecodec
_multiprocessing
_opcode
_operator
_osx_support
_pickle
_posixshmem
_posixsubprocess
_py_abc
_pydecimal
_pyio
_queue
_random
_sha1
_sha256
_sha3
_sha512
_signal
_sitebuiltins
_socket
_sqlite3
_sre
_ssl
_stat
_statistics
_string
_strptime
_struct
_symtable
_thread
_threading_local
_tkinter
_tracemalloc
_uuid
_warnings
_weakref
_weakrefset
_winapi
_zoneinfo
abc
aifc
antigravity
argparse
array
ast
asynchat
asyncio
asyncore
atexit
audioop
base64
bdb
binascii
binhex
bisect
builtins
bz2
cProfile
calendar
cgi
cgitb
chunk
cmath
cmd
code
codecs
codeop
collections
colorsys
compileall
concurrent
configparser
contextlib
contextvars
copy
copyreg
crypt
csv
ctypes
curses
dataclasses
datetime
dbm
decimal
difflib
dis
distutils
doctest
email
encodings
ensurepip
enum
errno
faulthandler
fcntl
filecmp
fileinput
fnmatch
fractions
ftplib
functools
gc
genericpath
getopt
getpass
gettext
glob
graphlib
grp
gzip
hashlib
heapq
hmac
html
http
idlelib
imaplib
imghdr
imp
importlib
inspect
io
ipaddress
itertools
json
keyword
lib2to3
linecache
locale
logging
lzma
mailbox
mailcap
marshal
math
mimetypes
mmap
modulefinder
msilib
msvcrt
multiprocessing
netrc
nis
nntplib
nt
ntpath
nturl2path
numbers
opcode
operator
optparse
os
ossaudiodev
pathlib
pdb
pickle
pickletools
pipes
pkgutil
platform
plistlib
poplib
posix
posixpath
pprint
profile
pstats
pty
pwd
py_compile
pyclbr
pydoc
pydoc_data
pyexpat
queue
quopri
random
re
readline
reprlib
resource
rlcompleter
runpy
sched
secrets
select
selectors
shelve
shlex
shutil
signal
site
smtpd
smtplib
sndhdr
socket
socketserver
spwd
sqlite3
sre_compile
sre_constants
sre_parse
ssl
stat
statistics
string
stringprep
struct
subprocess
sunau
symtable
sys
sysconfig
syslog
tabnanny
tarfile
telnetlib
tempfile
termios
textwrap
this
threading
time
timeit
tkinter
token
tokenize
trace
traceback
tracemalloc
tty
turtle
turtledemo
types
typing
unicodedata
unittest
urllib
uu
uuid
venv
warnings
wave
weakref
webbrowser
winreg
winsound
wsgiref
xdrlib
xml
xmlrpc
zipapp
zipfile
zipimport
zlib
zoneinfo
msg388426 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2021-03-10 11:10
New changeset a9c03d7fb78ab79710f79190f0584a09d9fd1a61 by Victor Stinner in branch 'master':
bpo-43456: Remove _xxsubinterpreters from sys.stdlib_module_names (GH-24814)
https://github.com/python/cpython/commit/a9c03d7fb78ab79710f79190f0584a09d9fd1a61
msg388458 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2021-03-10 20:59
Thanks, Victor! And I will independently say that my use of sys.stdlib_module_names suggests the list seems accurate(and is useful)!
msg388459 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2021-03-10 21:02
> Thanks, Victor! And I will independently say that my use of sys.stdlib_module_names suggests the list seems accurate(and is useful)!

Well, it helps to define "what is the stdlib?" ;-)
History
Date User Action Args
2022-04-11 14:59:42adminsetgithub: 87622
2021-03-10 21:02:41vstinnersetmessages: + msg388459
2021-03-10 20:59:31brett.cannonsetmessages: + msg388458
2021-03-10 11:10:36vstinnersetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2021-03-10 11:10:26vstinnersetmessages: + msg388426
2021-03-10 10:34:25vstinnersetmessages: + msg388422
2021-03-10 10:33:09vstinnersetmessages: + msg388421
2021-03-10 10:32:27vstinnersetkeywords: + patch
stage: patch review
pull_requests: + pull_request23580
2021-03-10 01:24:59brett.cannoncreate