On 8 September 2016 at 03:37, Guido van Rossum <gu...@python.org> wrote: > On Sun, Sep 4, 2016 at 11:58 PM, Nick Coghlan <ncogh...@gmail.com> wrote: >> While calling system native apps that way will still have many >> portability challenges, there are also plenty of cases where folks use >> sys.executable to launch new Python processes in a separate instance >> of the currently running interpreter, and it would be good if these >> changes brought cross-platform consistency to the handling of binary >> arguments here as well. > > I checked with Steve and this is not supported anyway -- bytes > arguments (regardless of the value of shell) fail early with a > TypeError. That may be a bug but there's no backwards compatibility to > preserve here. (And apart from Python, few shell commands that work on > Unix make much sense on Windows, so Im also not particularly worried > about that particular example being non-portable -- it doesn't > represent a realistic concern.)
Cool, I suspected "That already doesn't work, so you just have to use strings for cross-platform compatibility in those cases" would be the answer, and I think that's a sensible way to go. Even on *nix passing bytes arguments to subprocess is unusual, since anyone with Python 2 based habits will omit the "b" prefix from literals, and anything coming from the command line, environment, or other user input is supplied as text by default. Cheers, Nick. -- Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com