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: Modernize TextFile
Type: enhancement Stage: resolved
Components: Distutils Versions: Python 3.5
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: Nosy List: dstufft, eric.araujo, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2014-11-09 14:45 by serhiy.storchaka, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
text_file.diff serhiy.storchaka, 2014-11-09 14:45 review
Messages (6)
msg230886 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) 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) * (Python committer) 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) * (Python committer) Date: 2014-11-18 18:01
So you suggest just close this issue?
msg231355 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2014-11-19 06:23
Yes.
msg231358 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2014-11-19 07:49
Thank you for your response. This was a part of large patch about migration to use of "with" (issue22826 and issue22831 are other parts).
msg231394 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) 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:10adminsetgithub: 67014
2014-11-19 17:24:59eric.araujosetmessages: + msg231394
2014-11-19 07:49:30serhiy.storchakasetstatus: open -> closed
resolution: rejected
messages: + msg231358

stage: patch review -> resolved
2014-11-19 06:23:51eric.araujosetmessages: + msg231355
2014-11-18 18:01:27serhiy.storchakasetmessages: + msg231334
2014-11-15 21:18:10eric.araujosetmessages: + msg231218
2014-11-09 14:45:41serhiy.storchakacreate