Skip to content

refactor(utilities): rename utilities.lazy to utilities.importlib #2747

Closed

Description

@JarryShaw

The owner asked in session to rename pcapkit.utilities.lazy, added by #2735 for #2729, to pcapkit.utilities.importlib or simply imp.

Taking importlib. It follows the stdlib-domain precedent set by pcapkit.utilities.pickle (#2722). imp is the name of the stdlib module removed in Python 3.12, so reusing it invites confusion. Say if you would rather have imp.

Scope

  • Move pcapkit/utilities/lazy.py to pcapkit/utilities/importlib.py. lazy_exports keeps its name.
  • Update every import site in the pcapkit.const packages, plus the tests.
  • Rename docs/source/pcapkit/utilities/lazy.rst to importlib.rst, and update its toctree entry and every :mod: / :func: reference, including const-vendor-pairing.rst.
  • utilities.lazy was never released, so the old path gets no re-export, no deprecation note and no mention anywhere.
  • The protocols follow-up perf(protocols): import the protocol, schema and data packages lazily #2730 will use the new name.

Activity

  1. added
    refactorRestructuring for its own sake — neither a fix nor a new capability (refactor: prefix)
    wipWork in flight - a covering PR is open or an agent is actively on it
    on Nov 3, 2026
  2. JarryShaw commented on Nov 3, 2026

    @JarryShaw
    OwnerAuthor

    A fix is in progress on a branch off dea098b15. It does the module move, the docs page rename and every import site, and checks that the stdlib importlib is still the one resolved after import pcapkit. The docs build stays at zero warnings.

  3. added this to the PyPCAPKit v1.6 milestone on Nov 3, 2026
  4. JarryShaw commented on Nov 3, 2026

    @JarryShaw
    OwnerAuthor

    The PR is #2748.

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

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions