Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(4)

Unified Diff: Lib/asynchat.py

Issue 3255: Issue #3602 (Closed) SVN Base: http://svn.python.org/view/*checkout*/python/trunk/
Patch Set: Created 1 year, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side by-side-diff with in-line comments
Download patch
Index: Lib/asynchat.py
===================================================================
--- Lib/asynchat.py (revision 65979)
+++ Lib/asynchat.py (working copy)
@@ -49,8 +49,9 @@
import socket
import asyncore
from collections import deque
+from sys import py3kwarning
Benjamin 2008/08/23 01:46:36 I think it's better to just "import sys" here, so
brett.cannon 2008/08/23 02:19:54 On 2008/08/23 01:46:36, Benjamin wrote: > I think
from test.test_support import catch_warning
-from warnings import filterwarnings
+from warnings import filterwarnings, catch_warnings
class async_chat (asyncore.dispatcher):
"""This is an abstract class. You must derive from this class, and add
@@ -218,8 +219,9 @@
# handle classic producer behavior
obs = self.ac_out_buffer_size
try:
- with catch_warning(record=False):
- filterwarnings("ignore", ".*buffer", DeprecationWarning)
+ with catch_warnings():
+ if py3kwarning:
+ filterwarnings("ignore", ".*buffer", DeprecationWarning)
data = buffer(first, 0, obs)
except TypeError:
data = first.more()

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld r483