Éric Araujo <mer...@netwok.org> added the comment:

> I removed the "import as" bit completely and changed all occurrences of 
> _open() to
> builtins.open() which is more readable and explanatory.
Truly.  tokenize got a similar fix in ea260d393cde (without a test, so I think 
that here we don’t need one either); locale has a similar bug.

> I object to changing the error messages in the 3.2 branch due to backwards 
> compatibility,
> although I left them in the patch for now.
I removed these changes in the attached patch.  I’ll make another patch for 3.3 
for that.

> (I changed the style of %-formatting with a single item tuple in order to 
> match the coding
> style of the rest of the module.)
My reason was not style (I hate %-formatting with single-element tuples) but 
defensive coding, in case someone gives a tuple as argument.  OTOH, that will 
just change the type of error they get for the same line, and the doc clearly 
says what is allowed, so it does not matter.

> I inlined the shutil.copyfileobj() method to remove the shutil import.
Great, this will eliminate a circular dependency I had in a shutil refactoring 
(I need to access tarfile.compression_formats, but the tarfile module is not 
ready when shutil gets imported), and also reduce the diff with the tarfile 
backport we have in distutils2.

Tell me if you want me to commit.

----------
Added file: http://bugs.python.org/file24610/tarfile-misc-bugs-3.2-3.diff

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue14012>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to