Author glukhov.k
Recipients glukhov.k, paul.moore, steve.dower, tim.golden, zach.ware
Date 2021-07-06.16:21:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Starting with version 3.9.5 platform.win32* functions have been re-written and consume STDIN. The bug comes down to running 'ver', 'command /c ver', 'cmd /c ver' in platform._syscmd_ver() via subprocess.check_output().

The following code demonstrate the problem:

Python\396\python -c "import platform as p, sys;print(sys.stdin.tell());p.win32_ver();print(sys.stdin.tell())" < file

All functions dependent on platform._syscmd_ver(), including platform.uname(), consume STDIN.

This behavior breaks all the scripts on Windows platform that have the calls mentioned above and use the following invocation:

python < file
Date User Action Args
2021-07-06 16:21:17glukhov.ksetrecipients: + glukhov.k, paul.moore, tim.golden, zach.ware, steve.dower
2021-07-06 16:21:17glukhov.ksetmessageid: <>
2021-07-06 16:21:17glukhov.klinkissue44572 messages
2021-07-06 16:21:17glukhov.kcreate