Repository navigation
refactor(pcapng)!: rename PCAPNG.context to section_context (#2172) - #2205
Merged
Merged
Conversation
PCAPNG.context overrode ProtocolBase.context with a different type: it returned the block's section Context (raising UnsupportedCall on a Section Header Block), so a PCAP-NG block could not reach the caller supplied ContextRegistry. This breaks the property as released in 1.4.x. Rename the property to section_context, with no alias, so context falls back to the base contract. A versionchanged note on PCAPNG tells 1.4.x users where the section context went; pcapng.rst documents section_context. Tests: the SHB-raises and section-context assertions read section_context; a new test checks PCAPNG.context returns the base ContextRegistry copy of _exctx on both a Section Header Block and a packet block.
Owner
Author
|
Review: GOOD TO GO at
|
Contributor
|
Coverage: 91.55% (unit tier, Python 3.15,
Per-file detail: the |
Owner
Author
|
Ready to merge at
|
This was referenced Oct 25, 2026
JarryShaw
added a commit
that referenced
this pull request
Oct 25, 2026
- Add 1.5.0 entries for the round-5 merges with user-visible effect: the breaking PCAPNG.context rename to section_context (#2172, #2205) with its migration line; the registrar code check (#2186); the corekit exports and ListField/SchemaField copy fixes (#2174, #2173); and the ARP, Quick-Start/Fast Open, PCAP-NG, IPX, HIP and message fixes (#2166-#2171). - Correct the systemd journal entries (#678, #704, #723, #794) to the strict walk: a malformed entry keeps the block as captured (#1406). - Restate entries without review/CI process narrative or "unfixed tree". - Extend the intro's cited range to #2205; regenerate CHANGELOG.md.
JarryShaw
added a commit
that referenced
this pull request
Oct 26, 2026
- Add 1.5.0 entries for the round-5 merges with user-visible effect: the breaking PCAPNG.context rename to section_context (#2172, #2205) with its migration line; the registrar code check (#2186); the corekit exports and ListField/SchemaField copy fixes (#2174, #2173); and the ARP, Quick-Start/Fast Open, PCAP-NG, IPX, HIP and message fixes (#2166-#2171). - Correct the systemd journal entries (#678, #704, #723, #794) to the strict walk: a malformed entry keeps the block as captured (#1406). - Restate entries without review/CI process narrative or "unfixed tree". - Extend the intro's cited range to #2205; regenerate CHANGELOG.md.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
make testpasses, and a test case covers the changeWhat is the purpose of your pull request?
refactor— restructures code without changing intended behaviourDescription
Closes #2172. The owner picked option 1, so the PCAP-NG property is renamed and no longer collides with
ProtocolBase.context.PCAPNG.contextreturned the block's sectionContextin 1.3.x and 1.4.x. It is renamedsection_context, with no alias, and it still raisesUnsupportedCallon a Section Header Block.PCAPNG.contextnow falls back toProtocolBase.context, which is the caller-suppliedContextRegistry.versionchanged:: 1.5.0note on thePCAPNGclass tells 1.4.x users where the section context went.section_contextcarriesversionadded:: 1.5.0, andpcapng.rstdocuments it.test_pcapng_unit.pyreadsection_context.contextis a freshContextRegistrycopy that equals the base property's value.main, 3 fail: the old SHB test, the new test, and itssection_contextsubtest.pcapkit/,docs/orexamples/read the old property.