Enhance pickle compatibility: support legacy tuple state and maintain…#4982
Merged
polybassa merged 3 commits intosecdev:masterfrom Apr 27, 2026
Merged
Enhance pickle compatibility: support legacy tuple state and maintain…#4982polybassa merged 3 commits intosecdev:masterfrom
polybassa merged 3 commits intosecdev:masterfrom
Conversation
… packet metadata during serialization The new regression tests protect against breaking older pickle payloads by ensuring legacy tuple-state unpickling still works. They also lock in current behavior for the new state format by checking full metadata and comments fidelity after pickle roundtrip. This gives coverage for both backward compatibility and current serialization behavior in one place: test/regression.uts.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #4982 +/- ##
==========================================
- Coverage 80.27% 80.26% -0.01%
==========================================
Files 382 382
Lines 94349 94362 +13
==========================================
+ Hits 75736 75739 +3
- Misses 18613 18623 +10
🚀 New features to boost your workflow:
|
Contributor
Author
|
@guedou I've encountered a problem that "old" pickled values can not be unpickled anymore. I've added support for the legacy pickle structure. |
guedou
approved these changes
Apr 26, 2026
Member
guedou
left a comment
There was a problem hiding this comment.
Looks good to me, but I don't understand why we need to have backwards compatibility for this feature.
Contributor
Author
|
I stumbled over it when un-pickling older objects. I would help me for some use cases, if we stay backward compatible. |
Member
|
I really don’t feel that we should keep both serialization methods.Sent from my iPhoneOn 27 Apr 2026, at 19:29, Nils Weiss ***@***.***> wrote:polybassa left a comment (secdev/scapy#4982)
I stumbled over it when un-pickling older objects. I would help me for some use cases, if we stay backward compatible.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
… packet metadata during serialization
The new regression tests protect against breaking older pickle payloads by ensuring legacy tuple-state unpickling still works. They also lock in current behavior for the new state format by checking full metadata and comments fidelity after pickle roundtrip. This gives coverage for both backward compatibility and current serialization behavior in one place: test/regression.uts.
Checklist :
tox)I understand that failing to mention the use of AI may result in a ban. (We do not forbid it, but you must play fair. Be warned !)
fixes #xxx