You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
refactor(corekit)!: move utilities.decorators into corekit, and state the corekit/utilities rule (#1712, option A) #1735
Describe the bug
Under the placement rule chosen on #1712 (option A), utilities holds cross-cutting services that import nothing from pcapkit outside utilities, and corekit holds the types the packet model is built from. pcapkit/utilities/decorators.py breaks that rule:
seekset, beholder and prepare act on Protocol._file and _seekset;
beholder lazily imports protocols.misc.null and protocols.misc.raw (decorators.py:130-132).
Expected behavior
The move:decorators.py moves to pcapkit/corekit/decorators.py, with no re-export left behind (the ruling on refactor(corekit)!: move the byte-order field helpers into corekit (#1711) #1715). Every importer updates its path: protocols/protocol.py, internet/internet.py, internet/ipv6.py, schema/schema.py, plus the tests and docs.
What breaks:pcapkit.utilities.{seekset,beholder,prepare} and the logger name pcapkit.utilities.decorators. Subject refactor(corekit)!:, labelled breaking.
No new import cycle: the module's top-level imports are only utilities.exceptions and utilities.logging. Do not re-export it from utilities/__init__.
Write the rule down:docs/source/contributing/conventions/ gains the rule, with a project test enforcing it: no module under pcapkit/utilities/ imports from pcapkit outside utilities, whether at top level, inside a function or under TYPE_CHECKING.
Blocked until #1730 merges. It also edits protocol.py's import lines.
Activity
JarryShaw commentedon Oct 14, 2026
#1730 has merged, so this is unblocked. A worker is on it.