Issue 22825: Modernize TextFile - Python tracker (original ) (raw ) This issue has been migrated to GitHub: https://github.com/python/cpython/issues/67014
classification
process
Created on 2014-11-09 14:45 by serhiy.storchaka , last changed 2022-04-11 14:58 by admin . This issue is now closed .
Messages (6)
msg230886 - (view)
Author: Serhiy Storchaka (serhiy.storchaka) *
Date: 2014-11-09 14:45
Proposed patch makes distutils.text_file.TextFile support context management and iterator protocols. It makes the use of TextFile simpler. The patch also includes other minor modernizations.
msg231218 - (view)
Author: Éric Araujo (eric.araujo) *
Date: 2014-11-15 21:18
I would not touch any internal parts of distutils, such as TextFile. It is not a public class meant for general usage. The code is not ideal but not broken.
msg231334 - (view)
Author: Serhiy Storchaka (serhiy.storchaka) *
Date: 2014-11-18 18:01
So you suggest just close this issue?
msg231355 - (view)
Author: Éric Araujo (eric.araujo) *
Date: 2014-11-19 06:23
Yes.
msg231358 - (view)
Author: Serhiy Storchaka (serhiy.storchaka) *
Date: 2014-11-19 07:49
Thank you for your response. This was a part of large patch about migration to use of "with" ( and are other parts).
msg231394 - (view)
Author: Éric Araujo (eric.araujo) *
Date: 2014-11-19 17:24
Thank you for your effort! Note that distutils uses try:... finally: fp.close(), so it tries to avoid the FD leak issues.
History
Date
User
Action
Args
2022-04-11 14:58:10
admin
set
github: 67014
2014-11-19 17:24:59
eric.araujo
set
messages: +
2014-11-19 07:49:30
serhiy.storchaka
set
status: open -> closedresolution: rejectedmessages: + stage: patch review -> resolved
2014-11-19 06:23:51
eric.araujo
set
messages: +
2014-11-18 18:01:27
serhiy.storchaka
set
messages: +
2014-11-15 21🔞10
eric.araujo
set
messages: +
2014-11-09 14:45:41
serhiy.storchaka
create