msg167512 - (view) |
Author: Chris Jerdonek (chris.jerdonek) *  |
Date: 2012-08-05 19:51 |
This is an issue to update the subprocess module documentation after updates to io.TextIOWrapper's documentation here: http://hg.python.org/cpython/rev/f17a1410ebe5 This issue was discussed briefly on python-dev: http://mail.python.org/pipermail/python-dev/2012-August/121239.html Patch attached. |
|
|
msg167584 - (view) |
Author: Chris Jerdonek (chris.jerdonek) *  |
Date: 2012-08-06 21:17 |
Victor, would you be able to take a look at this minor documentation patch? It incorporates the change that you suggested we make on python-dev. |
|
|
msg167658 - (view) |
Author: Chris Jerdonek (chris.jerdonek) *  |
Date: 2012-08-08 04:30 |
io module experts: Can one of you review this minor change to the subprocess documentation to make it reference the newly added io.TextIOWrapper documentation changes? For background purposes, digging back, it looks like the original change to subprocess was made here: 9ce8fa0a0899 |
|
|
msg167790 - (view) |
Author: Chris Jerdonek (chris.jerdonek) *  |
Date: 2012-08-09 15:32 |
In the process of working on issue 15595, I noticed that the documentation change will need to be slightly different for Python 3.2 than for 3.3. In 3.2, it is locale.getpreferredencoding() (which defaults to do_setlocale=True) instead of locale.getpreferredencoding(False). I will provide a patch adjusted for 3.2. |
|
|
msg167791 - (view) |
Author: Andrew Svetlov (asvetlov) *  |
Date: 2012-08-09 15:35 |
Please do. |
|
|
msg167823 - (view) |
Author: Chris Jerdonek (chris.jerdonek) *  |
Date: 2012-08-09 19:38 |
I have uploaded updated patches for both 3.2 and the default branch. Thanks, Andrew. |
|
|
msg167976 - (view) |
Author: Andrew Svetlov (asvetlov) *  |
Date: 2012-08-11 15:47 |
Hmm. As I can see in subprocess.py TextIOWrapper is applied to stdin also in non-buffered (write_through=True) mode. So input will be converted to use '\n' as well. Can you reflect this fact in your patches? |
|
|
msg167992 - (view) |
Author: Chris Jerdonek (chris.jerdonek) *  |
Date: 2012-08-11 19:08 |
> Can you reflect this fact in your patches? Sure. (Though for stdin '\n' is converted to os.linesep and no more.) Would you mind if I also updated the following part of the subprocess documentation to reference the part we are updating, so that the documentation is just in one place? "If universal_newlines is True, the file objects stdout and stderr are opened as text files, but lines may be terminated by any of '\n', the Unix end-of-line convention, '\r', the old Macintosh convention or '\r\n', the Windows convention. All of these external representations are seen as '\n' by the Python program." The part we're updating is in the "Frequently Used Arguments" section and so seems like the natural place for expanded details. |
|
|
msg168081 - (view) |
Author: Andrew Svetlov (asvetlov) *  |
Date: 2012-08-13 12:04 |
Do you mean to mention stdin as well as stdout/stderr? It will be nice. |
|
|
msg168085 - (view) |
Author: Chris Jerdonek (chris.jerdonek) *  |
Date: 2012-08-13 12:15 |
Yes, that too. :) I am working on it. |
|
|
msg168094 - (view) |
Author: Chris Jerdonek (chris.jerdonek) *  |
Date: 2012-08-13 12:40 |
For 3.2 to mention write_through, issue 15638 should probably be fixed first. I can create a patch for that first. |
|
|
msg168106 - (view) |
Author: Chris Jerdonek (chris.jerdonek) *  |
Date: 2012-08-13 13:18 |
> As I can see in subprocess.py TextIOWrapper is applied to stdin also in non-buffered (write_through=True) mode. In 3.2, I will not mention the write_through argument based on Antoine's response to issue 15638. |
|
|
msg168119 - (view) |
Author: Chris Jerdonek (chris.jerdonek) *  |
Date: 2012-08-13 15:33 |
Andrew, here is the new patch for 3.2. 3.3 will come shortly after. |
|
|
msg168121 - (view) |
Author: Chris Jerdonek (chris.jerdonek) *  |
Date: 2012-08-13 15:39 |
Here is the patch for the default/3.3 branch, which for convenience is a diff for the branch *after the 3.2 patch has been forward-ported to 3.3*. I did not think it was necessary to mention write_through specifically since it seems more like an implementation detail (though stdin as a whole is now documented). |
|
|
msg168134 - (view) |
Author: Roundup Robot (python-dev)  |
Date: 2012-08-13 19:11 |
New changeset 381aaf79c254 by Andrew Svetlov in branch '3.2': Issue #15561: Update subprocess docs to reference io.TextIOWrapper. http://hg.python.org/cpython/rev/381aaf79c254 New changeset 0cd9423770fa by Andrew Svetlov in branch 'default': Issue #15561: Update subprocess docs to reference io.TextIOWrapper. http://hg.python.org/cpython/rev/0cd9423770fa |
|
|
msg168135 - (view) |
Author: Andrew Svetlov (asvetlov) *  |
Date: 2012-08-13 19:16 |
Fixed. BTW I prefer to use «stream» as alias to file object it subprocess context. «file» can clash with «the real file in filesystem» for documentation reader. |
|
|
msg168136 - (view) |
Author: Chris Jerdonek (chris.jerdonek) *  |
Date: 2012-08-13 19:19 |
> Fixed. BTW I prefer to use «stream» as alias to file object Thanks a lot, Andrew. Yes, I agree and actually contemplated doing that myself. |
|
|