comparison test/test_mailgw.py @ 5418:55f09ca366c4

Python 3 preparation: StringIO. This generally arranges for StringIO and cStringIO references to use io.StringIO for Python 3 but io.BytesIO for Python 2, consistent with the string representations generally used in Roundup. A special FasterStringIO in the TAL code, which referenced internals of the old Python 2 StringIO module, is cut down so it doesn't actually do anything beyond the StringIO class it inherits from (it would also be reasonable to remove FasterStringIO completely). One place in roundup_server.py clearly needing binary I/O is made to use io.BytesIO unconditionally.
author Joseph Myers <jsm@polyomino.org.uk>
date Wed, 25 Jul 2018 09:08:29 +0000
parents d26921b851c3
children b0048969990d
comparison
equal deleted inserted replaced
5417:c749d6795bc2 5418:55f09ca366c4
26 from .pytest_patcher import mark_class 26 from .pytest_patcher import mark_class
27 skip_pgp = mark_class(pytest.mark.skip( 27 skip_pgp = mark_class(pytest.mark.skip(
28 reason="Skipping PGP tests: 'pyme' not installed")) 28 reason="Skipping PGP tests: 'pyme' not installed"))
29 29
30 30
31 from cStringIO import StringIO 31 from roundup.anypy.strings import StringIO
32 32
33 if 'SENDMAILDEBUG' not in os.environ: 33 if 'SENDMAILDEBUG' not in os.environ:
34 os.environ['SENDMAILDEBUG'] = 'mail-test.log' 34 os.environ['SENDMAILDEBUG'] = 'mail-test.log'
35 SENDMAILDEBUG = os.environ['SENDMAILDEBUG'] 35 SENDMAILDEBUG = os.environ['SENDMAILDEBUG']
36 36

Roundup Issue Tracker: http://roundup-tracker.org/