Repository navigation
Raise OverflowError for oversized pickle lengths - #9040
Conversation
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
📒 Files selected for processing (2)
✨ Finishing Touches
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. Comment |
Preserve the wrapper-pickle regressions merged into main while refreshing the independent length checks. Assisted-by: OpenAI Codex:model identifier unavailable
7bcc37e to
ee9664f
Compare
Codex Review SummaryThis 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: ee9664f9bd
ℹ️ 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 _pickle.loads(_pickle.dumps(object.__str__)) is object.__str__ | ||
|
|
||
| # Oversized advertised lengths are rejected before trying to read or allocate. | ||
| for opcode, name in ( |
There was a problem hiding this comment.
Remove the forbidden test-logic changes
This block adds new test data, control flow, and assertions to a test file, but the repository rules restrict test-file changes to adding or removing expectedFailure decorators. Revert or relocate this regression block rather than changing test logic here so the patch complies with the required test policy.
AGENTS.md reference: AGENTS.md:L273-L279
Useful? React with 👍 / 👎.
Raise
OverflowErrorwith CPython 3.14's messages when advertised pickle lengths exceed the platform maximum. Preserve the existing rejection before payload reads or allocation.Extracted from #8954. The existing pickle snippet uses only 11-byte headers to cover bytes, Unicode, and frame lengths through both load entry points. Canonical assertions remain unchanged.
Validation:
UnpicklingErrorinstead.AI-assisted implementation, tests, and review with OpenAI Codex. Kept as a draft for CI and maintainer review.
Main-branch conflict refresh (2026-10-10)
Rebased the independent change onto main
c516ca95dfd77ea76ac4df2b152aca9e88d3a6bcafter #9037 added wrapper-pickle coverage at the same snippet append point. Both regression blocks are preserved unchanged; the production file is byte-identical to the original PR head. Independent review and AST/byte preservation checks passed.Normal hooks, the complete existing pickle snippet on CPython 3.14.7 and the native candidate, both snippet pytest entries, four unchanged canonical unpickler tests, stdlib Clippy and separately configured CAPI Clippy passed on the refreshed head. The previously green CI applies to the old head only; fresh exact-head CI is required.