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.
Created on 2014年06月24日 11:06 by serhiy.storchaka, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| pyio_fileio.patch | serhiy.storchaka, 2014年06月24日 11:06 | review | ||
| pyio_fileio_2.patch | serhiy.storchaka, 2014年07月04日 18:33 | review | ||
| pyio_fileio_3.patch | serhiy.storchaka, 2014年07月05日 20:27 | review | ||
| pyio_fileio_4.patch | serhiy.storchaka, 2014年07月22日 11:30 | review | ||
| pyio_fileio_5.patch | serhiy.storchaka, 2014年07月31日 20:54 | review | ||
| pyio_fileio_6.patch | serhiy.storchaka, 2014年10月02日 16:32 | review | ||
| pyio_fileio_7.patch | serhiy.storchaka, 2015年03月23日 10:28 | review | ||
| pyio_fileio_8.patch | serhiy.storchaka, 2015年03月23日 12:34 | review | ||
| pyio_fileio_9.patch | serhiy.storchaka, 2015年04月09日 23:44 | review | ||
| pyio_fileio_10.patch | serhiy.storchaka, 2015年04月10日 11:36 | review | ||
| pyio_fileio_fix.patch | serhiy.storchaka, 2015年04月10日 16:01 | review | ||
| Messages (21) | |||
|---|---|---|---|
| msg221449 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2014年06月24日 11:06 | |
Proposed patch adds Python implementation of FileIO in _pyio. This will help to make io and _pyio dependency on _io optional (issue17984). |
|||
| msg222303 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2014年07月04日 18:33 | |
Updated patch has included recent changes from C implementation (issue21679 and issue21090). |
|||
| msg222375 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2014年07月05日 20:27 | |
Many thanks Victor for your review. Updated patch addresses your comments. It also fixes debugging remnants in test_file_eintr. |
|||
| msg223659 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2014年07月22日 11:30 | |
Next iteration of the patch addressed Victor's comments. |
|||
| msg224446 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2014年07月31日 20:53 | |
Next iteration of the patch addressed Victor's and Akira's comments. |
|||
| msg228240 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2014年10月02日 16:32 | |
Synchronized with the tip. _io.FileIO now behave same as _pyio,FileIO when there is a NUL in name. |
|||
| msg239004 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2015年03月23日 10:28 | |
Updated to the tip (added the closefd attribute in repr). os.fstat() is now called only once in the constructor. |
|||
| msg239012 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2015年03月23日 12:34 | |
Restored first os.fstat() (however it now is redundant) and addressed most other Victor's comments. In general I prefer EAFP over BDFL, and often "except AttributeError" looks better to me than getattr(). |
|||
| msg239046 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2015年03月23日 16:51 | |
I opened the issue #23752: "Cleanup io.FileIO". |
|||
| msg239071 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2015年03月23日 21:19 | |
New issue #23754: "Add a new os.read_into() function to avoid memory copies". |
|||
| msg240390 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2015年04月09日 21:03 | |
What's the status of the patch? Is it ready to be commited? |
|||
| msg240402 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2015年04月09日 23:44 | |
Removed redundant fstat() call (as in issue23752). Slightly corrected docstrings (but for larger changes C and Python implementations should be changed consistently). I wait only for your approval Victor. |
|||
| msg240412 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2015年04月10日 07:52 | |
> Slightly corrected docstrings (but for larger changes C and Python implementations should be changed consistently). I reviewed pyio_fileio_9.patch. The main issue is that I don't understand how self._fd is set to None. In the C implemented, it's set to -1 even if closefd is False. For comments on docstrings which also concern the C code, can you maybe open a new issue with a reference to this issue or maybe even a link to my review, if you don't want to modify them in this issue? |
|||
| msg240415 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2015年04月10日 11:36 | |
Updated patch addresses Victor's and Berker's comments. |
|||
| msg240416 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2015年04月10日 12:21 | |
pyio_fileio_10.patch looks good to me. Great job. |
|||
| msg240420 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2015年04月10日 13:26 | |
Thank you for your review Victor and others. |
|||
| msg240421 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2015年04月10日 13:27 | |
New changeset 0db36098b908 by Serhiy Storchaka in branch '2.7': Issue #21859: Corrected FileIO docstrings. https://hg.python.org/cpython/rev/0db36098b908 New changeset d080f5ecdcd3 by Serhiy Storchaka in branch '3.4': Issue #21859: Corrected FileIO docstrings. https://hg.python.org/cpython/rev/d080f5ecdcd3 New changeset 330910697e23 by Serhiy Storchaka in branch 'default': Issue #21859: Corrected FileIO docstrings. https://hg.python.org/cpython/rev/330910697e23 New changeset 9ef5765d56b7 by Serhiy Storchaka in branch 'default': Issue #21859: Added Python implementation of io.FileIO. https://hg.python.org/cpython/rev/9ef5765d56b7 |
|||
| msg240429 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2015年04月10日 16:01 | |
There are test failures on Windows: http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/6073/steps/test/logs/stdio 1. ValueError is not raised if file name contains a null character. 2. os.ftruncate doesn't exist on Windows. Here is a patch that adds explicit check for null character and skips tests with not implemented truncate. |
|||
| msg240430 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2015年04月10日 16:14 | |
> 2. os.ftruncate doesn't exist on Windows. Steve Dower wrote a patch and the latest version looks good to me: https://bugs.python.org/issue23668#msg240385 + if 0 in os.fsencode(file): + raise ValueError('embedded null character') IMO the check must be implemented in os.open() (in path_converter). It doesn't look right to have a differen behaviour on UNIX and Windows. path_converter() calls PyUnicode_FSConverter() on UNIX and this function checks for embedded null bytes. So I would prefer to see the issue #23668 fixed and path_converter() fixed, instead of pushing pyio_fileio_fix.patch. |
|||
| msg240437 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2015年04月10日 16:46 | |
Opened issue23908 for null characters in paths. |
|||
| msg242961 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2015年05月12日 11:06 | |
Both issues are fixed. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:05 | admin | set | github: 66058 |
| 2015年05月12日 11:06:09 | serhiy.storchaka | set | status: open -> closed messages: + msg242961 assignee: serhiy.storchaka dependencies: - Check path arguments of os functions for null character resolution: fixed stage: patch review -> resolved |
| 2015年04月10日 22:19:29 | martin.panter | set | nosy:
+ martin.panter |
| 2015年04月10日 16:46:33 | serhiy.storchaka | set | messages: + msg240437 |
| 2015年04月10日 16:44:48 | serhiy.storchaka | set | dependencies: + Support os.ftruncate on Windows, Check path arguments of os functions for null character |
| 2015年04月10日 16:14:25 | vstinner | set | messages: + msg240430 |
| 2015年04月10日 16:01:24 | serhiy.storchaka | set | status: closed -> open files: + pyio_fileio_fix.patch messages: + msg240429 resolution: fixed -> (no value) stage: resolved -> patch review |
| 2015年04月10日 13:27:25 | python-dev | set | nosy:
+ python-dev messages: + msg240421 |
| 2015年04月10日 13:26:50 | serhiy.storchaka | set | status: open -> closed resolution: fixed messages: + msg240420 stage: patch review -> resolved |
| 2015年04月10日 12:21:25 | vstinner | set | messages: + msg240416 |
| 2015年04月10日 11:36:41 | serhiy.storchaka | set | files:
+ pyio_fileio_10.patch messages: + msg240415 |
| 2015年04月10日 07:52:08 | vstinner | set | messages: + msg240412 |
| 2015年04月09日 23:44:31 | serhiy.storchaka | set | files:
+ pyio_fileio_9.patch messages: + msg240402 |
| 2015年04月09日 21:03:09 | vstinner | set | messages: + msg240390 |
| 2015年03月23日 21:19:17 | vstinner | set | messages: + msg239071 |
| 2015年03月23日 16:51:21 | vstinner | set | messages: + msg239046 |
| 2015年03月23日 14:57:37 | hynek | set | nosy:
- hynek |
| 2015年03月23日 12:34:41 | serhiy.storchaka | set | files:
+ pyio_fileio_8.patch messages: + msg239012 |
| 2015年03月23日 10:28:28 | serhiy.storchaka | set | files:
+ pyio_fileio_7.patch messages: + msg239004 |
| 2014年10月02日 16:32:41 | serhiy.storchaka | set | files:
+ pyio_fileio_6.patch messages: + msg228240 |
| 2014年07月31日 20:54:33 | serhiy.storchaka | set | files: + pyio_fileio_5.patch |
| 2014年07月31日 20:53:48 | serhiy.storchaka | set | messages: + msg224446 |
| 2014年07月22日 11:30:54 | serhiy.storchaka | set | files:
+ pyio_fileio_4.patch messages: + msg223659 |
| 2014年07月10日 12:53:05 | piotr.dobrogost | set | nosy:
+ piotr.dobrogost |
| 2014年07月10日 12:50:20 | vstinner | set | nosy:
+ vstinner |
| 2014年07月05日 20:27:34 | serhiy.storchaka | set | files:
+ pyio_fileio_3.patch messages: + msg222375 |
| 2014年07月04日 18:33:47 | serhiy.storchaka | set | files:
+ pyio_fileio_2.patch messages: + msg222303 |
| 2014年06月24日 11:06:53 | serhiy.storchaka | create | |