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
the documentation for the os module does not report on the deprecation of os.system, it is documented at the subprocess module and reported by type checkers.
The docs describe os.system as soft-deprecated in prose, but it is not formally marked as soft deprecated.
#120743 proposed to soft deprecate os.spawn*(), os.popen() and os.system(), but the PR dropped os.system and only did the other two: #120744 (comment).
the documentation for the os module does not report on the deprecation of os.system, it is documented at the subprocess module and reported by type checkers.
I don't see any mention of soft deprecation at the subprocess module?
Which type checkers are reporting it as soft deprecated? Sounds like a bug report for them.
I think it would be a shame to deprecate (and hence, likely eventually remove) os.system. Python is a great language for quick and dirty scripting, and for those use cases, a simple "just run the command" thing is great.
Don't worry! There was no suggestion to do a normal deprecation or remove os.system, that would be far too disruptive.
The proposal was to "soft deprecate", which means we would have recommended something else in the docs, but not plan to remove, and not issue any deprecation warnings.
Activity
gvanrossum commentedon Sep 21, 2026
I would regret for os.system() to be deprecated. I would be happy for it to be implemented on top of subprocess. Ditto for os.popen().
picnixz commentedon Sep 21, 2026
Those functions are not meant to be deprecated but carefully used.
hugovk commentedon Sep 21, 2026
#120743 proposed to soft deprecate
os.spawn*(),os.popen()andos.system(), but the PR droppedos.systemand only did the other two: #120744 (comment).I don't see any mention of soft deprecation at the
subprocessmodule?Which type checkers are reporting it as soft deprecated? Sounds like a bug report for them.
nedbat commentedon Sep 21, 2026
I wouldn't blame the type checkers. Typeshed has:
hugovk commentedon Sep 21, 2026
Added in python/typeshed#15179, which referenced the PR I mentioned above: #120744.
Confusion possibly triggered by the PR that mentioned
os.systemin the description, and in its issue title.I've opened python/typeshed#16421 to fix Typeshed.
Akuli commentedon Sep 21, 2026
I think it would be a shame to deprecate (and hence, likely eventually remove)
os.system. Python is a great language for quick and dirty scripting, and for those use cases, a simple "just run the command" thing is great.hugovk commentedon Sep 21, 2026
Don't worry! There was no suggestion to do a normal deprecation or remove
os.system, that would be far too disruptive.The proposal was to "soft deprecate", which means we would have recommended something else in the docs, but not plan to remove, and not issue any deprecation warnings.