mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
bpo-44498: Issue a deprecation warning on asynchat, asyncore and smtpd import (#26882)
* Issue a deprecation warning on smtpd import * Also issue DeprecationWarnings for asynchat and asyncore * Fix some tests * test___all__ requires the word 'module' or 'package' in the deprecation warning text, so add those to smtpd, asynchat, and asyncore. * In test_support, use pprint now instead of asyncore as the landmark. * Add What's New * Use ..deprecated:: * Use ..deprecated:: * Update Lib/smtpd.py Co-authored-by: Miro Hrončok <miro@hroncok.cz> * Update Doc/library/smtpd.rst Co-authored-by: Miro Hrončok <miro@hroncok.cz> * Import async{hat,ore} after the DeprecationWarning for this module Co-authored-by: Miro Hrončok <miro@hroncok.cz>
This commit is contained in:
parent
19459f8ce6
commit
8488b85c63
6 changed files with 40 additions and 9 deletions
|
@ -292,8 +292,8 @@ class TestSupport(unittest.TestCase):
|
|||
|
||||
def test_CleanImport(self):
|
||||
import importlib
|
||||
with import_helper.CleanImport("asyncore"):
|
||||
importlib.import_module("asyncore")
|
||||
with import_helper.CleanImport("pprint"):
|
||||
importlib.import_module("pprint")
|
||||
|
||||
def test_DirsOnSysPath(self):
|
||||
with import_helper.DirsOnSysPath('foo', 'bar'):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue