| route-pattern | /:user_id/:repository/pull/:id/commits/:range(.:format) |
| route-controller | pull_requests |
| route-action | commits |
| fetch-nonce | v2:20c411cb-2288-384c-66e1-5f33fc12735b |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | CF0C:19C838:4A29787:63739B0:6995A564 |
| html-safe-nonce | 99c8f3e2c39b1ce52985b68cbc88427f8e9c2b4557ebd73a8411db267d94a643 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRjBDOjE5QzgzODo0QTI5Nzg3OjYzNzM5QjA6Njk5NUE1NjQiLCJ2aXNpdG9yX2lkIjoiMzk1MjY1NjU0ODg1NDM0MzAxMiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 3cd6217b1a5671e23db1536bcd45dbe671d08e46f2aa012a04dfa224075994a9 |
| hovercard-subject-tag | pull_request:2310995870 |
| 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/commits |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/python/cpython/pull/129560/commits/d199032248c666c194a106ae32492532d7404de1 |
| twitter:image | https://avatars.githubusercontent.com/u/751088?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/751088?s=400&v=4 |
| og:image:alt | Add bytearray.resize() which wraps PyByteArray_Resize.
Make negative size passed to resize exception/error rather than crash in optimized builds.
Issue: gh-129559
📚 Documentation preview 📚: ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4bd759bc5f83244e2a0de29b937365905c0fefd238b6f077c24a49830375b4df |
| 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 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 46f92397ca6755a653d395263a2aa073b57d7b01 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| Skip to content | https://github.com/python/cpython/pull/129560/commits/d199032248c666c194a106ae32492532d7404de1#start-of-content |
|
| https://github.com/ |
|
Sign in
| https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F129560%2Fcommits%2Fd199032248c666c194a106ae32492532d7404de1 |
| GitHub CopilotWrite better code with AI | https://github.com/features/copilot |
| GitHub SparkBuild and deploy intelligent apps | https://github.com/features/spark |
| GitHub ModelsManage and compare prompts | https://github.com/features/models |
| MCP RegistryNewIntegrate external tools | https://github.com/mcp |
| ActionsAutomate any workflow | https://github.com/features/actions |
| CodespacesInstant dev environments | https://github.com/features/codespaces |
| IssuesPlan and track work | https://github.com/features/issues |
| Code ReviewManage code changes | https://github.com/features/code-review |
| GitHub Advanced SecurityFind and fix vulnerabilities | https://github.com/security/advanced-security |
| Code securitySecure your code as you build | https://github.com/security/advanced-security/code-security |
| Secret protectionStop leaks before they start | https://github.com/security/advanced-security/secret-protection |
| Why GitHub | https://github.com/why-github |
| Documentation | https://docs.github.com |
| Blog | https://github.blog |
| Changelog | https://github.blog/changelog |
| Marketplace | https://github.com/marketplace |
| View all features | https://github.com/features |
| Enterprises | https://github.com/enterprise |
| Small and medium teams | https://github.com/team |
| Startups | https://github.com/enterprise/startups |
| Nonprofits | https://github.com/solutions/industry/nonprofits |
| App Modernization | https://github.com/solutions/use-case/app-modernization |
| DevSecOps | https://github.com/solutions/use-case/devsecops |
| DevOps | https://github.com/solutions/use-case/devops |
| CI/CD | https://github.com/solutions/use-case/ci-cd |
| View all use cases | https://github.com/solutions/use-case |
| 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 |
| View all industries | https://github.com/solutions/industry |
| View all solutions | https://github.com/solutions |
| AI | https://github.com/resources/articles?topic=ai |
| Software Development | https://github.com/resources/articles?topic=software-development |
| DevOps | https://github.com/resources/articles?topic=devops |
| Security | https://github.com/resources/articles?topic=security |
| View all topics | https://github.com/resources/articles |
| Customer stories | https://github.com/customer-stories |
| Events & webinars | https://github.com/resources/events |
| Ebooks & reports | https://github.com/resources/whitepapers |
| Business insights | https://github.com/solutions/executive-insights |
| GitHub Skills | https://skills.github.com |
| Documentation | https://docs.github.com |
| Customer support | https://support.github.com |
| Community forum | https://github.com/orgs/community/discussions |
| Trust center | https://github.com/trust-center |
| Partners | https://github.com/partners |
| GitHub SponsorsFund open source developers | https://github.com/sponsors |
| Security Lab | https://securitylab.github.com |
| Maintainer Community | https://maintainers.github.com |
| Accelerator | https://github.com/accelerator |
| Archive Program | https://archiveprogram.github.com |
| Topics | https://github.com/topics |
| Trending | https://github.com/trending |
| Collections | https://github.com/collections |
| Enterprise platformAI-powered developer platform | https://github.com/enterprise |
| GitHub Advanced SecurityEnterprise-grade security features | 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/premium-support |
| Pricing | https://github.com/pricing |
| Search syntax tips | https://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax |
| documentation | https://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%2F129560%2Fcommits%2Fd199032248c666c194a106ae32492532d7404de1 |
|
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 |
| Reload | https://github.com/python/cpython/pull/129560/commits/d199032248c666c194a106ae32492532d7404de1 |
| Reload | https://github.com/python/cpython/pull/129560/commits/d199032248c666c194a106ae32492532d7404de1 |
| Reload | https://github.com/python/cpython/pull/129560/commits/d199032248c666c194a106ae32492532d7404de1 |
|
python
| https://github.com/python |
| cpython | https://github.com/python/cpython |
| Please reload this page | https://github.com/python/cpython/pull/129560/commits/d199032248c666c194a106ae32492532d7404de1 |
|
Notifications
| https://github.com/login?return_to=%2Fpython%2Fcpython |
|
Fork
34.1k
| https://github.com/login?return_to=%2Fpython%2Fcpython |
|
Star
71.5k
| 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.1k
| https://github.com/python/cpython/pulls |
|
Actions
| https://github.com/python/cpython/actions |
|
Projects
31
| https://github.com/python/cpython/projects |
|
Security
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
| https://github.com/python/cpython/security |
|
Insights
| https://github.com/python/cpython/pulse |
| 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 |
| gpshead | https://github.com/gpshead |
| python:main | https://github.com/python/cpython/tree/main |
| cmaloney:resize_pr | https://github.com/cmaloney/cpython/tree/resize_pr |
|
Conversation
52
| https://github.com/python/cpython/pull/129560 |
|
Commits
24
| https://github.com/python/cpython/pull/129560/commits |
|
Checks
44
| https://github.com/python/cpython/pull/129560/checks |
|
Files changed
| https://github.com/python/cpython/pull/129560/files |
| Please reload this page | https://github.com/python/cpython/pull/129560/commits/d199032248c666c194a106ae32492532d7404de1 |
|
gh-129559: Add bytearray.resize()
| https://github.com/python/cpython/pull/129560/commits/d199032248c666c194a106ae32492532d7404de1#top |
|
Show all changes
24 commits
| https://github.com/python/cpython/pull/129560/files |
|
e240327
gh-129559: Add `bytearray.resize()`
cmaloney Feb 1, 2025
| https://github.com/python/cpython/pull/129560/commits/e240327ee3fc5793815bda8f288a60a4415d1fd7 |
|
925fcbd
Add versionchanged note to c-api around len behavior
cmaloney Feb 1, 2025
| https://github.com/python/cpython/pull/129560/commits/925fcbd7634c6d01bdf2eedd75efc80b402734e6 |
|
29c04ad
Add argument formatting to stdtypes.rst
cmaloney Feb 1, 2025
| https://github.com/python/cpython/pull/129560/commits/29c04ad30362e0c0a291f484be2ffd7321a79eb1 |
|
d15ef67
Add buffer error to c api test
cmaloney Feb 2, 2025
| https://github.com/python/cpython/pull/129560/commits/d15ef67cd8db3044f7e7ebb25c46b09caf72f362 |
|
d199032
Remove case that no longer crashes
cmaloney Feb 2, 2025
| https://github.com/python/cpython/pull/129560/commits/d199032248c666c194a106ae32492532d7404de1 |
|
18829a2
Fix versionchanged
cmaloney Feb 2, 2025
| https://github.com/python/cpython/pull/129560/commits/18829a2a1f86bee390da331faa851cc23103ad73 |
|
df779e2
Fix doc warnings
cmaloney Feb 2, 2025
| https://github.com/python/cpython/pull/129560/commits/df779e2b420d064cf1ecbedc5515c68bc087a60b |
|
facc91f
Fix requested size check range
cmaloney Feb 2, 2025
| https://github.com/python/cpython/pull/129560/commits/facc91f82c0189fbcc030bedb6003d3a481c8605 |
|
d8b9faf
0 is a fine size
cmaloney Feb 2, 2025
| https://github.com/python/cpython/pull/129560/commits/d8b9faf5a8f718bb4d345c15762916e3e0807c6a |
|
7429cf4
Fix grammar
cmaloney Feb 2, 2025
| https://github.com/python/cpython/pull/129560/commits/7429cf46b251ec57c1338e282d896cf46354cd61 |
|
c183116
Add NULL byte tests, include set bytes in docs
cmaloney Feb 2, 2025
| https://github.com/python/cpython/pull/129560/commits/c1831160f108d7a960f2eb9d1cba281d128c6d3e |
|
dd46a85
Update Doc/library/stdtypes.rst
cmaloney Feb 2, 2025
| https://github.com/python/cpython/pull/129560/commits/dd46a85097814161cb0e225be6490b979c88ce8b |
|
69bbdc1
Always null new bytes
cmaloney Feb 2, 2025
| https://github.com/python/cpython/pull/129560/commits/69bbdc15c78bdd171aece7a405b0228489fecace |
|
ec4aa3d
Apply suggestions from code review
cmaloney Feb 4, 2025
| https://github.com/python/cpython/pull/129560/commits/ec4aa3da41b1e9478a43cab8b203ff3f1b5d751f |
|
336299a
Update Objects/bytearrayobject.c
cmaloney Feb 4, 2025
| https://github.com/python/cpython/pull/129560/commits/336299ada6e30fbbf90783e0de56ad08eda5ba3d |
|
1a0e157
tweak docs, fixup return exception
cmaloney Feb 4, 2025
| https://github.com/python/cpython/pull/129560/commits/1a0e1570903014f3588f16b2971033343a7f2aeb |
|
cf89ec1
Update test_resize_forbidden to use bytearray.resize
cmaloney Feb 4, 2025
| https://github.com/python/cpython/pull/129560/commits/cf89ec16f0c808ec8904b1e0ad43ee304f498e20 |
|
ddc7b09
doc tweaks
cmaloney Feb 5, 2025
| https://github.com/python/cpython/pull/129560/commits/ddc7b0916e4daa3a4b8f7c72a3044e6e3e4b1128 |
|
a49374b
Fix indentation of equivalent code
cmaloney Feb 5, 2025
| https://github.com/python/cpython/pull/129560/commits/a49374be4607f0e22d7e546dc520073ba9d5df29 |
|
298d052
Fix doctest
cmaloney Feb 5, 2025
| https://github.com/python/cpython/pull/129560/commits/298d052b48ae2d2ad308716e9cbc84a28dfc5661 |
|
2f6b0a3
Apply suggestions from code review
cmaloney Feb 5, 2025
| https://github.com/python/cpython/pull/129560/commits/2f6b0a3c5368a5adb223f609ec8caaaccfdac86b |
|
bf00f33
Update doctest per review
cmaloney Feb 5, 2025
| https://github.com/python/cpython/pull/129560/commits/bf00f334a6264b874a52b1d16b1f5cd85d17a615 |
|
8df7b02
Fix whitespace in test_bytes
cmaloney Feb 5, 2025
| https://github.com/python/cpython/pull/129560/commits/8df7b026768d4debec4127a922a73c7df5d75193 |
|
43e46dd
Merge branch 'main' into resize_pr
cmaloney Feb 5, 2025
| https://github.com/python/cpython/pull/129560/commits/43e46dd3d131d60cb21cba7eef20f76c096465a7 |
|
Clear filters
| https://github.com/python/cpython/pull/129560/commits/d199032248c666c194a106ae32492532d7404de1 |
| Please reload this page | https://github.com/python/cpython/pull/129560/commits/d199032248c666c194a106ae32492532d7404de1 |
| Please reload this page | https://github.com/python/cpython/pull/129560/commits/d199032248c666c194a106ae32492532d7404de1 |
|
Prev
| https://github.com/python/cpython/pull/129560/commits/d15ef67cd8db3044f7e7ebb25c46b09caf72f362 |
|
Next
| https://github.com/python/cpython/pull/129560/commits/18829a2a1f86bee390da331faa851cc23103ad73 |
| Please reload this page | https://github.com/python/cpython/pull/129560/commits/d199032248c666c194a106ae32492532d7404de1 |
|
| https://github.com/cmaloney |
| cmaloney | https://github.com/python/cpython/commits?author=cmaloney |
| Lib/test/test_capi/test_bytearray.py | https://github.com/python/cpython/pull/129560/commits/d199032248c666c194a106ae32492532d7404de1#diff-d979ef0ceeea87baac460bd77f5be86b97132f4a36754cc77190ca2671b7fd29 |
|
View file
| https://github.com/cmaloney/cpython/blob/d199032248c666c194a106ae32492532d7404de1/Lib/test/test_capi/test_bytearray.py |
|
Open in desktop
| https://desktop.github.com |
| https://github.co/hiddenchars |
| https://github.com/python/cpython/pull/129560/commits/{{ revealButtonHref }} |
|
| https://github.com/python/cpython/pull/129560/commits/d199032248c666c194a106ae32492532d7404de1#diff-d979ef0ceeea87baac460bd77f5be86b97132f4a36754cc77190ca2671b7fd29 |
|
| https://github.com/python/cpython/pull/129560/commits/d199032248c666c194a106ae32492532d7404de1#diff-d979ef0ceeea87baac460bd77f5be86b97132f4a36754cc77190ca2671b7fd29 |
| Please reload this page | https://github.com/python/cpython/pull/129560/commits/d199032248c666c194a106ae32492532d7404de1 |
|
| 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 |