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

bpo-28533: Remove asyncore, asynchat, smtpd modules #29521

Merged
merged 1 commit into from
Nov 15, 2021
Merged

bpo-28533: Remove asyncore, asynchat, smtpd modules #29521

merged 1 commit into from
Nov 15, 2021

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Nov 11, 2021

Remove the asyncore and asynchat modules, deprecated in Python
3.6: use the asyncio module instead.

Remove the smtpd module, deprecated in Python 3.6: the aiosmtpd
module can be used instead, it is based on asyncio.

  • Remove asyncore, asynchat and smtpd documentation
  • Remove test_asyncore, test_asynchat and test_smtpd
  • Rename Lib/asynchat.py to Lib/test/support/_asynchat.py
  • Rename Lib/asyncore.py to Lib/test/support/_asyncore.py
  • Rename Lib/smtpd.py to Lib/test/support/_smtpd.py
  • Remove DeprecationWarning from private _asyncore, _asynchat and
    _smtpd modules
  • _smtpd: remove deprecated properties

https://bugs.python.org/issue28533

Remove the asyncore and asynchat modules, deprecated in Python
3.6: use the asyncio module instead.

Remove the smtpd module, deprecated in Python 3.6: the aiosmtpd
module can be used instead, it is based on asyncio.

* Remove asyncore, asynchat and smtpd documentation
* Remove test_asyncore, test_asynchat and test_smtpd
* Rename Lib/asynchat.py to Lib/test/support/_asynchat.py
* Rename Lib/asyncore.py to Lib/test/support/_asyncore.py
* Rename Lib/smtpd.py to Lib/test/support/_smtpd.py
* Remove DeprecationWarning from private _asyncore, _asynchat and
  _smtpd modules
* _smtpd: remove deprecated properties
@vstinner
Copy link
Member Author

A year ago @aeros worked on a patch: https://github.com/aeros/cpython/tree/remove-asycore-asynchat-smtpd

Kyle mentioned the PEP 594. I prefer to not mention it since this PEP is still a draft. IMO the deprecation and linked to bpo issues is enough to justify the removals.

cc @tiran

Copy link
Member

@orsenthil orsenthil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thank you, @vstinner :)

Copy link
Member

@gvanrossum gvanrossum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's time for these long-deprecated packages to leave.

@tiran tiran added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Nov 12, 2021
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @tiran for commit 1bf97aa 🤖

If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Nov 12, 2021
@yan12125 yan12125 mentioned this pull request Nov 15, 2021
13 tasks
@vstinner
Copy link
Member Author

I looked at buildbot failures:

  • AMD64 Windows10: unrelated, test_importlib failed. It looks like a Git clone issue. Not sure why it occurs on "PR" builds.
  • AMD64 Arch Linux Asan PR: unrelated, https://bugs.python.org/issue45797

@vstinner vstinner merged commit 9bf2cbc into python:main Nov 15, 2021
@vstinner vstinner deleted the remove_asyncore branch November 15, 2021 23:29
@vstinner
Copy link
Member Author

Merged. I prefer to merge such change early in the 3.11 devcycle, so we can revert it if it breaks too many projects.

Thanks for the reviews and approvals!

vstinner added a commit that referenced this pull request Dec 7, 2021
remykarem pushed a commit to remykarem/cpython that referenced this pull request Dec 7, 2021
Remove the asyncore and asynchat modules, deprecated in Python
3.6: use the asyncio module instead.

Remove the smtpd module, deprecated in Python 3.6: the aiosmtpd
module can be used instead, it is based on asyncio.

* Remove asyncore, asynchat and smtpd documentation
* Remove test_asyncore, test_asynchat and test_smtpd
* Rename Lib/asynchat.py to Lib/test/support/_asynchat.py
* Rename Lib/asyncore.py to Lib/test/support/_asyncore.py
* Rename Lib/smtpd.py to Lib/test/support/_smtpd.py
* Remove DeprecationWarning from private _asyncore, _asynchat and
  _smtpd modules
* _smtpd: remove deprecated properties
@Karlson2k
Copy link

In the meantime the suggested replacement supports Python versions up to 3.9. Python 3.10 and later is not supported.
There is no single commit in the past 14 months in the repo.
Python 3.11 will be released without working replacement. The suggested replacement is not compatible with 3.11.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants