Repository navigation
Match codec and timer signature defaults to Python 3.15 - #9741
Conversation
Assisted-by: OpenAI Codex: model version not exposed
Assisted-by: OpenAI Codex: model version not exposed
|
Caution Review failedThe pull request is closed.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
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: 6e9cd8fa39
ℹ️ 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".
| assert zlib._ZlibDecompressor().decompress(zlib.compress(b"signature defaults")) == ( | ||
| b"signature defaults" | ||
| ) |
There was a problem hiding this comment.
Avoid duplicating the existing zlib round-trip test
This round-trip assertion duplicates ZlibDecompressorTest.testDecompress in Lib/test/test_zlib.py:1051–1065: both compress bytes, construct _ZlibDecompressor() with its defaults, and verify the decompressed result. It adds no signature-specific coverage and violates AGENTS.md's explicit prohibition on adding snippet tests that duplicate Lib/test coverage. Keep the new signature assertions and rely on the existing standard-library test for runtime-default validation.
AGENTS.md reference: AGENTS.md:L119-L119
Useful? React with 👍 / 👎.
Summary
Match the displayed defaults of five native APIs to CPython 3.15.0's Argument Clinic declarations:
binascii.hexlifyand itsb2a_hexalias:bytes_per_sep=1.signal.setitimer:interval=0.0.zlib.compressobj:zdict=<unrepresentable>, notNone(an explicitNoneis rejected).zlib._ZlibDecompressor: the symbolicwbits=MAX_WBITSdefault.These changes use the existing
FromArgssignature metadata. They preserve optional sentinels, argument conversion order and ownership; no common runtime mechanism or extra argument checks are introduced. The_ZlibDecompressorruntime default remainsMAX_WBITS.The existing signature snippet checks the raw default spellings (normalizing Clinic's line wrapping), inspect's resolved defaults where representable, and omitted-versus-explicit dictionary behavior.
Reference
Compared directly with the generated Clinic headers at CPython v3.15.0:
Modules/clinic/binascii.c.hModules/clinic/signalmodule.c.hModules/clinic/zlibmodule.c.hValidation
test_binascii,test_zlib,test_signal,test_inspect: 760 tests, 93 skipped, passed.CPython 3.15 execution will be checked by the existing CI snippet job; local comparisons against older CPython versions are not being used as the reference.