Add experimental `MISSING` sentinel
by Viicos
·
Feb 06, 2026 at 19:03 UTC
·
scan-b5e1b81642da0c49
Get this automatically on every PR
Install the Axiomo GitHub App to get Signals as check runs and PR comments on every pull request.
Risk level: High (50%)
Introduce an experimental `MISSING` sentinel to handle optional fields in Pydantic models.
Added `MISSING` in experimental/missing_sentinel.py
docs/concepts/experimental.md and docs/errors/validation_errors.md updated
New core schema type discussion in PR description; integrated in code
New tests/test_missing_sentinel.py added, but test outcomes not visible in diff
Trusted contributor with 453 merged PRs. maintains 112 public repositories. has 105 followers. unfamiliar with pydantic/experimental/missing_sentinel.py.
Review 2 high-priority file(s)
tests/test_missing_sentinel.py
+71
71 lines changed; New file; Source code
pydantic/experimental/missing_sentinel.py
+5
New file; Source code
pydantic/json_schema.py
+15
Source code
pydantic/_internal/_generate_schema.py
+3
Source code
pydantic/fields.py
+4
Source code
pydantic/version.py
+2
Source code
pyproject.toml
+2
Configuration
docs/concepts/experimental.md
+46
Standard file
docs/errors/validation_errors.md
+21
Standard file
33
minutes to review
medium
effort level
low
staleness risk
Standard review process
Good evidence, acceptable risk, ready for merge
Why is security_scan_clean missing? Consider adding this check.
tests/test_missing_sentinel.py
New file in high-priority area: 71 lines changed; New file; Source code
pydantic/experimental/missing_sentinel.py
New file in high-priority area: New file; Source code