Skip to content

fix(registry): a custom protocol's name stays in pcapkit.protocols.__proto__ after it is unregistered #1505

Closed

Description

@JarryShaw

Describe the bug
Registering a custom protocol adds its name to the global protocol registry, and nothing removes it when the shipped entry is restored.

Reproduction
In the #1202 repro (register_tcp(80, Custom) then register_tcp(80, shipped)), 'CUSTOM' in pcapkit.protocols.__proto__ goes from False to True and stays True.

Expected behavior
Restoring the shipped entry leaves pcapkit.protocols.__proto__ as it was before.

System information
Linux, CPython 3.14.7, main at 00aa1fc90.

Additional context
pcapkit/foundation/registry/protocols.py:235 adds the name (protocol_registry[name] = protocol, reached from e.g. :416). There is no corresponding removal.

Found by the #1202 foundation round-trip slice; reproduced on main.

Activity

  1. added
    fixPull requests that fix a defect (fix: subject prefix)
    pendingAccepted and unstarted - nobody is on it and nothing blocks it
    on Oct 9, 2026
  2. JarryShaw commented on Oct 9, 2026

    @JarryShaw
    OwnerAuthor

    Blocked until the #1202 foundation-slice test PR (branch test/1202-foundation-roundtrips) merges. That PR adds this defect's Gap row, and the fix must delete the row.

  3. added
    blockedDeferred pending another issue or decision; see the last comment for what unblocks it
    and removed
    pendingAccepted and unstarted - nobody is on it and nothing blocks it
    on Oct 9, 2026
  4. JarryShaw commented on Oct 9, 2026

    @JarryShaw
    OwnerAuthor

    Unblocked: #1508 has merged, so this defect's known-failure row is on main. A worker is on the fix, and the fix PR deletes the row.

  5. added
    wipWork in flight - a covering PR is open or an agent is actively on it
    and removed
    blockedDeferred pending another issue or decision; see the last comment for what unblocks it
    on Oct 9, 2026
  6. moved this from Blocked to WIP in PyPCAPKiton Oct 9, 2026
  7. 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

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

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions