Skip to content

Commit aed20ab

Browse files
committed
removed FasterStringIO
1 parent 999d96e commit aed20ab

File tree

2 files changed

+4
-11
lines changed

2 files changed

+4
-11
lines changed

roundup/cgi/PageTemplates/PageTemplate.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@
2525
from roundup.cgi.TAL.TALParser import TALParser
2626
from roundup.cgi.TAL.HTMLTALParser import HTMLTALParser
2727
from roundup.cgi.TAL.TALGenerator import TALGenerator
28-
from roundup.cgi.TAL.TALInterpreter import TALInterpreter, FasterStringIO
28+
from roundup.cgi.TAL.TALInterpreter import TALInterpreter
2929
from .Expressions import getEngine
30+
from roundup.anypy.strings import StringIO
3031

3132

3233
class PageTemplate:
@@ -46,7 +47,7 @@ class PageTemplate:
4647
def StringIO(self):
4748
# Third-party products wishing to provide a full Unicode-aware
4849
# StringIO can do so by monkey-patching this method.
49-
return FasterStringIO()
50+
return StringIO()
5051

5152
def pt_edit(self, text, content_type):
5253
if content_type:

roundup/cgi/TAL/TALInterpreter.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ def __init__(self, program, macros, engine, stream=None,
152152
def StringIO(self):
153153
# Third-party products wishing to provide a full Unicode-aware
154154
# StringIO can do so by monkey-patching this method.
155-
return FasterStringIO()
155+
return StringIO()
156156

157157
def saveState(self):
158158
return (self.position, self.col, self.stream,
@@ -751,13 +751,5 @@ def do_onError_tal(self, block_handler):
751751
bytecode_handlers_tal["optTag"] = do_optTag_tal
752752

753753

754-
class FasterStringIO(StringIO):
755-
"""Append-only version of StringIO.
756-
757-
This let's us have a much faster write() method.
758-
"""
759-
pass
760-
761-
762754
def _write_ValueError(s):
763755
raise ValueError("I/O operation on closed file")

0 commit comments

Comments
 (0)