[issue15247] io.open() is inconsistent re os.open()

2012-07-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thanks, the issue should be fixed now. -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker

[issue15247] io.open() is inconsistent re os.open()

2012-07-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9cf9527358a5 by Antoine Pitrou in branch '3.2': Issue #15247: FileIO now raises an error when given a file descriptor pointing to a directory. http://hg.python.org/cpython/rev/9cf9527358a5 New changeset 19bd61ed3b3b by Antoine Pitrou in branch 'de

[issue15247] io.open() is inconsistent re os.open()

2012-07-06 Thread Dave King
Changes by Dave King : -- nosy: +davbo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/m

[issue15247] io.open() is inconsistent re os.open()

2012-07-04 Thread Juancarlo Añez
Juancarlo Añez added the comment: Note that attempting subsequent operations on the returned object do raise IsADirectoryError. >>> import io >>> import os >>> d = io.open(os.open('.',0)) >>> d.read() Traceback (most recent call last): File "", line 1, in IsADirectoryError: [Errno 21] Is a

[issue15247] io.open() is inconsistent re os.open()

2012-07-04 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue15247] io.open() is inconsistent re os.open()

2012-07-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: Good catch indeed. -- components: +IO nosy: +pitrou stage: -> needs patch versions: +Python 3.2 ___ Python tracker ___ ___

[issue15247] io.open() is inconsistent re os.open()

2012-07-03 Thread Juancarlo Añez
Juancarlo Añez added the comment: io.open() clearly doesn't care about opening directories as long as they are passed as os.open() file descriptors. Quite unexpected! -- ___ Python tracker ___

[issue15247] io.open() is inconsistent re os.open()

2012-07-03 Thread Juancarlo Añez
New submission from Juancarlo Añez : >>> import io >>> d = io.open('.') Traceback (most recent call last): File "", line 1, in IsADirectoryError: [Errno 21] Is a directory: '.' >>> >>> import os >>> d = io.open(os.open('.',0)) >>> d <_io.TextIOWrapper name=3 mode='r' encoding='UTF-8'> >>> -