René's URL Explorer Experiment


Title: gh-154570: Fix itertools.accumulate() silently corrupting its total on reentrancy by PhysicistJohn · Pull Request #154571 · python/cpython · GitHub

Open Graph Title: gh-154570: Fix itertools.accumulate() silently corrupting its total on reentrancy by PhysicistJohn · Pull Request #154571 · python/cpython

X Title: gh-154570: Fix itertools.accumulate() silently corrupting its total on reentrancy by PhysicistJohn · Pull Request #154571 · python/cpython

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

Open Graph Description: A source iterable or func= callable that calls back into next() on the same accumulate object mid-step silently corrupted the running total instead of erroring. Fixes gh-154570. Adds a running guar...

X Description: A source iterable or func= callable that calls back into next() on the same accumulate object mid-step silently corrupted the running total instead of erroring. Fixes gh-154570. Adds a running guar...

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

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:f5677600-b971-b998-f7f5-197ffc12c193
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idE42A:1DABE0:A59A4F:A91038:6A63AEB5
html-safe-nonce1f2d43bb4ecd65c76a5690617bcb2a41694b0e989d5e3b1428500c54d0173ffb
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNDJBOjFEQUJFMDpBNTlBNEY6QTkxMDM4OjZBNjNBRUI1IiwidmlzaXRvcl9pZCI6IjUyOTc0Njk2NDE3MDc0NjY0MjEiLCJyZWdpb25fZWRnZSI6InNlYSIsInJlZ2lvbl9yZW5kZXIiOiJzZWEifQ==
visitor-hmacbfda319eaf2a7dd6a5749133725195a4c2d148252ba9d28572e55c7450224d35
hovercard-subject-tagpull_request:4121537238
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/154571/pull_request_layout
twitter:imagehttps://opengraph.githubassets.com/501ce0eb13cfbb16e88f9ddd5632e4bd5d3f2950a4a5a82b023f8561668cc168/python/cpython/pull/154571
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/501ce0eb13cfbb16e88f9ddd5632e4bd5d3f2950a4a5a82b023f8561668cc168/python/cpython/pull/154571
og:image:altA source iterable or func= callable that calls back into next() on the same accumulate object mid-step silently corrupted the running total instead of erroring. Fixes gh-154570. Adds a running guar...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamePhysicistJohn
hostnamegithub.com
expected-hostnamegithub.com
Nonec69b5576237034cb6ab5477391df7811093a00579a751b33bed4b527d68aade6
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
release5c31956f7a31ef033ef93ba813dcb6f7e8eb0972
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://Github.com/python/cpython/pull/154571#start-of-content
https://Github.com/
Sign in https://Github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F154571
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
Code QualityEnforce quality at mergehttps://github.com/features/code-quality
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%2F154571
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/154571
Reloadhttps://Github.com/python/cpython/pull/154571
Reloadhttps://Github.com/python/cpython/pull/154571
Please reload this pagehttps://Github.com/python/cpython/pull/154571
python https://Github.com/python
cpythonhttps://Github.com/python/cpython
Please reload this pagehttps://Github.com/python/cpython/pull/154571
Notifications https://Github.com/login?return_to=%2Fpython%2Fcpython
Fork 35k https://Github.com/login?return_to=%2Fpython%2Fcpython
Star 73.9k 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.4k 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
PhysicistJohnhttps://Github.com/PhysicistJohn
python:mainhttps://Github.com/python/cpython/tree/main
PhysicistJohn:gh-154570-accumulate-reentrancy-fixhttps://Github.com/PhysicistJohn/cpython/tree/gh-154570-accumulate-reentrancy-fix
Conversationhttps://Github.com/python/cpython/pull/154571
Commits3 (3)https://Github.com/python/cpython/pull/154571/commits
Checkshttps://Github.com/python/cpython/pull/154571/checks
Files changedhttps://Github.com/python/cpython/pull/154571/files
gh-154570: Fix itertools.accumulate() silently corrupting its total on reentrancyhttps://Github.com/python/cpython/pull/154571#top
PhysicistJohnhttps://Github.com/PhysicistJohn
python:mainhttps://Github.com/python/cpython/tree/main
PhysicistJohn:gh-154570-accumulate-reentrancy-fixhttps://Github.com/PhysicistJohn/cpython/tree/gh-154570-accumulate-reentrancy-fix
https://Github.com/PhysicistJohn
PhysicistJohnhttps://Github.com/PhysicistJohn
Jul 24, 2026https://Github.com/python/cpython/pull/154571#issue-4964736933
gh-154570https://github.com/python/cpython/issues/154570
Please reload this pagehttps://Github.com/python/cpython/pull/154571
https://Github.com/PhysicistJohn
pythongh-154570https://github.com/python/cpython/issues/154570
: Fix itertools.accumulate() silently corrupting its t…https://Github.com/python/cpython/pull/154571/commits/643254e7976c4e27ebb0acaca4992751d3b918cc
643254ehttps://Github.com/python/cpython/pull/154571/commits/643254e7976c4e27ebb0acaca4992751d3b918cc
https://Github.com/PhysicistJohn
PhysicistJohnhttps://Github.com/PhysicistJohn
rhettingerhttps://Github.com/rhettinger
code ownerhttps://Github.com/python/cpython/blob/66e313f471516bfa04c5c8966c159fafe6be082e/.github/CODEOWNERS#L517
July 24, 2026 02:54https://Github.com/python/cpython/pull/154571#event-28415034986
https://Github.com/apps/python-cla-bot
python-cla-bothttps://Github.com/apps/python-cla-bot
Jul 24, 2026https://Github.com/python/cpython/pull/154571#issuecomment-5065683642
Please reload this pagehttps://Github.com/python/cpython/pull/154571
https://cla.python.org/
Please reload this pagehttps://Github.com/python/cpython/pull/154571
https://Github.com/apps/bedevere-app
bedevere-apphttps://Github.com/apps/bedevere-app
Jul 24, 2026 https://Github.com/python/cpython/pull/154571#ref-issue-4964734610
itertools.accumulate() silently corrupts its running total on reentrancy #154570 https://Github.com/python/cpython/issues/154570
https://Github.com/apps/bedevere-app
bedevere-apphttps://Github.com/apps/bedevere-app
awaiting review https://Github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22awaiting%20review%22
Jul 24, 2026https://Github.com/python/cpython/pull/154571#event-28415037479
https://Github.com/brijkapadia
brijkapadiahttps://Github.com/brijkapadia
Jul 24, 2026 https://Github.com/python/cpython/pull/154571#pullrequestreview-4772946733
View reviewed changes https://Github.com/python/cpython/pull/154571/files/643254e7976c4e27ebb0acaca4992751d3b918cc
brijkapadiahttps://Github.com/brijkapadia
https://Github.com/python/cpython/pull/154571#pullrequestreview-4772946733
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
@eendebakpthttps://github.com/eendebakpt
Please reload this pagehttps://Github.com/python/cpython/pull/154571
Lib/test/test_itertools.pyhttps://Github.com/python/cpython/pull/154571/files/643254e7976c4e27ebb0acaca4992751d3b918cc#diff-9abbaeca99112e9e04b554726bff97b76030eb982f39e591be77be8ef14149e5
brijkapadiahttps://Github.com/brijkapadia
Jul 24, 2026https://Github.com/python/cpython/pull/154571#discussion_r3645149737
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://Github.com/python/cpython/pull/154571
Misc/NEWS.d/next/Library/2026-07-23-22-00-00.gh-issue-154570.accumulate-reentrancy.rsthttps://Github.com/python/cpython/pull/154571/files/643254e7976c4e27ebb0acaca4992751d3b918cc#diff-48a1782b3502b8b22849901e1f6d04f32924c9d7eeda22bf65973bdefa36f47a
brijkapadiahttps://Github.com/brijkapadia
Jul 24, 2026https://Github.com/python/cpython/pull/154571#discussion_r3645164602
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://Github.com/python/cpython/pull/154571
Modules/itertoolsmodule.chttps://Github.com/python/cpython/pull/154571/files/643254e7976c4e27ebb0acaca4992751d3b918cc#diff-dc27cbdf2b9f6e5236cade13cf301d352a7abd2a8b1988f2517d6f5b7a30c201
brijkapadiahttps://Github.com/brijkapadia
Jul 24, 2026https://Github.com/python/cpython/pull/154571#discussion_r3645168577
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://Github.com/python/cpython/pull/154571
https://Github.com/PhysicistJohn
Address review feedback: trim comment/NEWS, uint8_t running, add func…https://Github.com/python/cpython/pull/154571/commits/93ddb18e395e21bc1dd824e7f29374b605ace69f
93ddb18https://Github.com/python/cpython/pull/154571/commits/93ddb18e395e21bc1dd824e7f29374b605ace69f
pythonGH-154571https://github.com/python/cpython/pull/154571
https://Github.com/PhysicistJohn
PhysicistJohnhttps://Github.com/PhysicistJohn
Jul 24, 2026https://Github.com/python/cpython/pull/154571#issuecomment-5071918517
Please reload this pagehttps://Github.com/python/cpython/pull/154571
https://Github.com/PhysicistJohn
Retrigger CI: Android/EPUB failures were GitHub release-asset 504s, u…https://Github.com/python/cpython/pull/154571/commits/69b8a823977733cef6c673f413fd9709d6f66808
69b8a82https://Github.com/python/cpython/pull/154571/commits/69b8a823977733cef6c673f413fd9709d6f66808
https://Github.com/brijkapadia
brijkapadiahttps://Github.com/brijkapadia
Jul 24, 2026https://Github.com/python/cpython/pull/154571#issuecomment-5072102123
Please reload this pagehttps://Github.com/python/cpython/pull/154571
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%2F154571
https://Github.com/rhettinger
rhettinger https://Github.com/rhettinger
https://Github.com/brijkapadia
brijkapadia https://Github.com/brijkapadia
https://Github.com/python/cpython/pull/154571/files/643254e7976c4e27ebb0acaca4992751d3b918cc
awaiting review https://Github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22awaiting%20review%22
itertools.accumulate() silently corrupts its running total on reentrancy https://github.com/python/cpython/issues/154570
Please reload this pagehttps://Github.com/python/cpython/pull/154571
https://Github.com/PhysicistJohn
https://Github.com/brijkapadia
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.