compat-sentinel
pypi.org- Category
- Developer Tools
- Rank
- No. 2895Tools index
Previous survey · No. 2775 ·
- Type
- TOOL
- Use case
- Coding
- Date
About
A Python package that provides the PEP 661 sentinel for Python 3.10 and later. On Python 3.15 and later it uses the builtin, and on older versions it uses a local implementation with the same constructor, copy behavior and pickle lookup. Its documentation describes contract tests showing that the pythonbackport-sentinel package fails the same checks, for example reporting the wrong module for pickling.
At a glance
compat-sentinel lets Python libraries use a named marker for an omitted argument while still accepting None as an explicit value. It is worth considering when you support older Python versions and want to adopt the built-in sentinel interface.
Good fit
Library authors who want a consistent omitted-value marker across Python versions.
Consider something else when
A private object is often enough if you only compare identity in one process and never serialize the marker.
Start here
Define a module-level MISSING marker and test an omitted argument, explicit None and a pickle round trip in each supported Python version.
Cost and requirements
The package declares Python 3.10 or newer and documents forwarding to the built-in sentinel on Python 3.15 and later.
Limits to know
Pickle identity depends on a stable importable name. A marker created only inside a local function does not round-trip as a named sentinel.
Sources checked 2026-11-05. Source-based assessment.
Similar tools
Tags
Comments (0)
No comments yet
Editorially curated, with community endorsements as a secondary signal. Corrections welcome.