[issue28533] Replace asyncore/asynchat/smptd in tests

STINNER Victor report at bugs.python.org
Thu Nov 11 07:17:49 EST 2021


STINNER Victor <vstinner at python.org> added the comment:

I wrote PR 29521 to remove the asyncore, asynchat and smtpd modules.

> libregrtest/save_env.py only checks that asyncore.socket_map is not modified, we can keep it until asyncore is really removed.

I chose to remove it instead of my PR.

> test_support.py only tests that it's possible to have a "clean" import of asyncore, it can be easily be replaced later.

This code has been removed in the meanwhile.

> But then a lot of code starts with to fail -Werror.

While tests using asyncore, asynchat and smtpd have been modified to catch the DeprecationWarning warning, I chose to remove this warning in my PR, since I made the 3 modules private. I don't think that test.support private modules must emit deprecation warnings.

> So the first step is to decide if it's ok to remove smtpd right now.

IMO it's ok to remove it since it is deprecated since Python 3.6.

> asyncore, asynchat and smtpd are all deprecated now, for removal in 3.12.

Did you see an explicit mention of Python 3.12? I only saw mention of "Python 3.6" which is the version when the 3 modules were deprecated.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue28533>
_______________________________________


More information about the Python-bugs-list mailing list