Repository navigation
refactor!: drop the surviving re-exports of moved names (#1744) - #1754
Merged
Merged
Conversation
- pcapng: delete the TLSKeyLabel alias; readers import it from const.pcapng.tls_key_label. versionremoved:: 1.5.0 on module and page. - field: drop NO_VALUE from __all__, NoValueType to TYPE_CHECKING (versionremoved:: 1.5.0); its readers import from corekit.sentinels. - enum, module, protocol: drop NO_DEFAULT/NULL from __all__ and unbind the types; the objects stay where used, other readers use corekit.sentinels. - module: remove the _get_null pickle shim, unused by the library (D2). - vendor ftp/apptype templates and their two generated const modules import NO_DEFAULT from corekit.sentinels, with identical text. - reassembly/traceflow data: drop the DeferredPacket re-exports. - ngap: delete the ProcedureCode/ProtocolIE aliases; readers use const.ngap. - registry: versionchanged:: 1.5.0 for NULL, formerly '(null)' (D4). - docs: remove the old-path entries; rewrite the re-export-per-module design in sentinels.py and sentinel-convention.rst. - tests: add a tests/project guard; update the pins on the re-exports. Targeted suites pass; the guard fails on each re-added alias. Closes #1744
Owner
Author
|
Verdict: GOOD TO GO at
|
Contributor
|
Coverage: 89.59% (unit tier, Python 3.15,
Per-file detail: the |
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 elseDescription
Closes #1744. It applies the owner's rulings on #1715, #1103 and #1744 (D1–D5): a moved name keeps no explicit re-export at its old path. An explicit re-export here means an alias assignment, a name in a non-home module's
__all__, or prose saying the name is importable there. Ordinary imports that a module uses itself stay.Breaking. These old paths no longer resolve:
protocols.misc.pcapng.TLSKeyLabelandcorekit.fields.field.NoValueTypeshipped in 1.4.x, so both now carryversionremoved:: 1.5.0, in the docstring and on the docs page.NO_VALUE,NO_DEFAULT/NoDefaultType,NULL/NullTypeandABSENT/AbsentType, from their non-home__all__or bindings;_get_nullpickle shim (D2);DeferredPacketin thereassemblyandtraceflowdata modules;ngapaliasesProcedureCodeandProtocolIE.NULLgetsversionchanged:: 1.5.0, because in 1.4.x it was'(null)'(D4).Every reader now imports from the new home. The vendor ftp and apptype templates, and the two const modules they generate, change identically. The sentinel docs no longer describe re-exporting the sentinels from each module.
Guard,
tests/project/test_no_moved_name_re_exports_1744_unit.py. It fails on any of these for a removed (module, name) pair:__all__, or still bound there;ImportFromreader, or an attribute read through the old module;auto*directive naming the old path;pcapkit/ordocs/claiming the name is importable there.It also checks that both
versionremovedblocks are present.Tests, narrow runs on Python 3.14: the guard plus
tests/corekit, thetests/foundationreassembly, traceflow and registry suites, pcapng, ngap, the const modules and thetests/projectgates. All pass, 1,600+ tests.