René's URL Explorer Experiment


Title: gh-149819: fix .pth and .start file processing in subprocess when inheriting PYTHONPATH by warsaw · Pull Request #150177 · python/cpython · GitHub

Open Graph Title: gh-149819: fix .pth and .start file processing in subprocess when inheriting PYTHONPATH by warsaw · Pull Request #150177 · python/cpython

X Title: gh-149819: fix .pth and .start file processing in subprocess when inheriting PYTHONPATH by warsaw · Pull Request #150177 · python/cpython

Description: The Python programming language. Contribute to python/cpython development by creating an account on GitHub.

Open Graph Description: Followup to #149888 and #149819 - Fix by @IntentBug in the original PR, with test cases and review by @warsaw Issue: New site.py implementation fails to load .pth files in subprocesses #149819

X Description: Followup to #149888 and #149819 - Fix by @IntentBug in the original PR, with test cases and review by @warsaw Issue: New site.py implementation fails to load .pth files in subprocesses #149819

Opengraph URL: https://github.com/python/cpython/pull/150177

X: @github

direct link

Domain: github.com

route-pattern/_view_fragments/voltron/pull_requests/show/:user_id/:repository/:id/pull_request_layout(.:format)
route-controllervoltron_pull_requests_fragments
route-actionpull_request_layout
fetch-noncev2:a0ff041a-197e-b64f-8492-e5694595bfbd
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idD4FC:E786A:30951C:43D6F4:6A57B758
html-safe-noncebdc25e426c683c3be336189f5905aed083340faedb0a67903232af19b9c97286
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENEZDOkU3ODZBOjMwOTUxQzo0M0Q2RjQ6NkE1N0I3NTgiLCJ2aXNpdG9yX2lkIjoiNzE2NTI1NTMzNDIzOTkwOTcyMCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac6231fbb24b4da0b693488453ea357501b4ea366bbb37390b8e73cee074ffbc40
hovercard-subject-tagpull_request:3721299750
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/pull_requests_fragments/pull_request_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/voltron/pull_requests/show/python/cpython/150177/pull_request_layout
twitter:imagehttps://opengraph.githubassets.com/01135995c8246711158d9d6bc8491e8c54fb926a808808c4ea559bf4cc50e19e/python/cpython/pull/150177
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/01135995c8246711158d9d6bc8491e8c54fb926a808808c4ea559bf4cc50e19e/python/cpython/pull/150177
og:image:altFollowup to #149888 and #149819 - Fix by @IntentBug in the original PR, with test cases and review by @warsaw Issue: New site.py implementation fails to load .pth files in subprocesses #149819
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamewarsaw
hostnamegithub.com
expected-hostnamegithub.com
None899c314dfde9abcf8fc1fe8c04f09866b347ea06f43166d653afc482795c9fca
turbo-cache-controlno-cache
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
release67aa73f3bba9e68b2de0ebe01c65fcd120461cba
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/150177#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F150177
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
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
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://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
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F150177
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fpull_requests_fragments%2Fpull_request_layout&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/pull/150177
Reloadhttps://github.com/python/cpython/pull/150177
Reloadhttps://github.com/python/cpython/pull/150177
Please reload this pagehttps://github.com/python/cpython/pull/150177
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/150177
Notifications https://github.com/login?return_to=%2Fpython%2Fcpython
Fork 35k https://github.com/login?return_to=%2Fpython%2Fcpython
Star 73.8k https://github.com/login?return_to=%2Fpython%2Fcpython
Code https://github.com/python/cpython
Issues 5k+ https://github.com/python/cpython/issues
Pull requests 2.3k https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects https://github.com/python/cpython/projects
Security and quality 0 https://github.com/python/cpython/security
Insights https://github.com/python/cpython/pulse
Code https://github.com/python/cpython
Issues https://github.com/python/cpython/issues
Pull requests https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects https://github.com/python/cpython/projects
Security and quality https://github.com/python/cpython/security
Insights https://github.com/python/cpython/pulse
warsawhttps://github.com/warsaw
python:mainhttps://github.com/python/cpython/tree/main
warsaw:gh-149819-fix-pth-subprocesshttps://github.com/warsaw/cpython/tree/gh-149819-fix-pth-subprocess
Conversationhttps://github.com/python/cpython/pull/150177
Commits6 (6)https://github.com/python/cpython/pull/150177/commits
Checkshttps://github.com/python/cpython/pull/150177/checks
Files changedhttps://github.com/python/cpython/pull/150177/files
gh-149819: fix .pth and .start file processing in subprocess when inheriting PYTHONPATHhttps://github.com/python/cpython/pull/150177#top
warsawhttps://github.com/warsaw
python:mainhttps://github.com/python/cpython/tree/main
warsaw:gh-149819-fix-pth-subprocesshttps://github.com/warsaw/cpython/tree/gh-149819-fix-pth-subprocess
https://github.com/warsaw
warsawhttps://github.com/warsaw
May 21, 2026https://github.com/python/cpython/pull/150177#issue-4492058141
Please reload this pagehttps://github.com/python/cpython/pull/150177
#149888https://github.com/python/cpython/pull/149888
#149819https://github.com/python/cpython/issues/149819
@IntentBughttps://github.com/IntentBug
@warsawhttps://github.com/warsaw
New site.py implementation fails to load .pth files in subprocesses #149819https://github.com/python/cpython/issues/149819
Please reload this pagehttps://github.com/python/cpython/pull/150177
May 20, 2026 11:57https://github.com/python/cpython/pull/150177#commits-pushed-a07037d
https://github.com/warsaw
pythongh-149819https://github.com/python/cpython/issues/149819
: Fix .pth files not loaded in Python subprocesseshttps://github.com/python/cpython/pull/150177/commits/a07037d752dc095d1c25fbdff3c4cda5346c07af
a07037dhttps://github.com/python/cpython/pull/150177/commits/a07037d752dc095d1c25fbdff3c4cda5346c07af
pythongh-149583https://github.com/python/cpython/pull/149583
pythongh-75723https://github.com/python/cpython/issues/75723
https://github.com/warsaw
Fill out the tests for GH#149888https://github.com/python/cpython/pull/150177/commits/201053dcebc69e1ab18e7adc31fe6fbb75e0c584
201053dhttps://github.com/python/cpython/pull/150177/commits/201053dcebc69e1ab18e7adc31fe6fbb75e0c584
https://github.com/warsaw
warsawhttps://github.com/warsaw
May 21, 2026https://github.com/python/cpython/pull/150177#event-25789471741
https://github.com/warsaw
warsawhttps://github.com/warsaw
FFY00https://github.com/FFY00
code ownerhttps://github.com/python/cpython/blob/cb3b4b98d8d141c9de0462a0fa7e227a2104c1c7/.github/CODEOWNERS#L576
May 21, 2026 05:44https://github.com/python/cpython/pull/150177#event-25789471955
https://github.com/warsaw
warsawhttps://github.com/warsaw
needs backport to 3.15 https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22needs%20backport%20to%203.15%22
May 21, 2026https://github.com/python/cpython/pull/150177#event-25789472160
https://github.com/apps/bedevere-app
bedevere-apphttps://github.com/apps/bedevere-app
May 21, 2026 https://github.com/python/cpython/pull/150177#ref-issue-4443883056
New site.py implementation fails to load .pth files in subprocesses #149819 https://github.com/python/cpython/issues/149819
https://github.com/apps/bedevere-app
bedevere-apphttps://github.com/apps/bedevere-app
awaiting core review https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22awaiting%20core%20review%22
May 21, 2026https://github.com/python/cpython/pull/150177#event-25789475076
https://github.com/warsaw
warsawhttps://github.com/warsaw
May 21, 2026https://github.com/python/cpython/pull/150177#issuecomment-4505148366
@tcelyhttps://github.com/tcely
Please reload this pagehttps://github.com/python/cpython/pull/150177
https://github.com/warsaw
warsawhttps://github.com/warsaw
May 21, 2026https://github.com/python/cpython/pull/150177#issuecomment-4505150735
@scoderhttps://github.com/scoder
Please reload this pagehttps://github.com/python/cpython/pull/150177
https://github.com/warsaw
Merge branch 'main' intohttps://github.com/python/cpython/pull/150177/commits/9c53ee4f2a58132f24312b64ca3f3c29e2e5f5ed
pythongh-149819https://github.com/python/cpython/issues/149819
-fix-pth-subprocesshttps://github.com/python/cpython/pull/150177/commits/9c53ee4f2a58132f24312b64ca3f3c29e2e5f5ed
9c53ee4https://github.com/python/cpython/pull/150177/commits/9c53ee4f2a58132f24312b64ca3f3c29e2e5f5ed
https://github.com/tcely
tcelyhttps://github.com/tcely
May 21, 2026https://github.com/python/cpython/pull/150177#issuecomment-4505470982
Please reload this pagehttps://github.com/python/cpython/pull/150177
https://github.com/scoder
scoderhttps://github.com/scoder
May 21, 2026 https://github.com/python/cpython/pull/150177#pullrequestreview-4334710441
View reviewed changes https://github.com/python/cpython/pull/150177/files/9c53ee4f2a58132f24312b64ca3f3c29e2e5f5ed
Lib/site.pyhttps://github.com/python/cpython/pull/150177/files/9c53ee4f2a58132f24312b64ca3f3c29e2e5f5ed#diff-0783c435d23e776f5f679cb9c63f2ad98ad13047204562ed2408bd85aa17fd33
Please reload this pagehttps://github.com/python/cpython/pull/150177
https://github.com/apps/bedevere-app
bedevere-apphttps://github.com/apps/bedevere-app
awaiting merge https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22awaiting%20merge%22
awaiting core review https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22awaiting%20core%20review%22
May 21, 2026https://github.com/python/cpython/pull/150177#event-25792064851
https://github.com/scoder
scoderhttps://github.com/scoder
May 21, 2026https://github.com/python/cpython/pull/150177#issuecomment-4505680930
Please reload this pagehttps://github.com/python/cpython/pull/150177
https://github.com/warsaw
https://github.com/scoder
Update Lib/site.pyhttps://github.com/python/cpython/pull/150177/commits/78094f8e2fe73c64291c4d70fece75c3c2c73b03
78094f8https://github.com/python/cpython/pull/150177/commits/78094f8e2fe73c64291c4d70fece75c3c2c73b03
https://github.com/warsaw
warsawhttps://github.com/warsaw
May 21, 2026https://github.com/python/cpython/pull/150177#issuecomment-4512330278
Please reload this pagehttps://github.com/python/cpython/pull/150177
warsawhttps://github.com/warsaw
May 21, 2026 13:04https://github.com/python/cpython/pull/150177#commits-pushed-2575e1d
https://github.com/warsaw
Merge branch 'main' intohttps://github.com/python/cpython/pull/150177/commits/2575e1df9fe9d4c8b045d000d255ec8a724061e6
pythongh-149819https://github.com/python/cpython/issues/149819
-fix-pth-subprocesshttps://github.com/python/cpython/pull/150177/commits/2575e1df9fe9d4c8b045d000d255ec8a724061e6
2575e1dhttps://github.com/python/cpython/pull/150177/commits/2575e1df9fe9d4c8b045d000d255ec8a724061e6
https://github.com/warsaw
Oops! Remove redundant codehttps://github.com/python/cpython/pull/150177/commits/d289f154d3b64eef8e883b8d8fe6a0b0e24bc30c
d289f15https://github.com/python/cpython/pull/150177/commits/d289f154d3b64eef8e883b8d8fe6a0b0e24bc30c
https://github.com/warsaw
warsawhttps://github.com/warsaw
May 21, 2026 20:20https://github.com/python/cpython/pull/150177#event-25823050543
https://github.com/warsaw
warsawhttps://github.com/warsaw
3c298e2https://github.com/python/cpython/commit/3c298e2e385fc6f462abaada2fd680deb1a2b58e
May 21, 2026https://github.com/python/cpython/pull/150177#event-25825826933
Please reload this pagehttps://github.com/python/cpython/pull/150177
https://github.com/apps/miss-islington-app
miss-islington-apphttps://github.com/apps/miss-islington-app
May 21, 2026https://github.com/python/cpython/pull/150177#issuecomment-4513025417
@warsawhttps://github.com/warsaw
Please reload this pagehttps://github.com/python/cpython/pull/150177
https://github.com/apps/bedevere-app
bedevere-apphttps://github.com/apps/bedevere-app
awaiting merge https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22awaiting%20merge%22
May 21, 2026https://github.com/python/cpython/pull/150177#event-25825828864
https://github.com/apps/bedevere-app
bedevere-apphttps://github.com/apps/bedevere-app
May 21, 2026https://github.com/python/cpython/pull/150177#issuecomment-4513026947
GH-150202https://github.com/python/cpython/pull/150202
3.15 branchhttps://github.com/python/cpython/tree/3.15
Please reload this pagehttps://github.com/python/cpython/pull/150177
https://github.com/apps/bedevere-app
bedevere-apphttps://github.com/apps/bedevere-app
needs backport to 3.15 https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22needs%20backport%20to%203.15%22
May 21, 2026https://github.com/python/cpython/pull/150177#event-25825836189
https://github.com/warsaw
warsawhttps://github.com/warsaw
May 21, 2026 22:29https://github.com/python/cpython/pull/150177#event-25827075289
warsawhttps://github.com/warsaw
May 21, 2026 https://github.com/python/cpython/pull/150177#ref-commit-233cf75
https://github.com/miss-islington
https://github.com/warsaw
https://github.com/scoder
[3.15]https://github.com/python/cpython/commit/233cf75d6db0d8a915114c4cc4f8182afe510ed1
gh-149819https://github.com/python/cpython/issues/149819
: fix .pth and .start file processing in subprocess w…https://github.com/python/cpython/commit/233cf75d6db0d8a915114c4cc4f8182afe510ed1
233cf75https://github.com/python/cpython/commit/233cf75d6db0d8a915114c4cc4f8182afe510ed1
GH-150177https://github.com/python/cpython/pull/150177
#150202https://github.com/python/cpython/pull/150202
gh-149819https://github.com/python/cpython/issues/149819
GH-150177https://github.com/python/cpython/pull/150177
gh-149819https://github.com/python/cpython/issues/149819
gh-149583https://github.com/python/cpython/pull/149583
gh-75723https://github.com/python/cpython/issues/75723
3c298e2https://github.com/python/cpython/commit/3c298e2e385fc6f462abaada2fd680deb1a2b58e
https://github.com/warsaw
warsawhttps://github.com/warsaw
May 21, 2026 https://github.com/python/cpython/pull/150177#ref-pullrequest-4455397809
gh-149819: Fix .pth files not loaded in Python subprocesses #149888 https://github.com/python/cpython/pull/149888
https://github.co/hiddenchars
https://github.com/python/cpython/pull/{{ revealButtonHref }}
Sign up for freehttps://github.com/join?source=comment-repo
Sign in to commenthttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F150177
https://github.com/scoder
scoder https://github.com/scoder
https://github.com/python/cpython/pull/150177/files/9c53ee4f2a58132f24312b64ca3f3c29e2e5f5ed
https://github.com/FFY00
FFY00 https://github.com/FFY00
https://github.com/tcely
tcely https://github.com/tcely
https://github.com/python/cpython/pull/150177/files/9c53ee4f2a58132f24312b64ca3f3c29e2e5f5ed
https://github.com/warsaw
warsaw https://github.com/warsaw
Please reload this pagehttps://github.com/python/cpython/pull/150177
https://github.com/warsaw
https://github.com/tcely
https://github.com/scoder
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.