Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PEP 594: Remove stdlib modules scheduled for deletion in Python 3.13 #104773

Closed
19 tasks done
vstinner opened this issue May 22, 2023 · 13 comments
Closed
19 tasks done

PEP 594: Remove stdlib modules scheduled for deletion in Python 3.13 #104773

vstinner opened this issue May 22, 2023 · 13 comments
Labels
3.13 new features, bugs and security fixes

Comments

@vstinner
Copy link
Member

vstinner commented May 22, 2023

PEP 594 ("Removing dead batteries from the standard library") deprecated the following 19 modules in Python 3.11 (or before) and their removal in Python 3.13:

  • aifc
  • audioop
  • cgi
  • cgitb
  • chunk
  • crypt
  • imghdr
  • mailcap
  • msilib
  • nis
  • nntplib
  • ossaudiodev
  • pipes
  • sndhdr
  • spwd
  • sunau
  • telnetlib
  • uu
  • xdrlib

I propose to remove them as soon as possible in the Python 3.13 development cycle to help users to prepare for this incompatible change before Python 3.13 final release (scheduled for October 2024).

I plan to work on pull requests to remove these modules.

Linked PRs

vstinner added a commit to vstinner/cpython that referenced this issue May 22, 2023
Remove the Lib/test/sndhdrdata/ directory.
vstinner added a commit to vstinner/cpython that referenced this issue May 22, 2023
Remove the Lib/test/sndhdrdata/ directory.
vstinner added a commit to vstinner/cpython that referenced this issue May 22, 2023
vstinner added a commit to vstinner/cpython that referenced this issue May 22, 2023
Remove the Lib/test/sndhdrdata/ directory.
vstinner added a commit to vstinner/cpython that referenced this issue May 22, 2023
vstinner added a commit to vstinner/cpython that referenced this issue May 23, 2023
vstinner added a commit to vstinner/cpython that referenced this issue May 23, 2023
* Remove Lib/test/imghdrdata/ directory.
* Copy 5 pictures (gif, png, ppm, pgm, xbm) from removed
  Lib/test/imghdrdata/ to a new Lib/test/tkinterdata/ directory.
vstinner added a commit to vstinner/cpython that referenced this issue May 23, 2023
* Remove the Lib/test/imghdrdata/ directory.
* Copy 5 pictures (gif, png, ppm, pgm, xbm) from removed
  Lib/test/imghdrdata/ to a new Lib/test/tkinterdata/ directory.
vstinner added a commit to vstinner/cpython that referenced this issue May 23, 2023
vstinner added a commit to vstinner/cpython that referenced this issue May 23, 2023
test_pyclbr now long tests the cgi module.
vstinner added a commit to vstinner/cpython that referenced this issue May 23, 2023
test_pyclbr no longer tests the cgi module.
vstinner added a commit to vstinner/cpython that referenced this issue May 23, 2023
vstinner added a commit to vstinner/cpython that referenced this issue May 23, 2023
* Replace "cgi" with "!cgi" in the Sphinx documentation to avoid
  warnings on broken references.
* test_pyclbr no longer tests the cgi module.
@hugovk hugovk added the 3.13 new features, bugs and security fixes label May 23, 2023
vstinner added a commit to vstinner/cpython that referenced this issue May 23, 2023
* Replace "cgi" with "!cgi" in the Sphinx documentation to avoid
  warnings on broken references.
* test_pyclbr no longer tests the cgi module.
vstinner added a commit to vstinner/cpython that referenced this issue May 24, 2023
* Replace "cgi" with "!cgi" in the Sphinx documentation to avoid
  warnings on broken references.
* test_pyclbr no longer tests the cgi module.
vstinner added a commit to vstinner/cpython that referenced this issue May 24, 2023
* Replace "cgi" with "!cgi" in the Sphinx documentation to avoid
  warnings on broken references.
* test_pyclbr no longer tests the cgi module.
vstinner added a commit that referenced this issue May 24, 2023
* Replace "cgi" with "!cgi" in the Sphinx documentation to avoid
  warnings on broken references.
