You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
py3k: corrections for test_subprocess on windows #45388
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2007-11-09.01:36:47.516>created_at=<Date2007-08-28.22:33:09.520>labels= ['interpreter-core', 'OS-windows']
title='py3k: corrections for test_subprocess on windows'updated_at=<Date2007-11-09.01:36:47.491>user='https://github.com/amauryfa'
1/ getargs.diff adds the 'Z' and 'Z#' format specifiers for
PyArg_ParseTuple. They mimic z and z# for unicode strings, by accepting
a Unicode or None (in which case the Py_UNICODE* pointer is set to
NULL). With doc and tests.
2/ subprocess.diff converts file PC/_subprocess.c to unicode. We use the
Unicode version of the win32 api (and Z conversion from previous patch)
3/ stdout.diff: sys.stdout must not convert the line endings, Windows
already does it.
Without this patch, when redirecting the output of python, the file
contains \r\r\n for each line. (test_subprocess did catch this)
Committed revision 57669.
I have no way to test this so you'll have to watch the buildbot.
However, I didn't include the patch to _fileio.c that prevents closing
fds 0, 1, 2; I think that's the wrong thing to do and if it causes
problems it needs to be addressed in a different way.
Activity
amauryfa commentedon Aug 28, 2007
I join three patches for py3k on Windows:
1/ getargs.diff adds the 'Z' and 'Z#' format specifiers for
PyArg_ParseTuple. They mimic z and z# for unicode strings, by accepting
a Unicode or None (in which case the Py_UNICODE* pointer is set to
NULL). With doc and tests.
2/ subprocess.diff converts file PC/_subprocess.c to unicode. We use the
Unicode version of the win32 api (and Z conversion from previous patch)
3/ stdout.diff: sys.stdout must not convert the line endings, Windows
already does it.
Without this patch, when redirecting the output of python, the file
contains \r\r\n for each line. (test_subprocess did catch this)
amauryfa commentedon Aug 28, 2007
Did I say that test_subprocess now passes on windows?
gvanrossum commentedon Aug 29, 2007
Committed revision 57669.
I have no way to test this so you'll have to watch the buildbot.
However, I didn't include the patch to _fileio.c that prevents closing
fds 0, 1, 2; I think that's the wrong thing to do and if it causes
problems it needs to be addressed in a different way.
tiran commentedon Nov 9, 2007
The patch to _fileio was implemented in a different way and applied to
the py3k branch a while ago.