René's URL Explorer Experiment


Title: gh-151814: Fix unbounded memory growth from repeated empty writes to `io.TextIOWrapper` by StanFromIreland · Pull Request #151817 · python/cpython · GitHub

Open Graph Title: gh-151814: Fix unbounded memory growth from repeated empty writes to `io.TextIOWrapper` by StanFromIreland · Pull Request #151817 · python/cpython

X Title: gh-151814: Fix unbounded memory growth from repeated empty writes to `io.TextIOWrapper` by StanFromIreland · Pull Request #151817 · python/cpython

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

Open Graph Description: Issue: Runaway memory use when repeatedly printing empty string #151814

X Description: Issue: Runaway memory use when repeatedly printing empty string #151814

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

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:d9a1ccc8-c64f-e34c-4bad-d56f490065fc
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idB4A8:258FA1:2D4436:3D385D:6A528C6C
html-safe-nonced085c8eea757eb8bcba3ae6d6a43a36eb589be84621d2fe496bd41c56a3e889b
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNEE4OjI1OEZBMToyRDQ0MzY6M0QzODVEOjZBNTI4QzZDIiwidmlzaXRvcl9pZCI6IjgwMDc2MzU2MTk0MjA0NzQ0NzciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac280cfa04b090efc08dba137fa9c24ce0410e59bf145d68ee26ac03b6b8816c6c
hovercard-subject-tagpull_request:3904961195
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/151817/pull_request_layout
twitter:imagehttps://opengraph.githubassets.com/2f65e83d8ac224d419bbbea9c806c97ed181a47f7db9940f4f97d0827e5286b7/python/cpython/pull/151817
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/2f65e83d8ac224d419bbbea9c806c97ed181a47f7db9940f4f97d0827e5286b7/python/cpython/pull/151817
og:image:altIssue: Runaway memory use when repeatedly printing empty string #151814
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameStanFromIreland
hostnamegithub.com
expected-hostnamegithub.com
Noneb9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb
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
release07a982c1d40157c619b364352b704c3ce66bb332
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/151817#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F151817
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%2F151817
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/151817
Reloadhttps://github.com/python/cpython/pull/151817
Reloadhttps://github.com/python/cpython/pull/151817
Please reload this pagehttps://github.com/python/cpython/pull/151817
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/151817
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
StanFromIrelandhttps://github.com/StanFromIreland
python:mainhttps://github.com/python/cpython/tree/main
StanFromIreland:textio-acchttps://github.com/StanFromIreland/cpython/tree/textio-acc
Conversationhttps://github.com/python/cpython/pull/151817
Commits2 (2)https://github.com/python/cpython/pull/151817/commits
Checkshttps://github.com/python/cpython/pull/151817/checks
Files changedhttps://github.com/python/cpython/pull/151817/files
gh-151814: Fix unbounded memory growth from repeated empty writes to io.TextIOWrapperhttps://github.com/python/cpython/pull/151817#top
StanFromIrelandhttps://github.com/StanFromIreland
python:mainhttps://github.com/python/cpython/tree/main
StanFromIreland:textio-acchttps://github.com/StanFromIreland/cpython/tree/textio-acc
https://github.com/StanFromIreland
StanFromIrelandhttps://github.com/StanFromIreland
Jun 20, 2026https://github.com/python/cpython/pull/151817#issue-4708245273
Please reload this pagehttps://github.com/python/cpython/pull/151817
Runaway memory use when repeatedly printing empty string #151814https://github.com/python/cpython/issues/151814
Please reload this pagehttps://github.com/python/cpython/pull/151817
https://github.com/StanFromIreland
Fix unbounded memory growth from repeated empty writes to io.TextIOWr…https://github.com/python/cpython/pull/151817/commits/c6b5163133619febd0fbe8c327e52399b1a54ffd
c6b5163https://github.com/python/cpython/pull/151817/commits/c6b5163133619febd0fbe8c327e52399b1a54ffd
https://github.com/StanFromIreland
StanFromIrelandhttps://github.com/StanFromIreland
cmaloneyhttps://github.com/cmaloney
June 20, 2026 20:18https://github.com/python/cpython/pull/151817#event-26998444273
https://github.com/apps/bedevere-app
bedevere-apphttps://github.com/apps/bedevere-app
Jun 20, 2026 https://github.com/python/cpython/pull/151817#ref-issue-4707929823
Runaway memory use when repeatedly printing empty string #151814 https://github.com/python/cpython/issues/151814
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
Jun 20, 2026https://github.com/python/cpython/pull/151817#event-26998445994
https://github.com/StanFromIreland
StanFromIrelandhttps://github.com/StanFromIreland
Jun 20, 2026 https://github.com/python/cpython/pull/151817#pullrequestreview-4538777337
View reviewed changes https://github.com/python/cpython/pull/151817/files/c6b5163133619febd0fbe8c327e52399b1a54ffd
Modules/_io/textio.chttps://github.com/python/cpython/pull/151817/files/c6b5163133619febd0fbe8c327e52399b1a54ffd#diff-f6d1380274f6859688c821fced58fb1c829d8acad44ae252ba988e220e1080b3
StanFromIrelandhttps://github.com/StanFromIreland
Jun 20, 2026https://github.com/python/cpython/pull/151817#discussion_r3447452935
Please reload this pagehttps://github.com/python/cpython/pull/151817
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/151817
asottilehttps://github.com/asottile
Jun 23, 2026https://github.com/python/cpython/pull/151817#discussion_r3461296620
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
?w=1https://github.com/python/cpython/pull/151817/changes?w=1
Please reload this pagehttps://github.com/python/cpython/pull/151817
StanFromIrelandhttps://github.com/StanFromIreland
Jun 23, 2026https://github.com/python/cpython/pull/151817#discussion_r3461316737
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/151817
https://github.com/StanFromIreland
StanFromIrelandhttps://github.com/StanFromIreland
Jun 20, 2026https://github.com/python/cpython/pull/151817#event-26998463686
https://github.com/cmaloney
cmaloneyhttps://github.com/cmaloney
Jun 20, 2026 https://github.com/python/cpython/pull/151817#pullrequestreview-4538778343
View reviewed changes https://github.com/python/cpython/pull/151817/files/c6b5163133619febd0fbe8c327e52399b1a54ffd
Modules/_io/textio.chttps://github.com/python/cpython/pull/151817/files/c6b5163133619febd0fbe8c327e52399b1a54ffd#diff-f6d1380274f6859688c821fced58fb1c829d8acad44ae252ba988e220e1080b3
Please reload this pagehttps://github.com/python/cpython/pull/151817
Lib/test/test_io/test_textio.pyhttps://github.com/python/cpython/pull/151817/files/c6b5163133619febd0fbe8c327e52399b1a54ffd#diff-871737268f0629fa5bc32f116d3c5f1a37accc05d5505883c9f0f21bf6ac7ee3
Please reload this pagehttps://github.com/python/cpython/pull/151817
https://github.com/StanFromIreland
Remove testhttps://github.com/python/cpython/pull/151817/commits/0d3fe570f62775bc2cfc0ed9e1b138c27133f879
0d3fe57https://github.com/python/cpython/pull/151817/commits/0d3fe570f62775bc2cfc0ed9e1b138c27133f879
https://github.com/StanFromIreland
StanFromIrelandhttps://github.com/StanFromIreland
cmaloneyhttps://github.com/cmaloney
June 21, 2026 09:29https://github.com/python/cpython/pull/151817#event-27006611120
https://github.com/cmaloney
cmaloneyhttps://github.com/cmaloney
Jun 21, 2026 https://github.com/python/cpython/pull/151817#pullrequestreview-4540024051
View reviewed changes https://github.com/python/cpython/pull/151817/files/0d3fe570f62775bc2cfc0ed9e1b138c27133f879
https://github.com/StanFromIreland
StanFromIrelandhttps://github.com/StanFromIreland
needs backport to 3.13 https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22needs%20backport%20to%203.13%22
needs backport to 3.14 https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22needs%20backport%20to%203.14%22
needs backport to 3.15 https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22needs%20backport%20to%203.15%22
Jun 22, 2026https://github.com/python/cpython/pull/151817#event-27047811507
https://github.com/StanFromIreland
StanFromIrelandhttps://github.com/StanFromIreland
c613072https://github.com/python/cpython/commit/c61307222e18bfa06691d53e3ad336c46f432de0
Jun 24, 2026https://github.com/python/cpython/pull/151817#event-27142896192
Please reload this pagehttps://github.com/python/cpython/pull/151817
https://github.com/StanFromIreland
StanFromIrelandhttps://github.com/StanFromIreland
June 24, 2026 11:47https://github.com/python/cpython/pull/151817#event-27142897516
https://github.com/apps/miss-islington-app
miss-islington-apphttps://github.com/apps/miss-islington-app
Jun 24, 2026https://github.com/python/cpython/pull/151817#issuecomment-4788928814
@StanFromIrelandhttps://github.com/StanFromIreland
Please reload this pagehttps://github.com/python/cpython/pull/151817
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
Jun 24, 2026https://github.com/python/cpython/pull/151817#event-27142898312
https://github.com/StanFromIreland
StanFromIrelandhttps://github.com/StanFromIreland
Jun 24, 2026https://github.com/python/cpython/pull/151817#issuecomment-4788930295
Please reload this pagehttps://github.com/python/cpython/pull/151817
https://github.com/apps/bedevere-app
bedevere-apphttps://github.com/apps/bedevere-app
Jun 24, 2026https://github.com/python/cpython/pull/151817#issuecomment-4788931359
GH-152071https://github.com/python/cpython/pull/152071
3.15 branchhttps://github.com/python/cpython/tree/3.15
Please reload this pagehttps://github.com/python/cpython/pull/151817
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
Jun 24, 2026https://github.com/python/cpython/pull/151817#event-27142906535
https://github.com/apps/bedevere-app
bedevere-apphttps://github.com/apps/bedevere-app
Jun 24, 2026https://github.com/python/cpython/pull/151817#issuecomment-4788932658
GH-152072https://github.com/python/cpython/pull/152072
3.14 branchhttps://github.com/python/cpython/tree/3.14
Please reload this pagehttps://github.com/python/cpython/pull/151817
https://github.com/apps/bedevere-app
bedevere-apphttps://github.com/apps/bedevere-app
needs backport to 3.14 https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22needs%20backport%20to%203.14%22
Jun 24, 2026https://github.com/python/cpython/pull/151817#event-27142910728
https://github.com/apps/bedevere-app
bedevere-apphttps://github.com/apps/bedevere-app
Jun 24, 2026https://github.com/python/cpython/pull/151817#issuecomment-4788933593
GH-152073https://github.com/python/cpython/pull/152073
3.13 branchhttps://github.com/python/cpython/tree/3.13
Please reload this pagehttps://github.com/python/cpython/pull/151817
https://github.com/apps/bedevere-app
bedevere-apphttps://github.com/apps/bedevere-app
needs backport to 3.13 https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22needs%20backport%20to%203.13%22
Jun 24, 2026https://github.com/python/cpython/pull/151817#event-27142913659
StanFromIrelandhttps://github.com/StanFromIreland
Jun 24, 2026 https://github.com/python/cpython/pull/151817#ref-commit-6bad84d
https://github.com/miss-islington
https://github.com/StanFromIreland
[3.15]https://github.com/python/cpython/commit/6bad84d64c63facc5f93a1ea0a053f620e05cb92
gh-151814https://github.com/python/cpython/issues/151814
: Fix unbounded memory growth from repeated empty wri…https://github.com/python/cpython/commit/6bad84d64c63facc5f93a1ea0a053f620e05cb92
6bad84dhttps://github.com/python/cpython/commit/6bad84d64c63facc5f93a1ea0a053f620e05cb92
GH-151817https://github.com/python/cpython/pull/151817
c613072https://github.com/python/cpython/commit/c61307222e18bfa06691d53e3ad336c46f432de0
StanFromIrelandhttps://github.com/StanFromIreland
Jun 24, 2026 https://github.com/python/cpython/pull/151817#ref-commit-a88629a
https://github.com/miss-islington
https://github.com/StanFromIreland
[3.14]https://github.com/python/cpython/commit/a88629a4204f33972bc11a72f2b13bdadfee026a
gh-151814https://github.com/python/cpython/issues/151814
: Fix unbounded memory growth from repeated empty wri…https://github.com/python/cpython/commit/a88629a4204f33972bc11a72f2b13bdadfee026a
a88629ahttps://github.com/python/cpython/commit/a88629a4204f33972bc11a72f2b13bdadfee026a
GH-151817https://github.com/python/cpython/pull/151817
c613072https://github.com/python/cpython/commit/c61307222e18bfa06691d53e3ad336c46f432de0
StanFromIrelandhttps://github.com/StanFromIreland
Jun 24, 2026 https://github.com/python/cpython/pull/151817#ref-commit-36fd455
https://github.com/miss-islington
https://github.com/StanFromIreland
[3.13]https://github.com/python/cpython/commit/36fd455ab65c943d99baf27454bdf0e6d96313eb
gh-151814https://github.com/python/cpython/issues/151814
: Fix unbounded memory growth from repeated empty wri…https://github.com/python/cpython/commit/36fd455ab65c943d99baf27454bdf0e6d96313eb
36fd455https://github.com/python/cpython/commit/36fd455ab65c943d99baf27454bdf0e6d96313eb
GH-151817https://github.com/python/cpython/pull/151817
#152073https://github.com/python/cpython/pull/152073
c613072https://github.com/python/cpython/commit/c61307222e18bfa06691d53e3ad336c46f432de0
https://github.com/cmaloney
cmaloneyhttps://github.com/cmaloney
Jun 26, 2026 https://github.com/python/cpython/pull/151817#ref-pullrequest-4748924793
gh-151814: Add test for TextIOWrapper.write unbounded memory growth from repeated writes #152244 https://github.com/python/cpython/pull/152244
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%2F151817
https://github.com/cmaloney
cmaloney https://github.com/cmaloney
https://github.com/python/cpython/pull/151817/files/0d3fe570f62775bc2cfc0ed9e1b138c27133f879
https://github.com/asottile
asottile https://github.com/asottile
https://github.com/python/cpython/pull/151817/files/0d3fe570f62775bc2cfc0ed9e1b138c27133f879
Please reload this pagehttps://github.com/python/cpython/pull/151817
https://github.com/StanFromIreland
https://github.com/cmaloney
https://github.com/asottile
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.