Repository navigation
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7d58fb9782
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| @unittest.skipUnless(sys.platform == 'win32', | ||
| 'COM callback argument handling is Windows-only') | ||
| def test_argument_conversion_error_does_not_leak(self): |
There was a problem hiding this comment.
Please remove this. Tests that check for leaks are often fragile, complicated, and not very useful in practice (because it's unlikely that an exact code path will leak again).
| static int | ||
| TryAddRef(PyObject *cnv, CDataObject *obj) | ||
| NeedsComAddRef(PyObject *cnv) | ||
| { |
There was a problem hiding this comment.
Why is this PR doing extra refactoring? The proposed fix in the issue (adding a single Py_DECREF) seems fine.
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
|
Thank you for your interest in contributing to Python. This is a community-driven project, and we want it to be a welcoming place to learn and collaborate. Contributors are responsible for reviewing and understanding what they submit, checking its claims, and being able to explain changes in their own words. This helps reviewers focus on the contribution and leaves more time to support other contributors. This contribution appears to have been authored with AI assistance. Please explain your contribution in your own words and describe how you checked its correctness. Please read our guidelines for using AI tools. |
Fixes#162412.Release the current callback argument when
TryAddRef()fails on Windows. The shared cleanup loop releases only the arguments converted before the failure.The Windows regression test checks that the callback is skipped and that the temporary arguments are released. The test method failed at the weak-reference assertion on stock CPython 3.14.10 (Windows x64) and passed on a local 3.14.10 build with the fix. The standalone probe reported 128 retained arguments before the fix and zero after it.