Skip to content

fix(toolkit): a copied or unpickled DecimalTimestamp loses orig_len on Python 3.15 #1647

Closed

Description

@JarryShaw

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

  1. added
    fixPull requests that fix a defect (fix: subject prefix)
    wipWork in flight - a covering PR is open or an agent is actively on it
    on Oct 13, 2026
  2. removed
    wipWork in flight - a covering PR is open or an agent is actively on it
    on Oct 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    fixPull requests that fix a defect (fix: subject prefix)

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions