Skip to content

os.system was never soft deprecated - #16421

Merged
AlexWaygood merged 1 commit into
python:mainfrom
hugovk:dedeprecate-os.system
Sep 21, 2026
Merged

AlexWaygood merged 1 commit into
python:mainfrom
hugovk:dedeprecate-os.system

Conversation

@hugovk

@hugovk hugovk commented Sep 21, 2026

Copy link
Copy Markdown
Member

Follow on from #15179.

os.system was proposed to be soft deprecated (with some os methods) in a CPython issue and PR, but during the PR discussion, os.system was dropped from the PR.

See python/cpython#157882 for history.

@github-actions

Copy link
Copy Markdown
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@AlexWaygood AlexWaygood left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, thanks! I guess we looked at the PR title of that CPython change (which still mentions os.system()) but didn't look carefully enough at the actual diff

@AlexWaygood

Copy link
Copy Markdown
Member

the actual docs change in that CPython PR does still harden the language around os.system() a little bit -- it now says that it's "recommended" to use the subprocess module instead. But I agree that that's probably a bit too weak to motivate marking it as deprecated in the stubs.

@AlexWaygood
AlexWaygood merged commit a65dab4 into python:main Sep 21, 2026
88 checks passed
@hugovk
hugovk deleted the dedeprecate-os.system branch September 21, 2026 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants