You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(toolkit): a copied or unpickled DecimalTimestamp loses orig_len on Python 3.15 #1647
On Python 3.15.0, a copy.deepcopy and/or pickle round trip of pcapkit.toolkit.dpkt.DecimalTimestamp loses orig_len. The clone compares equal to the original, but its (exact, resolution, orig_len) is (Decimal('1500000000.000774789'), 1000000000, None); the original's is (..., 78). Timestamp, the float form, keeps orig_len. Python 3.11-3.14 pass.
Repro:tests/toolkit/test_engine_pcap_trace_runtime.py::DPKTTimestampTests::test_copies_and_arithmetic_keep_working, subtest DecimalTimestamp. It failed on #1645's Integration Python 3.15 leg (job 115150227943, run 38353246360). That leg is the first blocking 3.15 run; the old schedule-only 3.15 compat job was allowed to fail, so nothing caught this before.
Expected: a copied or unpickled DecimalTimestamp keeps exact, resolution and orig_len on every supported Python. The likely cause is a change to decimal.Decimal's reduce/copy protocol in 3.15; it will be established before the fix.
Activity
fix(toolkit): a copied DecimalTimestamp keeps orig_len under _pydecim…