[issue28164] _PyIO_get_console_type fails for various paths

2017-03-31 Thread Donald Stufft
Changes by Donald Stufft : -- pull_requests: +865 ___ Python tracker ___ ___

[issue28164] _PyIO_get_console_type fails for various paths

2017-02-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset c6c32889c9d80ffd599a57fd0d4c4a88deece29b by Steve Dower in branch '3.6': Issue #28164: Improves test on Windows 7 https://github.com/python/cpython/commit/c6c32889c9d80ffd599a57fd0d4c4a88deece29b --

[issue28164] _PyIO_get_console_type fails for various paths

2017-02-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset c6c32889c9d80ffd599a57fd0d4c4a88deece29b by Steve Dower in branch 'master': Issue #28164: Improves test on Windows 7 https://github.com/python/cpython/commit/c6c32889c9d80ffd599a57fd0d4c4a88deece29b New changeset

[issue28164] _PyIO_get_console_type fails for various paths

2017-02-06 Thread Steve Dower
Steve Dower added the comment: That test looks good for me, and I verified it on both Win7 and Win10. (Hopefully we don't have any Win8.1 edge cases in here...) -- status: open -> closed ___ Python tracker

[issue28164] _PyIO_get_console_type fails for various paths

2017-02-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4463e311f5bd by Steve Dower in branch '3.6': Issue #28164: Improves test on Windows 7 https://hg.python.org/cpython/rev/4463e311f5bd New changeset 8132bcc1522d by Steve Dower in branch 'default': Issue #28164: Improves test on Windows 7

[issue28164] _PyIO_get_console_type fails for various paths

2017-02-05 Thread Eryk Sun
Eryk Sun added the comment: It's an ugly inconsistency that GetFullPathName fails for bare CONIN$ and CONOUT$ prior to Windows 8, in that it gives a different result from simply passing those names to CreateFile. Anyway, thanks for modifying it to work correctly in this case. We should test

[issue28164] _PyIO_get_console_type fails for various paths

2017-02-04 Thread Steve Dower
Steve Dower added the comment: Okay, seems like Windows 7 GetFullPathName on conin$ and conout$ returns the path appended to the current directory, and you need to specify the full name as "conin$" or "conout$" to access the console - otherwise you have a file by that name. We should include

[issue28164] _PyIO_get_console_type fails for various paths

2017-02-04 Thread Steve Dower
Steve Dower added the comment: Looks like the "need to check Win7" part was actually important... there are buildbot failures from this. I *think* they only require test handling updates. -- ___ Python tracker

[issue28164] _PyIO_get_console_type fails for various paths

2017-02-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset 164fc49825081694c9c44c4a17c75b30c5ba8f51 by Steve Dower in branch '3.6': Issue #28164: Correctly handle special console filenames (patch by Eryk Sun) https://github.com/python/cpython/commit/164fc49825081694c9c44c4a17c75b30c5ba8f51 --

[issue28164] _PyIO_get_console_type fails for various paths

2017-02-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset 164fc49825081694c9c44c4a17c75b30c5ba8f51 by Steve Dower in branch 'master': Issue #28164: Correctly handle special console filenames (patch by Eryk Sun) https://github.com/python/cpython/commit/164fc49825081694c9c44c4a17c75b30c5ba8f51 New

[issue28164] _PyIO_get_console_type fails for various paths

2017-02-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset ed0c05c739c9 by Steve Dower in branch '3.6': Issue #28164: Correctly handle special console filenames (patch by Eryk Sun) https://hg.python.org/cpython/rev/ed0c05c739c9 New changeset a5538734cc87 by Steve Dower in branch 'default': Merge issue

[issue28164] _PyIO_get_console_type fails for various paths

2017-01-31 Thread Eryk Sun
Changes by Eryk Sun : Added file: http://bugs.python.org/file46463/issue_28164_02.patch ___ Python tracker ___

[issue28164] _PyIO_get_console_type fails for various paths

2017-01-31 Thread Eryk Sun
Changes by Eryk Sun : Removed file: http://bugs.python.org/file46462/issue_28164_02.patch ___ Python tracker ___

[issue28164] _PyIO_get_console_type fails for various paths

2017-01-31 Thread Eryk Sun
Eryk Sun added the comment: I added some tests to ensure open() returns an instance of _WindowsConsoleIO for a few console paths. It also checks that opening a non-console file raises a ValueError, both for a path and an fd, as well for a negative file descriptor. -- Added file:

[issue28164] _PyIO_get_console_type fails for various paths

2017-01-30 Thread Steve Dower
Steve Dower added the comment: I'm okay with this patch. We move closer to being right without degrading the normal case, and I don't think the edge cases are important (and the behavior in those cases will be acceptable). With a couple of tests to make sure the path comparisons don't get

[issue28164] _PyIO_get_console_type fails for various paths

2017-01-30 Thread Eryk Sun
Eryk Sun added the comment: I had reopened this issue with a suggestion for expanding the supported paths in msg276864, but it's languished for a while now. I've attached a patch implementing the change to _PyIO_get_console_type that I had suggested. Here are some example paths that this

[issue28164] _PyIO_get_console_type fails for various paths

2016-09-17 Thread Eryk Sun
Eryk Sun added the comment: > check that a handle is actually a real console handle or > what type it is Did you mean a path here? Certainly you can check a handle, but that means opening the path twice. You can use GetFullPathName to classify the path, and then use GetFullPathName again

[issue28164] _PyIO_get_console_type fails for various paths

2016-09-17 Thread Steve Dower
Changes by Steve Dower : -- resolution: -> fixed stage: test needed -> resolved status: open -> closed ___ Python tracker ___

[issue28164] _PyIO_get_console_type fails for various paths

2016-09-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset d0bab9fda568 by Steve Dower in branch '3.6': Issue #28161: Opening CON for write access fails https://hg.python.org/cpython/rev/d0bab9fda568 New changeset 187a114b9ef4 by Steve Dower in branch 'default': Issue #28161: Opening CON for write access

[issue28164] _PyIO_get_console_type fails for various paths

2016-09-17 Thread Steve Dower
Steve Dower added the comment: I'll make it case insensitive, but unfortunately I can't find a good way to check that a handle is actually a real console handle or what type it is. Plus the way iomodule is designed we'd need to open it twice, which I'd rather not do. -- assignee: ->

[issue28164] _PyIO_get_console_type fails for various paths

2016-09-14 Thread Eryk Sun
New submission from Eryk Sun: _PyIO_get_console_type currently hard codes the names "CON", "CONIN$", and "CONOUT$" and doesn't use a case-insensitive comparison. For example, opening "conin$" doesn't get directed to WindowsConsoleIO: >>> open('conin$', 'rb', buffering=0) <_io.FileIO