René's URL Explorer Experiment


Title: gh-129559: Add `bytearray.resize()` by cmaloney · Pull Request #129560 · python/cpython · GitHub

Open Graph Title: gh-129559: Add `bytearray.resize()` by cmaloney · Pull Request #129560 · python/cpython

X Title: gh-129559: Add `bytearray.resize()` by cmaloney · Pull Request #129560 · python/cpython

Description: 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 📚: https://cpython-previews--129560.org.readthedocs.build/

Open Graph Description: 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 📚: ...

X Description: 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 📚: ...

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

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/commits/:range(.:format)
route-controllerpull_requests
route-actioncommits
fetch-noncev2:20c411cb-2288-384c-66e1-5f33fc12735b
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idCF0C:19C838:4A29787:63739B0:6995A564
html-safe-nonce99c8f3e2c39b1ce52985b68cbc88427f8e9c2b4557ebd73a8411db267d94a643
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRjBDOjE5QzgzODo0QTI5Nzg3OjYzNzM5QjA6Njk5NUE1NjQiLCJ2aXNpdG9yX2lkIjoiMzk1MjY1NjU0ODg1NDM0MzAxMiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac3cd6217b1a5671e23db1536bcd45dbe671d08e46f2aa012a04dfa224075994a9
hovercard-subject-tagpull_request:2310995870
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/129560/commits/d199032248c666c194a106ae32492532d7404de1
twitter:imagehttps://avatars.githubusercontent.com/u/751088?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/751088?s=400&v=4
og:image:altAdd 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_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None4bd759bc5f83244e2a0de29b937365905c0fefd238b6f077c24a49830375b4df
turbo-cache-controlno-preview
diff-viewunified
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
release46f92397ca6755a653d395263a2aa073b57d7b01
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://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 AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
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
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
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/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%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
Reloadhttps://github.com/python/cpython/pull/129560/commits/d199032248c666c194a106ae32492532d7404de1
Reloadhttps://github.com/python/cpython/pull/129560/commits/d199032248c666c194a106ae32492532d7404de1
Reloadhttps://github.com/python/cpython/pull/129560/commits/d199032248c666c194a106ae32492532d7404de1
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://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 servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
gpsheadhttps://github.com/gpshead
python:mainhttps://github.com/python/cpython/tree/main
cmaloney:resize_prhttps://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 pagehttps://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 pagehttps://github.com/python/cpython/pull/129560/commits/d199032248c666c194a106ae32492532d7404de1
Please reload this pagehttps://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 pagehttps://github.com/python/cpython/pull/129560/commits/d199032248c666c194a106ae32492532d7404de1
https://github.com/cmaloney
cmaloneyhttps://github.com/python/cpython/commits?author=cmaloney
Lib/test/test_capi/test_bytearray.pyhttps://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 pagehttps://github.com/python/cpython/pull/129560/commits/d199032248c666c194a106ae32492532d7404de1
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.