diff options
Diffstat (limited to 'Lib/asynchat.py')
-rw-r--r-- | Lib/asynchat.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/asynchat.py b/Lib/asynchat.py index 8a7176d..121b467 100644 --- a/Lib/asynchat.py +++ b/Lib/asynchat.py @@ -49,6 +49,8 @@ you - by calling your self.found_terminator() method. import socket import asyncore from collections import deque +from test.test_support import catch_warning +from warnings import filterwarnings class async_chat (asyncore.dispatcher): """This is an abstract class. You must derive from this class, and add @@ -216,7 +218,9 @@ class async_chat (asyncore.dispatcher): # handle classic producer behavior obs = self.ac_out_buffer_size try: - data = buffer(first, 0, obs) + with catch_warning(record=False): + filterwarnings("ignore", ".*buffer", DeprecationWarning) + data = buffer(first, 0, obs) except TypeError: data = first.more() if data: |