* test_pyclbr no longer tests the cgi module.
vstinner added a commit to vstinner/cpython that referenced this issue May 24, 2023
Remove the Lib/test/sndhdrdata/ directory.
vstinner added a commit that referenced this issue May 24, 2023
Remove the Lib/test/sndhdrdata/ directory.
vstinner added a commit to vstinner/cpython that referenced this issue May 24, 2023
vstinner added a commit to vstinner/cpython that referenced this issue May 24, 2023
vstinner added a commit to vstinner/cpython that referenced this issue May 25, 2023
Remove the crypt module and its private _crypt extension, deprecated
in Python 3.11.
vstinner added a commit that referenced this issue May 25, 2023
Remove the crypt module and its private _crypt extension, deprecated
in Python 3.11.
vstinner added a commit to vstinner/cpython that referenced this issue May 25, 2023
Doc/license.rst: Keep the UUencode and UUdecode license since it's
also used by the uu codec.
@vstinner
Copy link
Member Author

For the deprecation of the uu codec and uu functions of the binascii module, see: PR #92758.

vstinner added a commit that referenced this issue May 25, 2023
Doc/license.rst: Keep the UUencode and UUdecode license since it's
also used by the uu codec.
vstinner added a commit to vstinner/cpython that referenced this issue May 25, 2023
@vstinner
Copy link
Member Author

There are issues and PRs about the removed modules, however I don't know if we can close them until 3.12 stops accepting bugfixes.

Oh, you're right. Bugs can still be fixed in Python 3.12!

vstinner added a commit that referenced this issue May 25, 2023
* Remove .aifc and .aiff test files of Lib/test/audiodata/
* Remove Lib/test/Sine-1000Hz-300ms.aif test file
vstinner added a commit to vstinner/cpython that referenced this issue May 25, 2023
vstinner added a commit to vstinner/cpython that referenced this issue May 25, 2023
vstinner added a commit to vstinner/cpython that referenced this issue May 25, 2023
vstinner added a commit that referenced this issue May 25, 2023
vstinner added a commit to vstinner/cpython that referenced this issue May 25, 2023
* Remove the Lib/test/imghdrdata/ directory.
* Copy 5 pictures (gif, png, ppm, pgm, xbm) from removed
  Lib/test/imghdrdata/ to a new Lib/test/tkinterdata/ directory.
@vstinner
Copy link
Member Author

So far, 18 modules have been removed. Removing the last one, imghdr, breaks the Docs CI job: PR #104777. I proposed to increase the minimum Sphinx version to build the Python documentation: issue #104818.

vstinner added a commit to vstinner/cpython that referenced this issue May 26, 2023
* Remove the Lib/test/imghdrdata/ directory.
* Copy 5 pictures (gif, png, ppm, pgm, xbm) from removed
  Lib/test/imghdrdata/ to a new Lib/test/tkinterdata/ directory.
vstinner added a commit to vstinner/cpython that referenced this issue May 26, 2023
* Remove the Lib/test/imghdrdata/ directory.
* Copy 5 pictures (gif, png, ppm, pgm, xbm) from removed
  Lib/test/imghdrdata/ to a new Lib/test/tkinterdata/ directory.
vstinner added a commit that referenced this issue May 26, 2023
* Remove the Lib/test/imghdrdata/ directory.
* Copy 5 pictures (gif, png, ppm, pgm, xbm) from removed
  Lib/test/imghdrdata/ to a new Lib/test/tkinterdata/ directory.
* Update Sphinx from 4.5 to 6.2 in Doc/requirements.txt.
@vstinner
Copy link
Member Author

Summary:

  • All modules scheduled for removal by PEP 594 have been removed in Python 3.12 and Python 3.13
  • The removal of the uu module makes 2 binascii functions useless and should be deprecated.
  • One minor thing that we missed in PEP 594 was the removal of the uu codec: https://peps.python.org/pep-0594/#uu-and-the-uu-encoding
  • I was wrong: we must not close all issues of removed modules, since bugs can still be fixed in Python 3.11 and 3.12: https://devguide.python.org/versions/

The remaining minor task related to the uu encoding is covered by PR #92758.

I'm not sure how to coordinate the work on helping third-party Python projects migrating to Python 3.13: move away from removed modules. But I prefer to not reuse this issue for this. Maybe discuss.python.org is a better place for that, since it's more visible than the Python bug tracker.

I created python/peps#3156 to mark PEP 594 as Final.

@vstinner
Copy link
Member Author

Thanks again to all reviewers of my PRs removing modules, especially @hugovk! Thanks @zware for handling msilib removal!

@vstinner
Copy link
Member Author

I created a discussion on discuss.python.org: PEP 594 has been implementated: Python 3.13 removes 20 stdlib modules.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.13 new features, bugs and security fixes
Projects
None yet
Development

No branches or pull requests

4 participants