[issue22825] Modernize TextFile

2014-11-09 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

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.

--
components: Distutils
files: text_file.diff
keywords: patch
messages: 230886
nosy: dstufft, eric.araujo, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Modernize TextFile
type: enhancement
versions: Python 3.5
Added file: http://bugs.python.org/file37151/text_file.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22825] Modernize TextFile

2014-11-15 Thread Éric Araujo

Éric Araujo added the comment:

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.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22825] Modernize TextFile

2014-11-18 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

So you suggest just close this issue?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22825] Modernize TextFile

2014-11-18 Thread Éric Araujo

Éric Araujo added the comment:

Yes.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22825] Modernize TextFile

2014-11-18 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you for your response. This was a part of large patch about migration to 
use of "with" (issue22826 and issue22831 are other parts).

--
resolution:  -> rejected
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22825] Modernize TextFile

2014-11-19 Thread Éric Araujo

Éric Araujo added the comment:

Thank you for your effort!  Note that distutils uses try:... finally: 
fp.close(), so it tries to avoid the FD leak issues.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com