René's URL Explorer Experiment


Title: Soft deprecate os.spawn*(), os.popen() and os.system() functions · Issue #120743 · python/cpython · GitHub

Open Graph Title: Soft deprecate os.spawn*(), os.popen() and os.system() functions · Issue #120743 · python/cpython

X Title: Soft deprecate os.spawn*(), os.popen() and os.system() functions · Issue #120743 · python/cpython

Description: See the discussion for the rationale: Is time to remove os module spawn* functions? See also the discussion: How to deal with unsafe/broken os.spawn* arg handling behavior on Windows (Nov 2022). Advantages of the subprocess module: subpr...

Open Graph Description: See the discussion for the rationale: Is time to remove os module spawn* functions? See also the discussion: How to deal with unsafe/broken os.spawn* arg handling behavior on Windows (Nov 2022). Ad...

X Description: See the discussion for the rationale: Is time to remove os module spawn* functions? See also the discussion: How to deal with unsafe/broken os.spawn* arg handling behavior on Windows (Nov 2022). Ad...

Opengraph URL: https://github.com/python/cpython/issues/120743

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Soft deprecate os.spawn*(), os.popen() and os.system() functions","articleBody":"See the discussion for the rationale: [Is time to remove os module spawn* functions?](https://discuss.python.org/t/is-time-to-remove-os-module-spawn-functions/55829)\r\n\r\nSee also the discussion: [How to deal with unsafe/broken os.spawn* arg handling behavior on Windows](https://discuss.python.org/t/how-to-deal-with-unsafe-broken-os-spawn-arg-handling-behavior-on-windows/20829) (Nov 2022).\r\n\r\nAdvantages of the subprocess module:\r\n\r\n* subprocess restores the signal handlers (**reliable behavior**).\r\n* subprocess closes all file descriptors (**more secure**).\r\n* subprocess doesn't use a shell by default, `shell=True` must be used explicitly.\r\n* subprocess is the defacto standard way to spawn processes in Python.\r\n\r\nExamples of os functions issues:\r\n\r\n* os.popen() and os.system() always use `shell=True`, it cannot be disabled. (**higher risk of shell code injection**)\r\n* os.popen().close() return value depends on the platform. (**not portable**)\r\n* os.popen().close() return value is a \"wait status\", not an exit code: waitstatus_to_exitcode() must be used to get a return code.\r\n* There are 8 os.spawn*() functions, it's more **error prone** and harder to use than subprocess APIs.\r\n* os.spawn*() functions return an exit code 1 if the program is not found instead of raising an exception. It's harder to distinguish if the program exists and has an exit code of 1, or if it doesn't exist.\r\n* The os.spawn*() functions are not safe for use in multithreaded programs on POSIX systems as they use fork()+exec() from Python there.\r\n\r\n\u003c!-- gh-linked-prs -->\r\n### Linked PRs\r\n* gh-120744\r\n\u003c!-- /gh-linked-prs -->\r\n","author":{"url":"https://github.com/vstinner","@type":"Person","name":"vstinner"},"datePublished":"2024-06-19T13:37:23Z","url":"https://github.com/python/cpython/issues/120743"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:e260226b-0e37-4f6a-e7ad-b54c6217f9a2
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id9F76:27AD12:717220:976133:6B0039C6
html-safe-nonce79ddc414c920dc4139df4c716e8d6cd9b71a6f111384f47206afc29adecf1412
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5Rjc2OjI3QUQxMjo3MTcyMjA6OTc2MTMzOjZCMDAzOUM2IiwidmlzaXRvcl9pZCI6IjQ4OTM3OTY0MzczNDQ2NjQwMDYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmaced61414642e60eb7115e6479a12f4328a1afacb3afd028fc15e4bf29c4e15a56
hovercard-subject-tagissue:2362413100
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/120743/issue_layout
twitter:imagehttps://opengraph.githubassets.com/e6999d01f8354e7cda9837d821ed4dfa455a60c0dc5999cd80e1485d27857d49/python/cpython/issues/120743
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/e6999d01f8354e7cda9837d821ed4dfa455a60c0dc5999cd80e1485d27857d49/python/cpython/issues/120743
og:image:altSee the discussion for the rationale: Is time to remove os module spawn* functions? See also the discussion: How to deal with unsafe/broken os.spawn* arg handling behavior on Windows (Nov 2022). Ad...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamevstinner
hostnamegithub.com
expected-hostnamegithub.com
None7d0829bbde9e48b2486cb5dd6d147896eb01d32134627091f818958a935ef3f0
turbo-cache-controlno-preview
go-importgithub.com/python/cpython git https://github.com/python/cpython.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id81598961
octolytics-dimension-repository_nwopython/cpython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id81598961
octolytics-dimension-repository_network_root_nwopython/cpython
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasef3f3a43ca095cdea3abbb394112e971f9fdb94fa
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/python/cpython/issues/120743#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F120743
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F120743
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/issues/120743
Reloadhttps://github.com/python/cpython/issues/120743
Reloadhttps://github.com/python/cpython/issues/120743
pythonhttps://github.com/python
cpythonhttps://github.com/python/cpython
Codehttps://github.com/python/cpython
Issues5k+ (5k+)https://github.com/python/cpython/issues
Pull requests2.4k (2.4k)https://github.com/python/cpython/pulls
Actionshttps://github.com/python/cpython/actions
Projectshttps://github.com/python/cpython/projects
Security and qualityhttps://github.com/python/cpython/security
Insightshttps://github.com/python/cpython/insights
https://github.com/python/cpython
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/120743
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/120743
Soft deprecate os.spawn*(), os.popen() and os.system() functionshttps://github.com/python/cpython/issues/120743#top
https://github.com/vstinner
vstinnerhttps://github.com/vstinner
on Jun 19, 2024https://github.com/python/cpython/issues/120743#issue-2362413100
Is time to remove os module spawn* functions?https://discuss.python.org/t/is-time-to-remove-os-module-spawn-functions/55829
How to deal with unsafe/broken os.spawn* arg handling behavior on Windowshttps://discuss.python.org/t/how-to-deal-with-unsafe-broken-os-spawn-arg-handling-behavior-on-windows/20829
gh-120743: Soft deprecate os.popen() function #120744https://github.com/python/cpython/pull/120744
https://github.com/vstinner
vstinnerhttps://github.com/vstinner
on Jun 19, 2024https://github.com/python/cpython/issues/120743#issuecomment-2178779905
Deprecate os.popen() functionhttps://github.com/python/cpython/issues/86807
test_os fails on Windows if current directory contains spaceshttps://github.com/python/cpython/issues/75729
marking os.system() as deprecated in the docshttps://mail.python.org/archives/list/python-dev@python.org/thread/5U53DSEKLI2CSDQJCPNN6OXWTPMGWNZO/
os.popen documentation is probably wronghttps://github.com/python/cpython/issues/50739
vstinnerhttps://github.com/vstinner
on Jun 19, 2024https://github.com/python/cpython/issues/120743#event-13216990461
pythongh-120743: Soft deprecate os.popen() functionhttps://github.com/vstinner/cpython/commit/916a28cd9a229db708542ec878a2e924bc351f14
pythongh-120743https://github.com/python/cpython/issues/120743
916a28chttps://github.com/vstinner/cpython/commit/916a28cd9a229db708542ec878a2e924bc351f14
https://github.com/vstinner
vstinnerhttps://github.com/vstinner
on Jun 19, 2024https://github.com/python/cpython/issues/120743#issuecomment-2178792061
https://docs.python.org/dev/glossary.html#term-soft-deprecatedhttps://docs.python.org/dev/glossary.html#term-soft-deprecated
https://github.com/gpshead
gpsheadhttps://github.com/gpshead
on Jun 24, 2024https://github.com/python/cpython/issues/120743#issuecomment-2186874061
https://github.com/adorilson
adorilsonhttps://github.com/adorilson
on Jun 25, 2024https://github.com/python/cpython/issues/120743#issuecomment-2189937432
https://private-user-images.githubusercontent.com/169837/342917477-92f53a91-f01d-421d-812f-2438d7e0e925.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3OTUxNzcyMDMsIm5iZiI6MTc5NTE3NjkwMywicGF0aCI6Ii8xNjk4MzcvMzQyOTE3NDc3LTkyZjUzYTkxLWYwMWQtNDIxZC04MTJmLTI0MzhkN2UwZTkyNS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYxMTIwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MTEyMFQxMjE1MDNaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT04ZjA4OWQ1M2Q0ZWU2NGQ5MWNiYWU5NTVkMzJlMjJmNGIyM2VlMGIzYmVlMmRlMWFiMDg4OTllZTZiYTY2ZDAyJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZyZXNwb25zZS1jb250ZW50LXR5cGU9aW1hZ2UlMkZwbmcifQ.JOwCGAqiQbi_yd1gj2H9CVq8rpyqSmf90tYxTeXkrXA
vstinnerhttps://github.com/vstinner
on Jul 1, 2024https://github.com/python/cpython/issues/120743#event-13353920993
gh-120743: Soft deprecate os.popen() function (#120744)https://github.com/python/cpython/commit/d44c550f7ebee7d33785142e6031a4621cf21573
gh-120743https://github.com/python/cpython/issues/120743
#120744https://github.com/python/cpython/pull/120744
d44c550https://github.com/python/cpython/commit/d44c550f7ebee7d33785142e6031a4621cf21573
https://github.com/vstinner
vstinnerhttps://github.com/vstinner
on Jul 1, 2024https://github.com/python/cpython/issues/120743#issuecomment-2200584764
d44c550https://github.com/python/cpython/commit/d44c550f7ebee7d33785142e6031a4621cf21573
vstinnerhttps://github.com/vstinner
completedhttps://github.com/python/cpython/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Jul 1, 2024https://github.com/python/cpython/issues/120743#event-13353939591
https://github.com/vstinner
vstinnerhttps://github.com/vstinner
on Jul 1, 2024https://github.com/python/cpython/issues/120743#issuecomment-2200586078
https://github.com/eryksun
eryksunhttps://github.com/eryksun
on Jul 1, 2024https://github.com/python/cpython/issues/120743#issuecomment-2200643107
https://github.com/vstinner
vstinnerhttps://github.com/vstinner
on Jul 1, 2024https://github.com/python/cpython/issues/120743#issuecomment-2200845228
https://docs.python.org/dev/library/subprocess.html#subprocess.STARTUPINFO.lpAttributeListhttps://docs.python.org/dev/library/subprocess.html#subprocess.STARTUPINFO.lpAttributeList
https://github.com/eryksun
eryksunhttps://github.com/eryksun
on Jul 1, 2024https://github.com/python/cpython/issues/120743#issuecomment-2200973715
https://docs.python.org/dev/library/subprocess.html#subprocess.STARTUPINFO.lpAttributeListhttps://docs.python.org/dev/library/subprocess.html#subprocess.STARTUPINFO.lpAttributeList
Akasurdehttps://github.com/Akasurde
on Jul 3, 2024https://github.com/python/cpython/issues/120743#event-13373165457
pythongh-120743: Soft deprecate os.popen() function (python#120744)https://github.com/Akasurde/cpython/commit/42ea99b7e6e74d35f2f363ad27f72d9a055956ac
pythongh-120743https://github.com/python/cpython/issues/120743
python#120744https://github.com/python/cpython/pull/120744
42ea99bhttps://github.com/Akasurde/cpython/commit/42ea99b7e6e74d35f2f363ad27f72d9a055956ac
estyxxhttps://github.com/estyxx
on Jul 17, 2024https://github.com/python/cpython/issues/120743#event-13533268314
pythongh-120743: Soft deprecate os.popen() function (python#120744)https://github.com/estyxx/cpython/commit/154edd147f889a7111da510e3fb1446aa29b9050
pythongh-120743https://github.com/python/cpython/issues/120743
python#120744https://github.com/python/cpython/pull/120744
154edd1https://github.com/estyxx/cpython/commit/154edd147f889a7111da510e3fb1446aa29b9050
Sign up for freehttps://github.com/signup?return_to=https://github.com/python/cpython/issues/120743
Sign in to commenthttps://github.com/login?return_to=https://github.com/python/cpython/issues/120743
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.