[issue38485] BUG Modules/_io/texio.c

2019-10-15 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- components: +IO nosy: +benjamin.peterson, stutzbach type: -> behavior versions: +Python 2.7, Python 3.8, Python 3.9 ___ Python tracker ___

[issue38485] BUG Modules/_io/texio.c

2019-10-15 Thread Jim Carroll
New submission from Jim Carroll : The io.TextIOWrapper class initializes a codec.IncrementalEncoder and uses it to encode str, but it never calls the encoder's encode('', final=True). According to the docs https://docs.python.org/3.5/library/codecs.html#codecs.IncrementalEncoder.encode: