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!: remove every surviving re-export of a moved name or module #1744
Is your feature request related to a problem? Please describe.
The owner's rulings on #1103 (2026-10-14): TLSKeyLabel keeps no fallback re-export, and no moved name or module keeps any re-export. #1715's no-re-export rule was applied to every move made after it, but a few re-exports from earlier moves survive. The #1103 inventory found these:
byteorder_callback, still importable from protocols.schema.misc.pcap.frame and .pcapng
Describe the solution you'd like
Take a complete inventory of every name or module that moved in 1.5.0 and is still importable from its old path. Remove each of those paths and point every reader at the new home. A path that shipped in a 1.4.x release gets versionremoved:: 1.5.0; a name that existed only in the betas gets none, per the same ruling. The change is breaking. A guard test then fails on any old path that is still importable.
Inventory, read-only, on main at 0cdd3cdd1. 18 old paths still resolve. 7 shipped in 1.4.x and get versionremoved:: 1.5.0: TLSKeyLabel, field.NoValueType, registry NULL, httpv1._RE_*, byteorder_callback ×2, and tcp/udpPortEnumField. 11 are beta-only and get deleted outright: the NO_VALUE/NO_DEFAULT/NULL/ABSENT sentinel re-exports, DeferredPacket ×3, the NGAP aliases, and four schema helpers.
Five questions first, with the default I'd take:
#
Question
Default
D1
Nine of the paths are incidental: the module imports the name for its own use, so the old path resolves only as a side effect. An example is schema.misc.pcapng.byteorder_callback, which is used 82 times. Do they count?
Yes: import the module, not the name, so the old path stops resolving
D2
corekit.module._get_null is a pickle shim, not a re-export. Only 1.5.0b5/b6 could have written pickles that need it
Remove it, since betas count toward the next release
D3
Package aggregations whose home moved inside the package: const.reg.apptype.AppType (79 readers), reassembly.data.ReassemblyData, traceflow.data.TraceFlowData
Keep them; they are the documented package paths
D4
Registry NULL was the string '(null)' in 1.4.x and is now the sentinel, so it is a different object
versionchanged, not versionremoved
D5
Private _RE_* names shipped in 1.4.x
No directive for private names
This also overturns #911's per-module re-export design, written up in sentinel-convention.rst:38-44 and the corekit/sentinels.py docstring. Both get rewritten. The removal PR starts after #1739 lands, because it edits the same protocols/** files.
D1 - from new_module import name is fine and the exposure is expected.
D2 - remove if they're no longer used by the library
D3 - what's exactly moved? i think D1 should still answer this.
D4 - versionchanged
D5 - since private and not added in Sphinx docs, no need to add directives
D1: an ordinary from new_module import name stays. The old path resolving through it is expected, so the nine incidental entries (3–7, 15–18) are kept.
D2:_get_null goes if nothing in pcapkit still uses it. Tests and pickle compatibility don't count.
D3: covered by D1. const.reg.apptype and the reassembly/traceflowdata packages import from their own submodules, so they stay. What moved there:
D4: registry NULL gets versionchanged:: 1.5.0. It was the string '(null)' in 1.4.x and is now the sentinel.
D5: private names not in the Sphinx docs get no directive.
That leaves the explicit re-exports to remove:
the TLSKeyLabel alias;
the NGAP ProcedureCode and ProtocolIE aliases;
NO_VALUE in corekit.fields.field's __all__, NO_DEFAULT in corekit.enum's, and NULL in corekit.module's;
ABSENT in protocols.protocol, which is documented as a re-export;
DeferredPacket from the three __all__ lists;
_get_null, unless the library still uses it.
sentinel-convention.rst is rewritten to match: consumers import from corekit.sentinels, and never list a sentinel in their own __all__ or document it as theirs. This starts once #1739 merges, because both edit protocols/misc/pcapng.py.
A worker is on this, stacked on #1752's branch because both edit protocols/misc/pcapng.py. Its PR opens once #1752 merges and the branch is rebased onto main. Scope per D1–D5: only explicit re-exports go (inventory #1, #2, #8–#14, plus the D4 directive on #3), and the incidental imports stay.
Activity
JarryShaw commentedon Oct 14, 2026
Inventory, read-only, on
mainat0cdd3cdd1. 18 old paths still resolve. 7 shipped in 1.4.x and getversionremoved:: 1.5.0:TLSKeyLabel,field.NoValueType, registryNULL,httpv1._RE_*,byteorder_callback×2, andtcp/udpPortEnumField. 11 are beta-only and get deleted outright: theNO_VALUE/NO_DEFAULT/NULL/ABSENTsentinel re-exports,DeferredPacket×3, the NGAP aliases, and four schema helpers.Five questions first, with the default I'd take:
schema.misc.pcapng.byteorder_callback, which is used 82 times. Do they count?corekit.module._get_nullis a pickle shim, not a re-export. Only 1.5.0b5/b6 could have written pickles that need itconst.reg.apptype.AppType(79 readers),reassembly.data.ReassemblyData,traceflow.data.TraceFlowDataNULLwas the string'(null)'in 1.4.x and is now the sentinel, so it is a different objectversionchanged, notversionremoved_RE_*names shipped in 1.4.xThis also overturns #911's per-module re-export design, written up in
sentinel-convention.rst:38-44and thecorekit/sentinels.pydocstring. Both get rewritten. The removal PR starts after #1739 lands, because it edits the sameprotocols/**files.JarryShaw commentedon Oct 14, 2026
D1 -
from new_module import nameis fine and the exposure is expected.D2 - remove if they're no longer used by the library
D3 - what's exactly moved? i think D1 should still answer this.
D4 -
versionchangedD5 - since private and not added in Sphinx docs, no need to add directives
JarryShaw commentedon Oct 14, 2026
Recorded:
from new_module import namestays. The old path resolving through it is expected, so the nine incidental entries (3–7, 15–18) are kept._get_nullgoes if nothing inpcapkitstill uses it. Tests and pickle compatibility don't count.const.reg.apptypeand thereassembly/traceflowdatapackages import from their own submodules, so they stay. What moved there:AppTypemoved from theconst/reg/apptype.pymodule into theconst/reg/apptype/package (feat(reg)!: split AppType into per-transport registries, dropping the portless rows #754);ReassemblyDataandTraceFlowDatamoved fromdata/__init__.pyintodata/data.py(reassembly: make the four IPv6 adapters agree, and analyse datagram payloads lazily #424).NULLgetsversionchanged:: 1.5.0. It was the string'(null)'in 1.4.x and is now the sentinel.That leaves the explicit re-exports to remove:
TLSKeyLabelalias;ProcedureCodeandProtocolIEaliases;NO_VALUEincorekit.fields.field's__all__,NO_DEFAULTincorekit.enum's, andNULLincorekit.module's;ABSENTinprotocols.protocol, which is documented as a re-export;DeferredPacketfrom the three__all__lists;_get_null, unless the library still uses it.sentinel-convention.rstis rewritten to match: consumers import fromcorekit.sentinels, and never list a sentinel in their own__all__or document it as theirs. This starts once #1739 merges, because both editprotocols/misc/pcapng.py.JarryShaw commentedon Oct 15, 2026
A worker is on this, stacked on #1752's branch because both edit
protocols/misc/pcapng.py. Its PR opens once #1752 merges and the branch is rebased ontomain. Scope per D1–D5: only explicit re-exports go (inventory #1, #2, #8–#14, plus the D4 directive on #3), and the incidental imports stay.