René's URL Explorer Experiment


Title: gh-149504: Fix re-entrancy bug when .pth/.start file invokes site.addsitedir() by warsaw · Pull Request #149659 · python/cpython · GitHub

Open Graph Title: gh-149504: Fix re-entrancy bug when .pth/.start file invokes site.addsitedir() by warsaw · Pull Request #149659 · python/cpython

X Title: gh-149504: Fix re-entrancy bug when .pth/.start file invokes site.addsitedir() by warsaw · Pull Request #149659 · python/cpython

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

Open Graph Description: Fix site.addsitedir() to allow re-entrant calls from within startup files. Previously, a .pth file containing an import line that called site.addsitedir() (or a .start entry point doing the same) ...

X Description: Fix site.addsitedir() to allow re-entrant calls from within startup files. Previously, a .pth file containing an import line that called site.addsitedir() (or a .start entry point doing the same) ...

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

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/commits(.:format)
route-controllerpull_requests
route-actioncommits
fetch-noncev2:d177a417-1f33-c236-9a16-885e0ceb8790
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idBD16:334E8C:2A152C2:3C90688:6A567580
html-safe-noncec0995841a2aa0eca31034346c8f2252379c36999cbbf17bec21f622d9c0dd6a7
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRDE2OjMzNEU4QzoyQTE1MkMyOjNDOTA2ODg6NkE1Njc1ODAiLCJ2aXNpdG9yX2lkIjoiMTM2MTg1NDY4MzA0MDYwOTY2NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac6bb77f0e043a074081b951ed9a8c2ea2fa1998d60a00453bd2db3c04e636ad08
hovercard-subject-tagpull_request:3659873785
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///pull_requests/show/commits
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/python/cpython/pull/149659/commits
twitter:imagehttps://opengraph.githubassets.com/3f59a57cf146a5235025d0d15b157fdbc59c2899f92238f2822607eae5ca96dd/python/cpython/pull/149659
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/3f59a57cf146a5235025d0d15b157fdbc59c2899f92238f2822607eae5ca96dd/python/cpython/pull/149659
og:image:altFix site.addsitedir() to allow re-entrant calls from within startup files. Previously, a .pth file containing an import line that called site.addsitedir() (or a .start entry point doing the same) ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamewarsaw
hostnamegithub.com
expected-hostnamegithub.com
None19b5ee9431dcfce15ab4b001d626e4e3a6ba1acb7be814813a52bbebd9a86ef5
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
releaseafc01ffdb045f4ff81c6122091366ade7b6166b7
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/149659/commits#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F149659%2Fcommits
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%2F149659%2Fcommits
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%2Fpull_requests%2Fshow%2Fcommits&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/pull/149659/commits
Reloadhttps://github.com/python/cpython/pull/149659/commits
Reloadhttps://github.com/python/cpython/pull/149659/commits
Please reload this pagehttps://github.com/python/cpython/pull/149659/commits
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/149659/commits
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-149504https://github.com/warsaw/cpython/tree/gh-149504
Conversationhttps://github.com/python/cpython/pull/149659
Commits9 (9)https://github.com/python/cpython/pull/149659/commits
Checkshttps://github.com/python/cpython/pull/149659/checks
Files changedhttps://github.com/python/cpython/pull/149659/files
gh-149504: Fix re-entrancy bug when .pth/.start file invokes site.addsitedir()https://github.com/python/cpython/pull/149659/commits#top
warsawhttps://github.com/warsaw
python:mainhttps://github.com/python/cpython/tree/main
warsaw:gh-149504https://github.com/warsaw/cpython/tree/gh-149504
Add re-entrant tests for gh-149504https://github.com/python/cpython/pull/149659/commits/7108fb7024a7cc4ba785401b8cdfc9aab8999dde
https://github.com/warsaw
warsawhttps://github.com/python/cpython/commits?author=warsaw
7108fb7https://github.com/python/cpython/pull/149659/commits/7108fb7024a7cc4ba785401b8cdfc9aab8999dde
https://github.com/python/cpython/tree/7108fb7024a7cc4ba785401b8cdfc9aab8999dde
Add end-to-end integration test coveragehttps://github.com/python/cpython/pull/149659/commits/aae5378fc3095f127b69a623e761ae7b2b848326
https://github.com/warsaw
warsawhttps://github.com/python/cpython/commits?author=warsaw
aae5378https://github.com/python/cpython/pull/149659/commits/aae5378fc3095f127b69a623e761ae7b2b848326
https://github.com/python/cpython/tree/aae5378fc3095f127b69a623e761ae7b2b848326
Implement a state class to process .pth and .start fileshttps://github.com/python/cpython/pull/149659/commits/dc96d5d726a9864eb871feb5a4b2a4989153722b
https://github.com/warsaw
warsawhttps://github.com/python/cpython/commits?author=warsaw
dc96d5dhttps://github.com/python/cpython/pull/149659/commits/dc96d5d726a9864eb871feb5a4b2a4989153722b
https://github.com/python/cpython/tree/dc96d5d726a9864eb871feb5a4b2a4989153722b
Add a blurbhttps://github.com/python/cpython/pull/149659/commits/c6cfcb03f80b563fdb40040b87c39eedafcf2b14
https://github.com/warsaw
warsawhttps://github.com/python/cpython/commits?author=warsaw
c6cfcb0https://github.com/python/cpython/pull/149659/commits/c6cfcb03f80b563fdb40040b87c39eedafcf2b14
https://github.com/python/cpython/tree/c6cfcb03f80b563fdb40040b87c39eedafcf2b14
One small round of cleanup.https://github.com/python/cpython/pull/149659/commits/04b67f7d8e9752f11781c67f78cd766693d393f2
https://github.com/warsaw
warsawhttps://github.com/python/cpython/commits?author=warsaw
04b67f7https://github.com/python/cpython/pull/149659/commits/04b67f7d8e9752f11781c67f78cd766693d393f2
https://github.com/python/cpython/tree/04b67f7d8e9752f11781c67f78cd766693d393f2
Merge branch 'main' into gh-149504https://github.com/python/cpython/pull/149659/commits/c38ec2b268b1228acb3a706f6d3d057fbf258347
https://github.com/warsaw
warsawhttps://github.com/python/cpython/commits?author=warsaw
c38ec2bhttps://github.com/python/cpython/pull/149659/commits/c38ec2b268b1228acb3a706f6d3d057fbf258347
https://github.com/python/cpython/tree/c38ec2b268b1228acb3a706f6d3d057fbf258347
Merge branch 'main' into gh-149504https://github.com/python/cpython/pull/149659/commits/ea344462b0a5687f18d9bc83e9dc46d14211a4d1
https://github.com/warsaw
warsawhttps://github.com/python/cpython/commits?author=warsaw
ea34446https://github.com/python/cpython/pull/149659/commits/ea344462b0a5687f18d9bc83e9dc46d14211a4d1
https://github.com/python/cpython/tree/ea344462b0a5687f18d9bc83e9dc46d14211a4d1
Merge branch 'main' into gh-149504https://github.com/python/cpython/pull/149659/commits/558ece4be223242a69a397fda8a636e225624f3a
https://github.com/warsaw
warsawhttps://github.com/python/cpython/commits?author=warsaw
558ece4https://github.com/python/cpython/pull/149659/commits/558ece4be223242a69a397fda8a636e225624f3a
https://github.com/python/cpython/tree/558ece4be223242a69a397fda8a636e225624f3a
Merge branch 'main' into gh-149504https://github.com/python/cpython/pull/149659/commits/9c488d71ccb4a0cd18a5043040a59f4ffb63fea3
https://github.com/warsaw
warsawhttps://github.com/python/cpython/commits?author=warsaw
9c488d7https://github.com/python/cpython/pull/149659/commits/9c488d71ccb4a0cd18a5043040a59f4ffb63fea3
https://github.com/python/cpython/tree/9c488d71ccb4a0cd18a5043040a59f4ffb63fea3
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.