René's URL Explorer Experiment


Title: [C API] PEP 782: Add PyBytesWriter API · Issue #129813 · python/cpython · GitHub

Open Graph Title: [C API] PEP 782: Add PyBytesWriter API · Issue #129813 · python/cpython

X Title: [C API] PEP 782: Add PyBytesWriter API · Issue #129813 · python/cpython

Description: Feature or enhancement Proposal: I propose adding a PyBytesWriter API to create bytes objects. Efficient API thanks to overallocation in PyBytesWriter_Extend() and usage of a "small buffer" of (around) 256 bytes Avoid creating incomplete...

Open Graph Description: Feature or enhancement Proposal: I propose adding a PyBytesWriter API to create bytes objects. Efficient API thanks to overallocation in PyBytesWriter_Extend() and usage of a "small buffer" of (aro...

X Description: Feature or enhancement Proposal: I propose adding a PyBytesWriter API to create bytes objects. Efficient API thanks to overallocation in PyBytesWriter_Extend() and usage of a "small buffer&quo...

Opengraph URL: https://github.com/python/cpython/issues/129813

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[C API] PEP 782: Add PyBytesWriter API","articleBody":"# Feature or enhancement\n\n### Proposal:\n\nI propose adding a PyBytesWriter API to create `bytes` objects.\n\n* Efficient API thanks to overallocation in `PyBytesWriter_Extend()` and usage of a \"small buffer\" of (around) 256 bytes\n* [Avoid creating incomplete/inconsistent](https://github.com/capi-workgroup/api-evolution/issues/36) `bytes` objects.\n* [Avoid mutating immutable](https://github.com/capi-workgroup/api-evolution/issues/20) `bytes`.\n\nAPI:\n\n```c\ntypedef struct PyBytesWriter PyBytesWriter;\n\nPyAPI_FUNC(void*) PyBytesWriter_Create(\n    PyBytesWriter **writer,\n    Py_ssize_t alloc);\nPyAPI_FUNC(void) PyBytesWriter_Discard(\n    PyBytesWriter *writer);\nPyAPI_FUNC(PyObject*) PyBytesWriter_Finish(\n    PyBytesWriter *writer,\n    void *buf);\n\nPyAPI_FUNC(Py_ssize_t) PyBytesWriter_GetRemaining(\n    PyBytesWriter *writer,\n    void *buf);\nPyAPI_FUNC(void*) PyBytesWriter_Extend(\n    PyBytesWriter *writer,\n    void *buf,\n    Py_ssize_t extend);\nPyAPI_FUNC(void*) PyBytesWriter_WriteBytes(\n    PyBytesWriter *writer,\n    void *buf,\n    const void *bytes,\n    Py_ssize_t size);\nPyAPI_FUNC(void*) PyBytesWriter_Format(\n    PyBytesWriter *writer,\n    void *buf,\n    const char *format,\n    ...);\n```\n\nSimple example creating the string `b\"abc\"`:\n\n```c\nPyObject* create_abc(void)\n{\n    PyBytesWriter *writer;\n    char *str = PyBytesWriter_Create(&writer, 3);\n    if (writer == NULL) return NULL;\n\n    memcpy(str, \"abc\", 3);\n    str += 3;\n\n    return PyBytesWriter_Finish(writer, str);\n}\n```\n\nExample formatting an integer in decimal, the size is not known in advance::\n\n```c\nPyObject* format_int(int value)\n{\n    PyBytesWriter *writer;\n    char *str = PyBytesWriter_Create(&writer, 20);\n    if (writer == NULL) return NULL;\n\n    str += PyOS_snprintf(str, 20, \"%i\", value);\n\n    return PyBytesWriter_Finish(writer, str);\n}\n```\n\nNote: using `PyBytesWriter_Format()` would make this code simpler.\n\nExample using `PyBytesWriter_Extend()`,smilar to `bytes.center()` with a different API: spaces are number of whitespaces added to the left and to the right:\n\n```c\nstatic PyObject *\nbyteswriter_center_example(Py_ssize_t spaces, char *str, Py_ssize_t str_size)\n{\n    PyBytesWriter *writer;\n    char *buf = PyBytesWriter_Create(&writer, spaces * 2);\n    if (buf == NULL) {\n        goto error;\n    }\n    assert(PyBytesWriter_GetRemaining(writer, buf) == spaces * 2);\n\n    // Add left spaces\n    memset(buf, ' ', spaces);\n    buf += spaces;\n    assert(PyBytesWriter_GetRemaining(writer, buf) == spaces);\n\n    // Copy string\n    buf = PyBytesWriter_Extend(writer, buf, str_size);\n    if (buf == NULL) {\n        goto error;\n    }\n    assert(PyBytesWriter_GetRemaining(writer, buf) == spaces + str_size);\n\n    memcpy(buf, str, str_size);\n    buf += str_size;\n    assert(PyBytesWriter_GetRemaining(writer, buf) == spaces);\n\n    // Add right spaces\n    memset(buf, ' ', spaces);\n    buf += spaces;\n    assert(PyBytesWriter_GetRemaining(writer, buf) == 0);\n\n    return PyBytesWriter_Finish(writer, buf);\n\nerror:\n    PyBytesWriter_Discard(writer);\n    return NULL;\n}\n```\n\n### Has this already been discussed elsewhere?\n\nNo response given\n\n### Links to previous discussion of this feature:\n\nMy previous attempt in July/August 2024:\n\n* https://github.com/capi-workgroup/decisions/issues/39\n* https://github.com/python/cpython/pull/121726\n\n\u003c!-- gh-linked-prs -->\n### Linked PRs\n* gh-129814\n* gh-131520\n* gh-131681\n* gh-138822\n* gh-138824\n* gh-138825\n* gh-138829\n* gh-138830\n* gh-138831\n* gh-138832\n* gh-138833\n* gh-138835\n* gh-138836\n* gh-138837\n* gh-138838\n* gh-138839\n* gh-138840\n* gh-138874\n* gh-138901\n* gh-138919\n* gh-138920\n* gh-138921\n* gh-138922\n* gh-138923\n* gh-138924\n* gh-138929\n* gh-138930\n* gh-138941\n* gh-138954\n* gh-138955\n* gh-138957\n* gh-138964\n* gh-138986\n* gh-139044\n* gh-139047\n* gh-139048\n* gh-139054\n* gh-139097\n* gh-139101\n* gh-139113\n* gh-138956\n* gh-139121\n* gh-139131\n* gh-139151\n* gh-139264\n* gh-139892\n* gh-140152\n* gh-145900\n* gh-156938\n* gh-156979\n* gh-157226\n* gh-159261\n* gh-162257\n* gh-162259\n* gh-162260\n* gh-162297\n\u003c!-- /gh-linked-prs -->\n","author":{"url":"https://github.com/vstinner","@type":"Person","name":"vstinner"},"datePublished":"2025-02-07T15:44:08Z","url":"https://github.com/python/cpython/issues/129813"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:8712efa0-960e-bbdd-5aed-bfc355692e0a
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id9534:AFBD9:11DF1D3:17A3BD7:6B01E84C
html-safe-nonce71b805d423ca767746e9d82c410fc95e16166e7d55f98eb662bd927fcbb07314
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NTM0OkFGQkQ5OjExREYxRDM6MTdBM0JENzo2QjAxRTg0QyIsInZpc2l0b3JfaWQiOiI2NTgxNzIxMzQ4ODI3MjEyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacfc1c44850e2b593f85b0ab3989d6df0417ab0ad8a1996bda3a53ed32069fbd11
hovercard-subject-tagissue:2838479949
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/129813/issue_layout
twitter:imagehttps://opengraph.githubassets.com/b982931fc34b2e4a578c9d33db19d644ce4c1f3f6572cdfe30bff324c581e53e/python/cpython/issues/129813
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/b982931fc34b2e4a578c9d33db19d644ce4c1f3f6572cdfe30bff324c581e53e/python/cpython/issues/129813
og:image:altFeature or enhancement Proposal: I propose adding a PyBytesWriter API to create bytes objects. Efficient API thanks to overallocation in PyBytesWriter_Extend() and usage of a "small buffer" of (aro...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamevstinner
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-preview
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
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/python/cpython/issues/129813#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F129813
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
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
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://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
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F129813
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/issues/129813
Reloadhttps://github.com/python/cpython/issues/129813
Reloadhttps://github.com/python/cpython/issues/129813
pythonhttps://github.com/python
cpythonhttps://github.com/python/cpython
Codehttps://github.com/python/cpython
Issues5k+ (5k+)https://github.com/python/cpython/issues
Pull requests2.4k (2.4k)https://github.com/python/cpython/pulls
Actionshttps://github.com/python/cpython/actions
Projectshttps://github.com/python/cpython/projects
Security and qualityhttps://github.com/python/cpython/security
Insightshttps://github.com/python/cpython/insights
https://github.com/python/cpython
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/129813
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/129813
[C API] PEP 782: Add PyBytesWriter APIhttps://github.com/python/cpython/issues/129813#top
topic-C-APIhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22topic-C-API%22
type-featureA feature request or enhancementhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-feature%22
https://github.com/vstinner
vstinnerhttps://github.com/vstinner
on Feb 7, 2025https://github.com/python/cpython/issues/129813#issue-2838479949
Avoid creating incomplete/inconsistenthttps://github.com/capi-workgroup/api-evolution/issues/36
Avoid mutating immutablehttps://github.com/capi-workgroup/api-evolution/issues/20
Add PyBytes_Writer() API capi-workgroup/decisions#39https://github.com/capi-workgroup/decisions/issues/39
gh-121710: Add PyBytesWriter API #121726https://github.com/python/cpython/pull/121726
[WIP] gh-129813: Add PyBytesWriter C API #129814https://github.com/python/cpython/pull/129814
[WIP] gh-129813: Add PyBytesWriter C API (version 2) #131520https://github.com/python/cpython/pull/131520
[WIP] gh-129813, PEP 782: Add PyBytesWriter C API #131681https://github.com/python/cpython/pull/131681
gh-129813, PEP 782: Add PyBytesWriter C API #138822https://github.com/python/cpython/pull/138822
gh-129813, PEP 782: Add PyBytesWriter_Format() #138824https://github.com/python/cpython/pull/138824
gh-129813, PEP 782: Use PyBytesWriter in binascii #138825https://github.com/python/cpython/pull/138825
gh-129813, PEP 782: Use PyBytesWriter in posix extension #138829https://github.com/python/cpython/pull/138829
gh-129813, PEP 782: Use Py_GetConstant(Py_CONSTANT_EMPTY_BYTES) #138830https://github.com/python/cpython/pull/138830
gh-129813, PEP 782: Use PyBytesWriter in socket and mmap #138831https://github.com/python/cpython/pull/138831
gh-129813, PEP 782: Use PyBytesWriter in lzma and zlib #138832https://github.com/python/cpython/pull/138832
gh-129813, PEP 782: Use PyBytesWriter in pickle and struct #138833https://github.com/python/cpython/pull/138833
gh-129813, PEP 782: Use PyBytesWriter in _hashopenssl #138835https://github.com/python/cpython/pull/138835
gh-129813, PEP 782: Use PyBytesWriter in memoryview #138836https://github.com/python/cpython/pull/138836
gh-129813, PEP 782: Use PyBytesWriter in _PyBytes_FromList() #138837https://github.com/python/cpython/pull/138837
gh-129813, PEP 782: Use PyBytesWriter in _PyBytes_DecodeEscape2() #138838https://github.com/python/cpython/pull/138838
gh-129813, PEP 782: Use PyBytesWriter in _PyBytes_FormatEx() #138839https://github.com/python/cpython/pull/138839
gh-129813, PEP 782: Use PyBytesWriter in bytes_concat() #138840https://github.com/python/cpython/pull/138840
gh-129813, PEP 782: Use PyBytesWriter in utf8_encoder() #138874https://github.com/python/cpython/pull/138874
gh-129813, PEP 782: Use PyBytesWriter in _io.FileIO.readall #138901https://github.com/python/cpython/pull/138901
gh-129813, PEP 782: Use PyBytesWriter in _codecs.escape_decode() #138919https://github.com/python/cpython/pull/138919
gh-129813, PEP 782: Use PyBytesWriter in _curses #138920https://github.com/python/cpython/pull/138920
gh-129813, PEP 782: Use PyBytesWriter in fcntl #138921https://github.com/python/cpython/pull/138921
gh-129813, PEP 782: Use PyBytesWriter in _hashopenssl #138922https://github.com/python/cpython/pull/138922
gh-129813, PEP 782: Use PyBytesWriter in _sha3 #138923https://github.com/python/cpython/pull/138923
gh-129813, PEP 782: Init small_buffer in PyBytesWriter_Create() #138924https://github.com/python/cpython/pull/138924
gh-129813, PEP 782: Use PyBytesWriter in _ssl #138929https://github.com/python/cpython/pull/138929
gh-129813, PEP 782: Use PyBytesWriter in _winapi.PeekNamedPipe() #138930https://github.com/python/cpython/pull/138930
gh-129813, PEP 782: Add PyBytesWriter.overallocate #138941https://github.com/python/cpython/pull/138941
gh-129813, PEP 782: Use PyBytesWriter in bufferedio.c #138954https://github.com/python/cpython/pull/138954
gh-129813, PEP 782: Use PyBytesWriter in FileIO.read() #138955https://github.com/python/cpython/pull/138955
gh-129813: Use PyBytesWriter in _json:_match_number_unicode #138957https://github.com/python/cpython/pull/138957
gh-129813, PEP 782: Soft deprecate _PyBytes_Resize() #138964https://github.com/python/cpython/pull/138964
gh-129813, PEP 782: Add doc reference link #138986https://github.com/python/cpython/pull/138986
gh-129813, PEP 782: Use PyBytesWriter in _Py_bytes_maketrans() #139044https://github.com/python/cpython/pull/139044
gh-129813, PEP 782: Use PyBytesWriter in _multiprocessing #139047https://github.com/python/cpython/pull/139047
gh-129813, PEP 782: Use PyBytesWriter in _testclinic #139048https://github.com/python/cpython/pull/139048
gh-129813, PEP 782: Set invalid bytes in PyBytesWriter #139054https://github.com/python/cpython/pull/139054
gh-129813, PEP 782: Use PyBytesWriter in _socket #139097https://github.com/python/cpython/pull/139097
gh-129813, PEP 782: Optimize byteswriter_resize() #139101https://github.com/python/cpython/pull/139101
gh-129813, PEP 782: Use PyBytesWriter in ssl.MemoryBIO #139113https://github.com/python/cpython/pull/139113
gh-129813: PEP 782: Use PyBytesWriter in _sqlite #138956https://github.com/python/cpython/pull/138956
gh-129813, PEP 782: Use PyBytesWriter in bufferedio.c #139121https://github.com/python/cpython/pull/139121
gh-129813, PEP 782: Use PyBytesWriter in socket recvmsg() #139131https://github.com/python/cpython/pull/139131
gh-129813, PEP 782: Fix refleak in sock_recvfrom() #139151https://github.com/python/cpython/pull/139151
gh-129813, PEP 782: Remove the private _PyBytesWriter API #139264https://github.com/python/cpython/pull/139264
gh-129813: Fix PyBytesWriter tests #139892https://github.com/python/cpython/pull/139892
gh-129813: Enhance PyBytesWriter documentation #140152https://github.com/python/cpython/pull/140152
gh-129813: Document that PyBytesWriter_GetData() cannot fail #145900https://github.com/python/cpython/pull/145900
gh-129813: Fix typo in byteswriter_resize() #156938https://github.com/python/cpython/pull/156938
[3.15] gh-129813: Fix typo in byteswriter_resize() (GH-156938) #156979https://github.com/python/cpython/pull/156979
gh-129813: Check size in PyBytesWriter_FinishWithSize() #157226https://github.com/python/cpython/pull/157226
[3.15] gh-129813: Check size in PyBytesWriter_FinishWithSize() (#157226) #159261https://github.com/python/cpython/pull/159261
gh-129813: Use PyBytesWriter for strided mmap slices #162257https://github.com/python/cpython/pull/162257
gh-129813: Use PyBytesWriter in binascii #162259https://github.com/python/cpython/pull/162259
gh-129813: Use PyBytesWriter in ctypes #162260https://github.com/python/cpython/pull/162260
gh-129813: Use PyBytesWriter in _testbuffer #162297https://github.com/python/cpython/pull/162297
Nexthttps://github.com/python/cpython/issues/129813?timeline_page=1
vstinnerhttps://github.com/vstinner
type-featureA feature request or enhancementhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-feature%22
on Feb 7, 2025https://github.com/python/cpython/issues/129813#event-16226882671
vstinnerhttps://github.com/vstinner
on Feb 7, 2025https://github.com/python/cpython/issues/129813#event-16226924888
pythongh-129813: Add PyBytesWriter C APIhttps://github.com/vstinner/cpython/commit/490222fac88fcabf3da47a6831008d65b7ebd4c7
pythongh-129813https://github.com/python/cpython/issues/129813
490222fhttps://github.com/vstinner/cpython/commit/490222fac88fcabf3da47a6831008d65b7ebd4c7
https://github.com/vstinner
vstinnerhttps://github.com/vstinner
on Feb 7, 2025https://github.com/python/cpython/issues/129813#issuecomment-2643308807
#121726https://github.com/python/cpython/pull/121726
picnixzhttps://github.com/picnixz
topic-C-APIhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22topic-C-API%22
on Feb 7, 2025https://github.com/python/cpython/issues/129813#event-16227819733
https://github.com/encukou
encukouhttps://github.com/encukou
on Feb 7, 2025https://github.com/python/cpython/issues/129813#issuecomment-2643831977
WIP guidelineshttps://github.com/capi-workgroup/api-evolution/blob/main/guidelines.rst#arithmetic-types
https://github.com/vstinner
vstinnerhttps://github.com/vstinner
on Feb 11, 2025https://github.com/python/cpython/issues/129813#issuecomment-2651616302
https://github.com/vstinner
vstinnerhttps://github.com/vstinner
on Feb 11, 2025https://github.com/python/cpython/issues/129813#issuecomment-2651625657
https://github.com/encukou
encukouhttps://github.com/encukou
on Feb 12, 2025https://github.com/python/cpython/issues/129813#issuecomment-2653355965
https://github.com/vstinner
vstinnerhttps://github.com/vstinner
on Feb 14, 2025https://github.com/python/cpython/issues/129813#issuecomment-2659022203
https://github.com/vstinner
vstinnerhttps://github.com/vstinner
on Feb 14, 2025https://github.com/python/cpython/issues/129813#issuecomment-2660423492
#99701https://github.com/python/cpython/issues/99701
https://github.com/vstinner
vstinnerhttps://github.com/vstinner
on Feb 16, 2025https://github.com/python/cpython/issues/129813#issuecomment-2661365770
https://github.com/vstinner
vstinnerhttps://github.com/vstinner
on Feb 16, 2025https://github.com/python/cpython/issues/129813#issuecomment-2661366754
WIP guidelineshttps://github.com/capi-workgroup/api-evolution/blob/main/guidelines.rst#arithmetic-types
https://github.com/vstinner
vstinnerhttps://github.com/vstinner
on Feb 18, 2025https://github.com/python/cpython/issues/129813#issuecomment-2666068634
https://discuss.python.org/t/add-pybyteswriter-public-c-api/81182https://discuss.python.org/t/add-pybyteswriter-public-c-api/81182
https://github.com/vstinner
vstinnerhttps://github.com/vstinner
on Mar 12, 2025https://github.com/python/cpython/issues/129813#issuecomment-2717550956
https://discuss.python.org/t/add-pybyteswriter-public-c-api/81182https://discuss.python.org/t/add-pybyteswriter-public-c-api/81182
vstinnerhttps://github.com/vstinner
completedhttps://github.com/python/cpython/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Mar 12, 2025https://github.com/python/cpython/issues/129813#event-16710810651
vstinnerhttps://github.com/vstinner
on Mar 13, 2026https://github.com/python/cpython/issues/129813#event-23556583819
gh-129813: Document that PyBytesWriter_GetData() cannot fail (#145900)https://github.com/python/cpython/commit/3c38feb2a21aacdb009eea8baa2a6a3daf4b4932
gh-129813https://github.com/python/cpython/issues/129813
#145900https://github.com/python/cpython/pull/145900
3c38febhttps://github.com/python/cpython/commit/3c38feb2a21aacdb009eea8baa2a6a3daf4b4932
ljfphttps://github.com/ljfp
on Apr 25, 2026https://github.com/python/cpython/issues/129813#event-24868326789
pythongh-129813: Document that PyBytesWriter_GetData() cannot fail (p…https://github.com/ljfp/cpython/commit/d64f0f42395eab712052006b88c4c55f2763916c
pythongh-129813https://github.com/python/cpython/issues/129813
p…https://github.com/python/cpython/pull/145900
d64f0f4https://github.com/ljfp/cpython/commit/d64f0f42395eab712052006b88c4c55f2763916c
vstinnerhttps://github.com/vstinner
on Sep 5, 2026https://github.com/python/cpython/issues/129813#event-30605079437
gh-129813: Fix typo in byteswriter_resize() (#156938)https://github.com/python/cpython/commit/5141621d44e8ee88d97a5b8b225c8a32e7a343f0
gh-129813https://github.com/python/cpython/issues/129813
#156938https://github.com/python/cpython/pull/156938
5141621https://github.com/python/cpython/commit/5141621d44e8ee88d97a5b8b225c8a32e7a343f0
hugovkhttps://github.com/hugovk
on Sep 5, 2026https://github.com/python/cpython/issues/129813#event-30610380798
[3.15] gh-129813: Fix typo in byteswriter_resize() (GH-156938) (#156979)https://github.com/python/cpython/commit/4c23df56f2fc7a6821bedc0a8670338c09d5fab9
gh-129813https://github.com/python/cpython/issues/129813
GH-156938https://github.com/python/cpython/pull/156938
#156979https://github.com/python/cpython/pull/156979
4c23df5https://github.com/python/cpython/commit/4c23df56f2fc7a6821bedc0a8670338c09d5fab9
vstinnerhttps://github.com/vstinner
on Sep 9, 2026https://github.com/python/cpython/issues/129813#event-30845739013
pythongh-129813: Check size in PyBytesWriter_FinishWithSize()https://github.com/vstinner/cpython/commit/b83919225cb9028d46ed343106eeb7622eddccbc
pythongh-129813https://github.com/python/cpython/issues/129813
b839192https://github.com/vstinner/cpython/commit/b83919225cb9028d46ed343106eeb7622eddccbc
pythongh-129813: Check size in PyBytesWriter_FinishWithSize()https://github.com/vstinner/cpython/commit/07185dfe86fb7c795e9a47f11e2de8ffef10d3a1
pythongh-129813https://github.com/python/cpython/issues/129813
07185dfhttps://github.com/vstinner/cpython/commit/07185dfe86fb7c795e9a47f11e2de8ffef10d3a1
gh-129813: Check size in PyBytesWriter_FinishWithSize() (#157226)https://github.com/python/cpython/commit/4e530b82f37ec89e3b54bc5d0a1612c643bff1e0
gh-129813https://github.com/python/cpython/issues/129813
#157226https://github.com/python/cpython/pull/157226
4e530b8https://github.com/python/cpython/commit/4e530b82f37ec89e3b54bc5d0a1612c643bff1e0
clin1234https://github.com/clin1234
on Sep 12, 2026https://github.com/python/cpython/issues/129813#event-31023917431
pythongh-129813: Fix typo in byteswriter_resize() (python#156938)https://github.com/clin1234/cpython/commit/d810c2adfe41f592543b8b137541a43499e64c83
pythongh-129813https://github.com/python/cpython/issues/129813
python#156938https://github.com/python/cpython/pull/156938
d810c2ahttps://github.com/clin1234/cpython/commit/d810c2adfe41f592543b8b137541a43499e64c83
pythongh-129813: Check size in PyBytesWriter_FinishWithSize() (python…https://github.com/clin1234/cpython/commit/aac317c9cd6ad021ef969a4313e61765c89d77ef
pythongh-129813https://github.com/python/cpython/issues/129813
python…https://github.com/python/cpython/pull/157226
aac317chttps://github.com/clin1234/cpython/commit/aac317c9cd6ad021ef969a4313e61765c89d77ef
johnslavikhttps://github.com/johnslavik
on Sep 14, 2026https://github.com/python/cpython/issues/129813#event-31099054245
pythongh-129813: Check size in PyBytesWriter_FinishWithSize() (python…https://github.com/johnslavik/cpython/commit/3d36fb82fe2b13a763e62bcc66e1b68d79dd69cd
pythongh-129813https://github.com/python/cpython/issues/129813
python…https://github.com/python/cpython/pull/157226
3d36fb8https://github.com/johnslavik/cpython/commit/3d36fb82fe2b13a763e62bcc66e1b68d79dd69cd
vstinnerhttps://github.com/vstinner
on Oct 12, 2026https://github.com/python/cpython/issues/129813#event-33082366889
[3.15] gh-129813: Check size in PyBytesWriter_FinishWithSize() (#157226…https://github.com/python/cpython/commit/c38a347e2c3199d7d3f6a9eefbf46df52caf725d
gh-129813https://github.com/python/cpython/issues/129813
#157226https://github.com/python/cpython/pull/157226
c38a347https://github.com/python/cpython/commit/c38a347e2c3199d7d3f6a9eefbf46df52caf725d
vstinnerhttps://github.com/vstinner
on Nov 19, 2026https://github.com/python/cpython/issues/129813#event-36634170432
gh-129813: Use `PyBytesWriter` for strided mmap slices (#162257)https://github.com/python/cpython/commit/9f205da816fbfff43d8eb9cc3e55fefdf4fad366
gh-129813https://github.com/python/cpython/issues/129813
#162257https://github.com/python/cpython/pull/162257
9f205dahttps://github.com/python/cpython/commit/9f205da816fbfff43d8eb9cc3e55fefdf4fad366
gh-129813: Use `PyBytesWriter` in `ctypes` (#162260)https://github.com/python/cpython/commit/3edcc345c3adba410821ecd74ec8e38fc96fa774
gh-129813https://github.com/python/cpython/issues/129813
#162260https://github.com/python/cpython/pull/162260
3edcc34https://github.com/python/cpython/commit/3edcc345c3adba410821ecd74ec8e38fc96fa774
gh-129813: Use `PyBytesWriter` in `binascii` (#162259)https://github.com/python/cpython/commit/03e7a8854d714fabb3ab5b8c8f984fc1214f65b0
gh-129813https://github.com/python/cpython/issues/129813
#162259https://github.com/python/cpython/pull/162259
03e7a88https://github.com/python/cpython/commit/03e7a8854d714fabb3ab5b8c8f984fc1214f65b0
gh-129813: Use PyBytesWriter in _testbuffer (#162297)https://github.com/python/cpython/commit/6957e70879d1c8e4ee8fdcec11f8cb9d7f83c0fc
gh-129813https://github.com/python/cpython/issues/129813
#162297https://github.com/python/cpython/pull/162297
6957e70https://github.com/python/cpython/commit/6957e70879d1c8e4ee8fdcec11f8cb9d7f83c0fc
Sign up for freehttps://github.com/signup?return_to=https://github.com/python/cpython/issues/129813
Sign in to commenthttps://github.com/login?return_to=https://github.com/python/cpython/issues/129813
topic-C-APIhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22topic-C-API%22
type-featureA feature request or enhancementhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-feature%22
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.