Repository navigation
fix(protocols): export Protocol from pcapkit.protocols.protocol (#1770) - #1778
Merged
Merged
Conversation
- protocol.py: __all__ listed only ProtocolBase, so a star-import did not bind Protocol, the module's user-facing class. It now lists both. ProtocolMeta stays out, as protocol.rst files it under Internal Definitions. - The registry error still names Protocol while the guard tests ProtocolBase. That gap is deliberate: the message's reader is a third party, who should subclass the public class (#1016). - New test_protocol_module_exports_1770_unit.py pins __all__ and the star-import, and that a non-Protocol built-in passes the guard. Narrow runs and tests/project (930 passed, 1 skipped) pass. Closes #1770
Owner
Author
|
Verdict: GOOD TO GO at |
This was referenced Oct 15, 2026
JarryShaw
added a commit
that referenced
this pull request
Oct 15, 2026
…1803) Entries: - add #1791 (breaking: pack() leaves its instance unchanged), #1778 (Protocol in protocol.__all__), #1781 (PortEnumField miss with a nameless proto), #1779 (vendor.ipx _path), #1780 (examples READMEs to Markdown, build leftovers) and #1790 (36 ambiguous cross-references) - fold #1776 into the RPL 0x23 entry and #1381 into the dump-schema one Accuracy: - the benchmark and legacy_smoke READMEs are README.md since #1780 - EngineBase stays out of __all__, as #1016 settled - the #575 peek calls get() only once the value resolves - the #647 and #764 entries point at #775/#860, under which nothing mints - the #861 entry names #869 and #874 for the EnumRegistry move Figures: - preamble: 685 citations, #340 to #1791 - process.rst pin: 298 entries; CHANGELOG.md regenerated Refs #1103
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.
Please follow the guide below
You will be asked some questions, please read them carefully and answer honestly
Put an
xinto all the boxes [ ] relevant to your pull request (like that [x])Use Preview tab to see how your pull request will actually look like
Searched for similar pull requests
Followed the coding style (
make pylint,make mypy,make isort)make testpasses, and a test case covers the change. Narrow runs only, listed below.Added a changelog entry under
docs/source/changelog/and regeneratedCHANGELOG.md, if the change is user-visible: N/A — centralised in docs(changelog): shared 1.5.0 changelog — long-lived, merges last (#610, #616, #617, #618, #620) #657What is the purpose of your pull request?
Tick the commit type your subject line carries.
fix— corrects a defectfeat— adds a featureperf— changes performance, not behaviourrefactor— changes neither behaviour nor performancetest— tests onlydocs— documentation onlyci— workflows or build toolingrelease— bumps the version or rolls up a distributionchore— anything elseSummary
pcapkit/protocols/protocol.py's__all__listed onlyProtocolBase, sofrom pcapkit.protocols.protocol import *did not bindProtocol, the module's user-facing class. It now lists both.ProtocolMetastays out, asprotocol.rstfiles it under internal definitions.registererror still namesProtocolwhile the guard testsProtocolBase. fix(foundation): registrar error messages and type hints name the public class, not the Base the guard checks #1016 settled that the public door names the public class.tests/protocols/test_protocol_module_exports_1770_unit.pypins__all__, the star-import, and the guard's width. With the__all__change reverted, 2 tests fail.tests/project: 930 passed, 1 skipped.Closes #1770