| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:fb09246e-14f7-b394-2ea0-b25da52e360a |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | E66C:21BD98:3D53FFA:4D999E0:6B0241D8 |
| html-safe-nonce | c3706460916a498b5c8a088e989960b4a34beec212b05118fc636952181a0a35 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNjZDOjIxQkQ5ODozRDUzRkZBOjREOTk5RTA6NkIwMjQxRDgiLCJ2aXNpdG9yX2lkIjoiNzkzMDM2NTQ1OTgxMDEwNzg2NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 65038ec2a1bc857283954de549762f9b6b63f6c544c59970e4cdc4f1b96c5747 |
| hovercard-subject-tag | pull_request:4959047225 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | ///pull_requests/show/files |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/python/cpython/pull/160127/files |
| twitter:image | https://avatars.githubusercontent.com/u/194129?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/194129?s=400&v=4 |
| og:image:alt | Issue: gh-158660 |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| Skip to content | https://github.com/python/cpython/pull/160127/files#start-of-content |
| https://github.com/ |
| Sign in | https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F160127%2Ffiles |
| GitHubRepository hosting, code review, and collaboration | https://github.com/platform |
| CopilotAI coding agent for tasks, projects, and automated work | https://github.com/features/copilot |
| ActionsCI/CD and automation | https://github.com/features/actions |
| Code QualityQuality analysis, fixes, and enforcement | https://github.com/features/code-quality |
| CodespacesCloud development environments | https://github.com/features/codespaces |
| Code SecurityVulnerability detection and remediation | https://github.com/security/advanced-security/code-security |
| Secret ProtectionSecret scanning and leak prevention | https://github.com/security/advanced-security/secret-protection |
| All Features | https://github.com/features |
| Documentation | https://docs.github.com/en |
| Training | https://learn.github.com/skills |
| Certifications | https://learn.github.com/credentials |
| Build with Copilot | https://github.com/features/ai |
| Customize Copilot | https://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview |
| Integrations | https://github.com/marketplace |
| Trending repos | https://github.com/trending |
| GitHub Sponsors | https://github.com/open-source/sponsors |
| Developer articles | https://github.com/resources/articles |
| ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place. | https://github.blog/changelog/ |
| Enterprises | https://github.com/enterprise |
| Team | https://github.com/team |
| Startups | https://github.com/enterprise/startups |
| Nonprofits | https://github.com/solutions/industry/nonprofits |
| Healthcare | https://github.com/solutions/industry/healthcare |
| Financial services | https://github.com/solutions/industry/financial-services |
| Manufacturing | https://github.com/solutions/industry/manufacturing |
| Government | https://github.com/solutions/industry/government |
| See all industries | https://github.com/solutions/industry |
| Why GitHub | https://github.com/why-github |
| Customer Stories | https://github.com/customer-stories |
| Business insights | https://github.com/solutions/executive-insights |
| Trust Center | https://github.com/trust-center |
| GitHub Advanced SecurityEnterprise-grade code security | https://github.com/security/advanced-security |
| Copilot for businessEnterprise-grade AI features | https://github.com/features/copilot/copilot-business |
| Premium SupportEnterprise-grade 24/7 support | https://github.com/enterprise/premium-support |
| Documentation | https://docs.github.com/en |
| Resource center | https://github.com/resources |
| Blog | https://github.blog/ |
| Events & webinars | https://github.com/resources/events |
| Community Forum | https://github.com/orgs/community/discussions |
| Customer Stories | https://github.com/customer-stories |
| Integrations | https://github.com/marketplace |
| Customer support | https://help.github.com/ |
| Training | https://learn.github.com/skills |
| GitHub Status | https://www.githubstatus.com/ |
| About | https://github.com/about |
| Partners | https://github.com/partners |
| Changelog | https://github.blog/changelog/ |
| GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub. | https://githubuniverse.com/ |
| Pricing | https://github.com/pricing |
| Sign in | https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F160127%2Ffiles |
| 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%2Ffiles&source=header-repo&source_repo=python%2Fcpython |
| Reload | https://github.com/python/cpython/pull/160127/files |
| Reload | https://github.com/python/cpython/pull/160127/files |
| Reload | https://github.com/python/cpython/pull/160127/files |
| python | https://github.com/python |
| cpython | https://github.com/python/cpython |
| Code | https://github.com/python/cpython |
| Issues5k+ (5k+) | https://github.com/python/cpython/issues |
| Pull requests2.4k (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 | https://github.com/python/cpython/security |
| Insights | https://github.com/python/cpython/insights |
| Sign up for GitHub
| https://github.com/signup?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose |
| terms of service | https://docs.github.com/terms |
| privacy statement | https://docs.github.com/privacy |
| Sign in | https://github.com/login?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose |
| vstinner | https://github.com/vstinner |
| python:main | https://github.com/python/cpython/tree/main |
| vstinner:list_writer | https://github.com/vstinner/cpython/tree/list_writer |
|
Conversation
27
| https://github.com/python/cpython/pull/160127 |
|
Commits
21
| https://github.com/python/cpython/pull/160127/commits |
|
Checks
52
| https://github.com/python/cpython/pull/160127/checks |
|
Files changed
| https://github.com/python/cpython/pull/160127/files |
| Please reload this page | https://github.com/python/cpython/pull/160127/files |
|
gh-158660: Add PyListWriter C API
| https://github.com/python/cpython/pull/160127/files#top |
|
Show all changes
21 commits
| https://github.com/python/cpython/pull/160127/files |
|
79a2ae5
gh-158660: Add `PyListWriter` C API
vstinner Oct 21, 2026
| https://github.com/python/cpython/pull/160127/commits/79a2ae5c8972cbe6b673d492ff2ed66c90d62a09 |
|
d8be30d
Inline PyList_SET_ITEM()
vstinner Oct 21, 2026
| https://github.com/python/cpython/pull/160127/commits/d8be30db3cfeb0640c05d8d377b32e178ef57c05 |
|
398c4b3
Remove redundant test_list_writer()
vstinner Oct 21, 2026
| https://github.com/python/cpython/pull/160127/commits/398c4b38844d5a721484c52729f0f90cefb88339 |
|
3df6e01
Move _PyObject_GC_TRACK() to PyListWriter_Finish()
vstinner Oct 21, 2026
| https://github.com/python/cpython/pull/160127/commits/3df6e01c30946b1f3755c871cb47a12f8917be8f |
|
b0edd12
Merge branch 'main' into list_writer
vstinner Oct 22, 2026
| https://github.com/python/cpython/pull/160127/commits/b0edd12fc5300211fe4ea3749d1754d532dea947 |
|
f9d7145
Clarify PyListWriter_ExtendArray() doc
vstinner Oct 22, 2026
| https://github.com/python/cpython/pull/160127/commits/f9d714500a96208212f37f85ca803ccda5b74a61 |
|
d096f46
Use list_new_prealloc() in PyListWriter_Create()
vstinner Oct 22, 2026
| https://github.com/python/cpython/pull/160127/commits/d096f46540645aed0c13b52f0e1aa8ec8c4ecdf1 |
|
a8c24ee
Update PyListWriter_Create() comment
vstinner Oct 22, 2026
| https://github.com/python/cpython/pull/160127/commits/a8c24ee4203a0d9efb22bdaed823d5802f21b731 |
|
31e5f1b
Add PyListWriter_ExtendArraySteal() function
vstinner Oct 22, 2026
| https://github.com/python/cpython/pull/160127/commits/31e5f1b8fb273fa9942cba538c03feadf93d36bb |
|
db8eb51
Fix doc: use :term: not :ref:
vstinner Oct 23, 2026
| https://github.com/python/cpython/pull/160127/commits/db8eb510bb8cfc9405671e9d0c1e400c0c909ac5 |
|
da86200
Avoid undefined behavior: memset() with size=0
vstinner Oct 23, 2026
| https://github.com/python/cpython/pull/160127/commits/da86200cc0952f9bdb19d6e4fd7ba2936e1c9568 |
|
748ac24
Finish() shrinks the list
vstinner Oct 29, 2026
| https://github.com/python/cpython/pull/160127/commits/748ac2477c7128547cb080c319abb2d1fb375d1f |
|
9efaf87
On error, Extend() restores the writer to its previous state
vstinner Nov 3, 2026
| https://github.com/python/cpython/pull/160127/commits/9efaf876f162f4466b4c4b18d8453256134459c7 |
|
8404760
Add PyListWriter_FromFormat()
vstinner Nov 3, 2026
| https://github.com/python/cpython/pull/160127/commits/8404760ed8617f8513c33217459b472df65b8d1e |
|
9313299
Fix undefined behavior in listwriter_extend_array() with nitem=0
vstinner Nov 3, 2026
| https://github.com/python/cpython/pull/160127/commits/9313299aa97517b6718e29319232b7db3e5722a1 |
|
8c7ec58
Inline listwriter_extend_array()
vstinner Nov 3, 2026
| https://github.com/python/cpython/pull/160127/commits/8c7ec583a7f19f97f0e7b8dd64c1697e214dbfeb |
|
e9dbc5e
Add PyListWriter_FromBuffer() function
vstinner Nov 3, 2026
| https://github.com/python/cpython/pull/160127/commits/e9dbc5e2f83e2fe1bc9eaa208633cb610815cc2e |
|
995f2d5
Fix doc
vstinner Nov 3, 2026
| https://github.com/python/cpython/pull/160127/commits/995f2d5bce1babf145bb7f7828d6ef4d5b38514e |
|
c808cb7
Optimize PyListWriter_FromBuffer()
vstinner Nov 3, 2026
| https://github.com/python/cpython/pull/160127/commits/c808cb7bf756238ea3118e8c80ef0f9a0ab5e2de |
|
8e07fa1
Resize the list once in PyListWriter_FromBuffer()
vstinner Nov 3, 2026
| https://github.com/python/cpython/pull/160127/commits/8e07fa1fa5038ffc0d995e1bd803858449d0e4a2 |
|
04c4d30
FromBuffer() tests compare to mview.tolist() and array.tolist()
vstinner Nov 4, 2026
| https://github.com/python/cpython/pull/160127/commits/04c4d30ba83c0367ee5d0b48c9aea730cd786f25 |
|
Clear filters
| https://github.com/python/cpython/pull/160127/files |
| Please reload this page | https://github.com/python/cpython/pull/160127/files |
| Please reload this page | https://github.com/python/cpython/pull/160127/files |
|
list.rst
| https://github.com/python/cpython/pull/160127/files#diff-a44f87cc306edad040d15abb116fe36178591a284bef39abae9f66d6e71cf03d |
|
3.16.rst
| https://github.com/python/cpython/pull/160127/files#diff-e69e0be717f3409832d520e20348f62af39c9436ba1a9d82e842bc10e5eb51d7 |
|
listobject.h
| https://github.com/python/cpython/pull/160127/files#diff-b73b8cc4003f2dbbddf4abf0d810faae0af1a0a41c509b63f201f60bb8dfd31f |
|
pycore_list.h
| https://github.com/python/cpython/pull/160127/files#diff-d0a25472263cdd3b39707c6d74fba4974a57232f1e98ead8e99eb0ee30031ed9 |
|
pycore_modsupport.h
| https://github.com/python/cpython/pull/160127/files#diff-e4185a53f8a1fc8ed9c8e24d5719a9efd0a50e9489ebb0906d3ad4d2d674e4c5 |
|
test_list.py
| https://github.com/python/cpython/pull/160127/files#diff-1bdcf8fbcde8d7bc8f36495c48114857f84c10207e13816a6bd6ef3646b98bc9 |
|
2026-10-21-16-35-42.gh-issue-158660.KvixNp.rst
| https://github.com/python/cpython/pull/160127/files#diff-eacecc7547460b32d5d271e454f703b94a092bb7a541b08665fae925e27382f9 |
|
list.c
| https://github.com/python/cpython/pull/160127/files#diff-fd2a21137d371bea841c411ff256834d286a0f7f692789824b2270abaadd86c8 |
|
call.c
| https://github.com/python/cpython/pull/160127/files#diff-b876797aa8c96d633b0b869447e7e14da64b9f53e48561149446939e7c6257e9 |
|
listobject.c
| https://github.com/python/cpython/pull/160127/files#diff-67a42c5c0990c7aceea040ffc07905299aab97d64dc49adb256f85340b2c7e81 |
|
memoryobject.c
| https://github.com/python/cpython/pull/160127/files#diff-7d1cb11da20dc3738b65b0f7381bf02df53132562a9749ba8a22d67a0f05f106 |
|
modsupport.c
| https://github.com/python/cpython/pull/160127/files#diff-1f0aec603b2223fac76a4d9959b8deedd3e5fe3bf2e8a8e7602a3bfbd921f827 |
|
| https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L114 |
| Doc/c-api/list.rst | https://github.com/python/cpython/pull/160127/files#diff-a44f87cc306edad040d15abb116fe36178591a284bef39abae9f66d6e71cf03d |
|
View file
| https://github.com/python/cpython/blob/04c4d30ba83c0367ee5d0b48c9aea730cd786f25/Doc/c-api/list.rst |
|
Open in desktop
| https://desktop.github.com |
| https://github.co/hiddenchars |
| https://github.com/python/cpython/pull/160127/{{ revealButtonHref }} |
|
| https://github.com/python/cpython/pull/160127/files#diff-a44f87cc306edad040d15abb116fe36178591a284bef39abae9f66d6e71cf03d |
|
| https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L116 |
| Doc/whatsnew/3.16.rst | https://github.com/python/cpython/pull/160127/files#diff-e69e0be717f3409832d520e20348f62af39c9436ba1a9d82e842bc10e5eb51d7 |
|
View file
| https://github.com/python/cpython/blob/04c4d30ba83c0367ee5d0b48c9aea730cd786f25/Doc/whatsnew/3.16.rst |
|
Open in desktop
| https://desktop.github.com |
| https://github.co/hiddenchars |
| https://github.com/python/cpython/pull/160127/{{ revealButtonHref }} |
|
| https://github.com/python/cpython/pull/160127/files#diff-e69e0be717f3409832d520e20348f62af39c9436ba1a9d82e842bc10e5eb51d7 |
|
| https://github.com/python/cpython/pull/160127/files#diff-e69e0be717f3409832d520e20348f62af39c9436ba1a9d82e842bc10e5eb51d7 |
| Include/cpython/listobject.h | https://github.com/python/cpython/pull/160127/files#diff-b73b8cc4003f2dbbddf4abf0d810faae0af1a0a41c509b63f201f60bb8dfd31f |
|
View file
| https://github.com/python/cpython/blob/04c4d30ba83c0367ee5d0b48c9aea730cd786f25/Include/cpython/listobject.h |
|
Open in desktop
| https://desktop.github.com |
| https://github.co/hiddenchars |
| https://github.com/python/cpython/pull/160127/{{ revealButtonHref }} |
|
| https://github.com/python/cpython/pull/160127/files#diff-b73b8cc4003f2dbbddf4abf0d810faae0af1a0a41c509b63f201f60bb8dfd31f |
| Include/internal/pycore_list.h | https://github.com/python/cpython/pull/160127/files#diff-d0a25472263cdd3b39707c6d74fba4974a57232f1e98ead8e99eb0ee30031ed9 |
|
View file
| https://github.com/python/cpython/blob/04c4d30ba83c0367ee5d0b48c9aea730cd786f25/Include/internal/pycore_list.h |
|
Open in desktop
| https://desktop.github.com |
| https://github.co/hiddenchars |
| https://github.com/python/cpython/pull/160127/{{ revealButtonHref }} |
|
| https://github.com/python/cpython/pull/160127/files#diff-d0a25472263cdd3b39707c6d74fba4974a57232f1e98ead8e99eb0ee30031ed9 |
|
| https://github.com/python/cpython/pull/160127/files#diff-d0a25472263cdd3b39707c6d74fba4974a57232f1e98ead8e99eb0ee30031ed9 |
|
| https://github.com/python/cpython/pull/160127/files#diff-d0a25472263cdd3b39707c6d74fba4974a57232f1e98ead8e99eb0ee30031ed9 |
|
| https://github.com/python/cpython/pull/160127/files#diff-d0a25472263cdd3b39707c6d74fba4974a57232f1e98ead8e99eb0ee30031ed9 |
|
| https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L265 |
| Include/internal/pycore_modsupport.h | https://github.com/python/cpython/pull/160127/files#diff-e4185a53f8a1fc8ed9c8e24d5719a9efd0a50e9489ebb0906d3ad4d2d674e4c5 |
|
View file
| https://github.com/python/cpython/blob/04c4d30ba83c0367ee5d0b48c9aea730cd786f25/Include/internal/pycore_modsupport.h |
|
Open in desktop
| https://desktop.github.com |
| https://github.co/hiddenchars |
| https://github.com/python/cpython/pull/160127/{{ revealButtonHref }} |
|
| https://github.com/python/cpython/pull/160127/files#diff-e4185a53f8a1fc8ed9c8e24d5719a9efd0a50e9489ebb0906d3ad4d2d674e4c5 |
|
| https://github.com/python/cpython/pull/160127/files#diff-e4185a53f8a1fc8ed9c8e24d5719a9efd0a50e9489ebb0906d3ad4d2d674e4c5 |
| Please reload this page | https://github.com/python/cpython/pull/160127/files |
| Please reload this page | https://github.com/python/cpython/pull/160127/files |
|
| https://github.com |
| Terms | https://docs.github.com/site-policy/github-terms/github-terms-of-service |
| Privacy | https://docs.github.com/site-policy/privacy-policies/github-privacy-statement |
| Security | https://github.com/security |
| Status | https://www.githubstatus.com/ |
| Community | https://github.community/ |
| Docs | https://docs.github.com/ |
| Contact | https://support.github.com?tags=dotcom-footer |