[ext] Remove use of cStringIO
authorRémi Cardona <remi.cardona@free.fr>
Wed, 20 Aug 2014 20:46:17 +0200
changeset 10212 dccce2be3101
parent 10211 59a77e8847bc
child 10213 e53cc2182cf8
[ext] Remove use of cStringIO We create a StringIO never to read anything from it. Docutils seems to support setting the 'warning_stream' to False to ignore warnings. So let's just do that.
ext/rest.py
--- a/ext/rest.py	Wed Jul 30 22:34:55 2014 +0200
+++ b/ext/rest.py	Wed Aug 20 20:46:17 2014 +0200
@@ -34,7 +34,6 @@
 """
 __docformat__ = "restructuredtext en"
 
-from cStringIO import StringIO
 from itertools import chain
 from logging import getLogger
 from os.path import join
@@ -405,7 +404,7 @@
         # remove unprintable characters unauthorized in xml
         data = data.translate(ESC_CAR_TABLE)
     settings = {'input_encoding': encoding, 'output_encoding': 'unicode',
-                'warning_stream': StringIO(),
+                'warning_stream': False,
                 'traceback': True, # don't sys.exit
                 'stylesheet': None, # don't try to embed stylesheet (may cause
                                     # obscure bug due to docutils computing