Repository navigation
fix(protocols): export the L2TP data model from pcapkit.protocols.data.link (#1797) - #1806
Merged
Merged
Conversation
…a.link (#1797) pcapkit.protocols.data.link re-exported ARP, Ethernet, Loopback and VLAN but never L2TP, while pcapkit.protocols.schema.link exports its schema. Not deliberate: the model arrived in cdb5fef without touching the package, and no commit ever named L2TP in it or in the aggregator. - data/link/__init__.py: import L2TP, and Flags as L2TP_Flags, the <protocol>_<name> alias IPv4_Flags and TCP_Flags already use. - data/__init__.py: list both, so `from pcapkit.protocols.data import *` binds them; no other data package exports either name. - data/link/l2tp.py: add Flags to __all__, as arp, vlan and ipv4 list their nested models. The new unit test fails with any of the three hunks reverted. Closes #1797
Owner
Author
|
Verdict: GOOD TO GO at |
4 of 13 tasks
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.data.linkre-exported ARP, Ethernet, Loopback and VLAN but never L2TP, whilepcapkit.protocols.schema.linkexports its schema. The history shows it was not deliberate: the model arrived without touching the package.data/link/__init__.py: importsL2TP, andFlagsasL2TP_Flags, the<protocol>_<name>alias thatIPv4_FlagsandTCP_Flagsuse.data/__init__.py: lists both, sofrom pcapkit.protocols.data import *binds them; no other data package exports either name.data/link/l2tp.py: addsFlagsto__all__, as the sibling modules list their nested models.tests/projectand the L2TP tests pass.Closes #1797