This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: codecs.StreamWriter: reset() on close()
Type: enhancement Stage: needs patch
Components: Library (Lib) Versions: Python 3.2
process
Status: languishing Resolution: out of date
Dependencies: Superseder:
Assigned To: lemburg Nosy List: ajaksu2, lemburg, mzabaluev
Priority: normal Keywords:

Created on 2001-09-10 21:55 by mzabaluev, last changed 2022-04-10 16:04 by admin.

Messages (6)
msg61066 - (view) Author: Mikhail Zabaluev (mzabaluev) Date: 2001-09-10 21:55
A codecs.StreamWriter subclass can presumably hold
state between subsequent .write()'s. Its .reset()
method should probably finalize encoding as the end of
input would do.
Would it be reasonable to define the default
implementation of codecs.StreamWriter.close(self) which
calls codecs.StreamWriter.reset(self), then closes the
underlying stream? Same for
codecs.StreamWriter.__del__(self)?
msg61288 - (view) Author: Marc-Andre Lemburg (lemburg) * (Python committer) Date: 2008-01-20 13:24
Sounds reasonable.

Could you come up with a patch ?

Thanks.
msg61388 - (view) Author: Mikhail Zabaluev (mzabaluev) Date: 2008-01-21 13:13
Wow, it's exciting to receive followups 6+ years after filing the bug.

> Could you come up with a patch ?

No, I don't do much Python development these days.
msg61389 - (view) Author: Marc-Andre Lemburg (lemburg) * (Python committer) Date: 2008-01-21 13:19
Sorry for not getting back to you earlier. 

The ticket was unassigned and only assigned to me yesterday.
msg114140 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2010-08-17 18:17
Anyone interested in this?  Marc-Andre seemed +0.? on this in msg61288.
msg116561 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2010-09-16 15:26
No reply to msg114140.
History
Date User Action Args
2022-04-10 16:04:25adminsetgithub: 35150
2014-02-03 19:54:25BreamoreBoysetnosy: - BreamoreBoy
2010-09-16 17:25:36r.david.murraysetstatus: closed -> languishing
2010-09-16 15:26:55BreamoreBoysetstatus: open -> closed
resolution: out of date
messages: + msg116561
2010-08-17 18:17:27BreamoreBoysetnosy: + BreamoreBoy

messages: + msg114140
versions: + Python 3.2, - Python 2.7
2009-02-12 20:37:55lemburgsetstage: test needed -> needs patch
2009-02-12 19:45:22ajaksu2setnosy: + ajaksu2
stage: test needed
components: + Library (Lib), - None
versions: + Python 2.7
2008-01-21 13:19:05lemburgsetmessages: + msg61389
2008-01-21 13:13:40mzabaluevsetmessages: + msg61388
2008-01-20 13:24:00lemburgsetmessages: + msg61288
2008-01-20 12:32:26georg.brandlsetassignee: lemburg
nosy: + lemburg
2001-09-10 21:55:47mzabaluevcreate