Skip to content

fix(utilities): hold_warnings is public but missing from pcapkit.utilities.warnings.__all__ #1602

Closed

Description

@JarryShaw

pcapkit.utilities.warnings.hold_warnings is public: it is documented by .. autoclass:: in docs/source/pcapkit/utilities/functools.rst:46 and imported by pcapkit/protocols/protocol.py:53. But it is missing from that module's __all__ (pcapkit/utilities/warnings.py:78). That list has 24 entries, warn and all 23 warning classes, measured on main 4ee525e21. As a result, from pcapkit.utilities.warnings import * does not bring it in. The stdlib exports its counterpart warnings.catch_warnings the same way.

Change: add 'hold_warnings' beside 'warn', with a test that fails without it. Per the ruling on #1599 the name stays lowercase.

Found by the #1601 cross-review; I verified the 24 entries by AST.

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 10, 2026
  2. removed
    wipWork in flight - a covering PR is open or an agent is actively on it
    on Oct 10, 2026
  3. 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

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

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions