summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2016-10-25 15:49:13 (GMT)
committerGuido van Rossum <guido@python.org>2016-10-25 15:49:13 (GMT)
commit16591f440d650f77c841a3245785e2423a50249f (patch)
tree0b8d6ec68796387e160c5e0c06c65ecda84ba484 /Lib
parent1faf9025b5d599d66acac0f33d1500a2ff386368 (diff)
downloadcpython-16591f440d650f77c841a3245785e2423a50249f.zip
cpython-16591f440d650f77c841a3245785e2423a50249f.tar.gz
cpython-16591f440d650f77c841a3245785e2423a50249f.tar.bz2
Issue 25002: Deprecate asyncore/asynchat. Patch by Mariatta.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/asynchat.py5
-rw-r--r--Lib/asyncore.py4
2 files changed, 9 insertions, 0 deletions
diff --git a/Lib/asynchat.py b/Lib/asynchat.py
index fc1146a..fede592 100644
--- a/Lib/asynchat.py
+++ b/Lib/asynchat.py
@@ -46,8 +46,13 @@ method) up to the terminator, and then control will be returned to
you - by calling your self.found_terminator() method.
"""
import asyncore
+import warnings
+
from collections import deque
+warnings.warn(
+ 'asynchat module is deprecated in 3.6. Use asyncio instead.',
+ PendingDeprecationWarning, stacklevel=2)
class async_chat(asyncore.dispatcher):
"""This is an abstract class. You must derive from this class, and add
diff --git a/Lib/asyncore.py b/Lib/asyncore.py
index 705e406..f17b31a 100644
--- a/Lib/asyncore.py
+++ b/Lib/asyncore.py
@@ -60,6 +60,10 @@ from errno import EALREADY, EINPROGRESS, EWOULDBLOCK, ECONNRESET, EINVAL, \
_DISCONNECTED = frozenset({ECONNRESET, ENOTCONN, ESHUTDOWN, ECONNABORTED, EPIPE,
EBADF})
+warnings.warn(
+ 'asyncore module is deprecated in 3.6. Use asyncio instead.',
+ PendingDeprecationWarning, stacklevel=2)
+
try:
socket_map
except NameError: