diff -r 5b33829badcc Doc/library/asynchat.rst --- a/Doc/library/asynchat.rst Mon Oct 24 23:49:51 2016 +0300 +++ b/Doc/library/asynchat.rst Mon Oct 24 22:01:36 2016 -0700 @@ -9,6 +9,9 @@ **Source code:** :source:`Lib/asynchat.py` +.. deprecated:: 3.6 + Please use :mod:`asyncio` instead. + -------------- .. note:: diff -r 5b33829badcc Doc/library/asyncore.rst --- a/Doc/library/asyncore.rst Mon Oct 24 23:49:51 2016 +0300 +++ b/Doc/library/asyncore.rst Mon Oct 24 22:01:36 2016 -0700 @@ -12,6 +12,9 @@ **Source code:** :source:`Lib/asyncore.py` +.. deprecated:: 3.6 + Please use :mod:`asyncio` instead. + -------------- .. note:: diff -r 5b33829badcc Lib/asynchat.py --- a/Lib/asynchat.py Mon Oct 24 23:49:51 2016 +0300 +++ b/Lib/asynchat.py Mon Oct 24 22:01:36 2016 -0700 @@ -46,8 +46,13 @@ 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 -r 5b33829badcc Lib/asyncore.py --- a/Lib/asyncore.py Mon Oct 24 23:49:51 2016 +0300 +++ b/Lib/asyncore.py Mon Oct 24 22:01:36 2016 -0700 @@ -60,6 +60,10 @@ _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: