Skip to main content

compat-sentinel

PEP 661 sentinel for Python 3.12 and later.

On Python 3.15 and later, compat_sentinel.sentinel is the builtin. On older interpreters it is a local implementation with the same constructor, copy behavior, and pickle lookup.

from compat_sentinel import sentinel

MISSING = sentinel("MISSING")
DEFAULT = sentinel("DEFAULT", repr="<default>")

Each call returns a new object. A sentinel pickles back to itself when it can be imported from its module under __name__:

MISSING = sentinel("MISSING")

class Box:
    SHORT = sentinel("Box.SHORT")

A sentinel created in a local scope and never stored under that name does not pickle. __module__ is taken from the caller and is writable; pickle uses the value present at dump time.

int | MISSING and MISSING | str build a typing.Union.

Metadata

Release files for compat-sentinel 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for compat-sentinel 0.1.0
File Size Uploaded
compat_sentinel-0.1.0.tar.gz 10.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for compat-sentinel 0.1.0
File Interpreter ABI Platform
compat_sentinel-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 14.7 kB

Release files / compat_sentinel-0.1.0.tar.gz

Download URL compat_sentinel-0.1.0.tar.gz
Size 10.1 kB
Tags Source
SHA-256 checksum
How to use checksums
cc18cd942d0c4e0e17b37a529c256d0311ef8082c0614ec0bad8d5a47c1d0873
BLAKE2b-256 checksum
How to use checksums
dd0c3ffa7ea07064ebb34ea7eac8c22a0cdbe78a98573d171717de16dea2a503
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 7, 2026.

Transparency log

Release files / compat_sentinel-0.1.0-py3-none-any.whl

Download URL compat_sentinel-0.1.0-py3-none-any.whl
Size 4.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d132d329b08b3820c003b4f99c2fb2ff1abeac6f21d2f360ea64a87bcac6a882
BLAKE2b-256 checksum
How to use checksums
4f10906e8abb573d3d683f3c1c742769b4d888b0f8da910610a73e8b1205141f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 7, 2026.

Transparency log

Release history Release notifications | RSS feed

0.1.2

2 release files

0.1.1

2 release files

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page