Repository navigation
refactor(foundation): replace the registry's ad-hoc _MISSING with a MISSING sentinel - #2610
Merged
Merged
Conversation
…rekit.sentinels (#2555) pcapkit.foundation.registry.protocols kept its own `_MISSING = object()`. - pcapkit/corekit/sentinels.py: add MissingType and its MISSING instance, private and falsy like ABSENT; __all__ is unchanged. - pcapkit/foundation/registry/protocols.py: import MISSING and drop _MISSING; the lease code compares against it as before. - docs: list MISSING in sentinel-convention.rst's table and its __bool__ and __repr__ entries, and on the sentinels API page as private. - tests: add MISSING to the sentinel population, consumer, singleton and _py_abc tables; pin a new name's lease displacing MISSING; guard against any import-time bare object() under pcapkit/.
Owner
Author
|
GOOD TO GO at |
Contributor
|
Coverage: 94.03% (unit tier, Python 3.15,
Per-file detail: the |
JarryShaw
added a commit
that referenced
this pull request
Nov 2, 2026
…s latest wave into 1.6.0 (#2449) - Added: every whole HTTP/2 frame in a TCP segment is a further HTTPv2 layer, the previous frame's payload, as with TLS (#2609). - Folded into unreleased entries: SSLv3 lives in pcapkit.protocols.application.sslv3 (#2602), and a reassembled DTLS Datagram's packet holds the deferred handshake decode (#2605). tls.SSLv3 is in no release tag, so the entry records no move. - Changed: the remaining xdist jobs at -n logical (#2606) join the CI entry, and the member-order entry cites the last reorder (#2613). - No entry for the test-only #2611 and #2612, or for #2610's private registry sentinel, which changes no behaviour. - CHANGELOG.md regenerated; util/changelog_md.py --check passes.
1 of 5 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.
make pylint,make mypy,make isort)make testpasses, and a test case covers the changeWhat is the purpose of your pull request?
refactor— changes neither behaviour nor performanceDescription of your pull request and other information
pcapkit.foundation.registry's ad-hoc_MISSING = object()becomes aMissingType/MISSINGsentinel inpcapkit.corekit.sentinelsthat follows sentinel-convention.rst, with__bool__,__repr__, pickling and a singleton. sentinel-convention.rst and corekit/sentinels.rst list it. No registrar changes behaviour: tests/foundation/registry and the registry tests in tests/protocols pass unchanged.Settled on the worker's recommendations:
ABSENT, which is documented as private toprotocols.protocol. That follows AbsentType's own "a sibling rather than a reuse" precedent;MISSINGis_MISSINGwithout the underscore, as_AbsentbecameABSENT(refactor(corekit): normalise sentinel object names to SCREAMING_SNAKE #937).Closes #2555