Skip to content

Commit 381057c

Browse files
Update modules removed in Python 3.13 (actions#247)
1 parent 5da3a44 commit 381057c

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

tests/sources/python-modules.py

+21
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,27 @@ def replace(lst, old, new):
274274
standard_library.remove('asyncore')
275275
standard_library.remove('asynchat')
276276

277+
# 'aifc', 'cgi', 'cgitb', 'chunk', 'crypt', 'imghdr', 'lib2to3', 'mailcap', 'nntplib',
278+
# 'pipes', 'sndhdr', 'sunau', 'telnetlib', 'uu' and 'xdrlib' modules have been removed
279+
# from Python 3.13
280+
# https://docs.python.org/dev/whatsnew/3.13.html
281+
if sys.version_info >= (3, 13):
282+
standard_library.remove('aifc')
283+
standard_library.remove('cgi')
284+
standard_library.remove('cgitb')
285+
standard_library.remove('chunk')
286+
standard_library.remove('crypt')
287+
standard_library.remove('imghdr')
288+
standard_library.remove('lib2to3')
289+
standard_library.remove('mailcap')
290+
standard_library.remove('nntplib')
291+
standard_library.remove('pipes')
292+
standard_library.remove('sndhdr')
293+
standard_library.remove('sunau')
294+
standard_library.remove('telnetlib')
295+
standard_library.remove('uu')
296+
standard_library.remove('xdrlib')
297+
277298
# Remove tkinter and Easter eggs
278299
excluded_modules = [
279300
'antigravity',

0 commit comments

Comments
 (0)