-
-
Notifications
You must be signed in to change notification settings - Fork 32k
bpo-31904: disable os.popen and impacted test cases on VxWorks #21687
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
bcc5ef8
to
e37c536
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this change a temporary workaround until subprocess is fixed on VxWorks, or is this skip supposed to be a temporary workaround?
If it's a temporary workaround, I am not sure if it's a good idea to document the skip.
Lib/os.py
Outdated
"popen", "extsep"] | ||
"extsep"] | ||
|
||
VXWORKS = (sys.platform == 'vxworks') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This variable is only at a single place: you can remove it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed.
Lib/os.py
Outdated
return None | ||
if name == 'nt': | ||
return returncode | ||
if not VXWORKS: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest: if sys.platform != 'vxworks':
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed accordingly.
os.popen() runs cmd in shell, i.e. shell=True was set when calling subprocess.Popen(). VxWorks has no user space shell provided so that we can't create a new shell and run commands inside. For the subprocess module, VxWorks can't support features needing shell to run. So when I created this PR, I don't intend to be a temporary workaround. |
Co-authored-by: Victor Stinner <[email protected]>
Merged, thanks. |
VxWorks has no user space shell provided so it can't support os.popen(). Disable it on VxWorks and impacted test cases.
https://bugs.python.org/issue41442