FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-156939: Fix Modules/_testcapi/bytes.c: remove double Py_DECREF by vstinner · Pull Request #158400 · python/cpython · GitHub

Repository navigation

gh-156939: Fix Modules/_testcapi/bytes.c: remove double Py_DECREF - #158400

Merged
vstinner merged 1 commit into
python:mainfrom
vstinner:fix_testcapi_bytes
Sep 29, 2026
Merged

vstinner merged 1 commit into
python:mainfrom
vstinner:fix_testcapi_bytes

Conversation

vstinner commented Sep 29, 2026 •
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Member

Remove a spurious Py_DECREF(writer_type) in _PyTestCapi_Init_Bytes() that over-decremented the reference after it was already released. Also fix writer_discard method flags (METH_VARARGS -> METH_NOARGS), a typo, and PEP 7 spacing in for-loop initializers.

Remove a spurious Py_DECREF(writer_type) in _PyTestCapi_Init_Bytes()
that over-decremented the reference after it was already released.
Also fix writer_discard method flags (METH_VARARGS -> METH_NOARGS),
a typo, and PEP 7 spacing in for-loop initializers.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
bedevere-app Bot added the type-feature A feature request or enhancement label Sep 29, 2026
vstinner added needs backport to 3.15 pre-release feature fixes, bugs and security fixes and removed type-feature A feature request or enhancement labels Sep 29, 2026
vstinner merged commit 90d4002 into python:main Sep 29, 2026
58 of 62 checks passed
vstinner deleted the fix_testcapi_bytes branch September 29, 2026 11:56

Copy link
Copy Markdown

Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.15.
🐍🍒⛏🤖

Copy link
Copy Markdown

Sorry, @vstinner, I could not cleanly backport this to 3.15 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 90d40027f75cb096ac9abf85f3fb6a2a13b21824 3.15

vstinner removed the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Sep 29, 2026

Copy link
Copy Markdown
Member Author

Ah, the discard() test method was not backported to 3.15 branch yet. I will backport it later with other PyBytesWriter changes.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant


Back | FazBrowse Home | New Git URL