Skip to content

refactor(toolkit): toolkit/pcapng.py imports the private _tcp_segment from toolkit/pcap.py #1570

Closed

Description

@JarryShaw

pcapkit/toolkit/pcapng.py:21 imports a private helper from another module: from pcapkit.toolkit.pcap import _tcp_segment. That is the pattern #1519 set out to remove. The import arrived with #1556 (e2be74f71) on 2026-10-10, after #1519's inventory was drawn up, so nothing tracks it. The #1568 cross-review found it.

On main (a3da376dd), _tcp_segment is defined at toolkit/pcap.py:64. It is used at toolkit/pcap.py:273 and :320, and at toolkit/pcapng.py:167 and :216.

Expected: give the helper a public home, chosen by usage under #1519's rulings. #1525's test_start_line precedent made a helper public in the base module that both callers already import. Update both callers, and document the helper under docs/source/.

Activity

  1. added
    refactorRestructuring for its own sake — neither a fix nor a new capability (refactor: prefix)
    pendingAccepted and unstarted - nobody is on it and nothing blocks it
    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 10, 2026
  2. removed
    wipWork in flight - a covering PR is open or an agent is actively on it
    on Oct 10, 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

    refactorRestructuring for its own sake — neither a fix nor a new capability (refactor: prefix)

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions