summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_support.py
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2021-06-24 19:57:55 (GMT)
committerGitHub <noreply@github.com>2021-06-24 19:57:55 (GMT)
commita80a38ee9a7b2e26dba848793cc298d8435fddd5 (patch)
tree23543b6fdfb11076b6db2393cb27701d1bec3dcc /Lib/test/test_support.py
parent11f1a30cdb59f9da0209798d2057f7afacbd9547 (diff)
downloadcpython-a80a38ee9a7b2e26dba848793cc298d8435fddd5.zip
cpython-a80a38ee9a7b2e26dba848793cc298d8435fddd5.tar.gz
cpython-a80a38ee9a7b2e26dba848793cc298d8435fddd5.tar.bz2
[3.10] bpo-44498: Issue a deprecation warning on asynchat, asyncore and smtpd import (GH-26882) (GH-26904)
* 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> (cherry picked from commit 8488b85c6397fe58f17fc00e047044c959ac0b04) Co-authored-by: Barry Warsaw <barry@python.org> Automerge-Triggered-By: GH:warsaw
Diffstat (limited to 'Lib/test/test_support.py')
-rw-r--r--Lib/test/test_support.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_support.py b/Lib/test/test_support.py
index 55d78b7..b1d3411 100644
--- a/Lib/test/test_support.py
+++ b/Lib/test/test_support.py
@@ -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'):