Commit 1b5f58d1 authored by Raymond Hettinger's avatar Raymond Hettinger

Issue #21990: Cleanup unnecessary inner class definition in saxutils.

parent 2ce9ddd0
......@@ -98,14 +98,17 @@ def _gettextwriter(out, encoding):
except AttributeError:
pass
# wrap a binary writer with TextIOWrapper
class UnbufferedTextIOWrapper(io.TextIOWrapper):
def write(self, s):
super(UnbufferedTextIOWrapper, self).write(s)
self.flush()
return UnbufferedTextIOWrapper(buffer, encoding=encoding,
return _UnbufferedTextIOWrapper(buffer, encoding=encoding,
errors='xmlcharrefreplace',
newline='\n')
class _UnbufferedTextIOWrapper(io.TextIOWrapper):
def write(self, s):
super(_UnbufferedTextIOWrapper, self).write(s)
self.flush()
class XMLGenerator(handler.ContentHandler):
def __init__(self, out=None, encoding="iso-8859-1"):
......
......@@ -17,6 +17,9 @@ Library
socket.error() exceptions with blocking I/O errors: EAGAIN, EALREADY,
EINPROGRESS, or EWOULDBLOCK.
- Issue #21990: Clean-up unnecessary and slow inner class definition in
saxutils (Contributed by Alex Gaynor).
- Issue #1730136: Fix the comparison between a tkFont.Font and an object of
another kind.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment