Skip to content

fix(foundation): an abandoned extraction keeps its file open on GraalPy, which never calls __del__ #1997

Closed

Description

@JarryShaw

On GraalPy, an extraction abandoned before EOF (auto=False, stopped early) never releases the file it opened. Extractor.__del__, the #606 backstop that closes it, is never called there.

Possible fix: register the backstop with weakref.finalize on the owned stream instead of, or as well as, __del__. This changes pcapkit/foundation/extraction.py, so it needs a test on both interpreters.

Activity

  1. added
    bugIssues reporting a defect (set by the bug report template; a default, not an assessment)
    fixPull requests that fix a defect (fix: subject prefix)
    pendingAccepted and unstarted - nobody is on it and nothing blocks it
    on Oct 20, 2026
  2. added
    wipWork in flight - a covering PR is open or an agent is actively on it
    and removed
    pendingAccepted and unstarted - nobody is on it and nothing blocks it
    on Oct 20, 2026
  3. removed
    wipWork in flight - a covering PR is open or an agent is actively on it
    on Oct 20, 2026
  4. added this to the PyPCAPKit v1.5 milestone on Oct 26, 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

    bugIssues reporting a defect (set by the bug report template; a default, not an assessment)fixPull requests that fix a defect (fix: subject prefix)

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions